I belive that with a 255.255.255.0 subnet you get 255 ip addresses. Whats the difference between DHCP servers that use "192.168.1.1 to 192.168.1.254" and "192.168.1.1 to 192.168.1.255"? Are both of these even correct? If my current DHCP server uses "192.168.1.1 to 192.168.1.254" are there any impicatons when changing to "172.16.0.0 to 172.16.255.255"
72 Answers
You write
"I belive that with a 255.255.255.0 subnet you get 255 ip addresses"
You mean a subnet with a mask of 255.255.255.0
You get 254 addresses to use for hosts. 0 is identifying the subnet.. 255 is the broadcast.
There are 256 numbers from 0-255. Take the 256, subtract 2, the subnet and broadcast addresses, and you have 254 addresses available for hosts, when using a mask of 255.255.255.0
You write "Whats the difference between DHCP servers that use "192.168.1.1 to 192.168.1.254" and "192.168.1.1 to 192.168.1.255"?"
No DHCP server would assign 192.168.1.255 as that is the broadcast address
The 172.16 is a bit obscure.. see RFC 1918
10.0.0.0 - 10.255.255.255 (10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
192.168 is 255.255.0.0 but you can have a subnet that is 255.255.255.0 as you do.
So for 255.255.255.0 that's /24 leaving 8 bits. 2^8 is 256. minus two as mentioned so 254.
Apply that to the 172.16 So 12 bits for the network. That leaves 20 bits for the host.
2^20 = 1048576 IP addresses. subtract 2, one for the subnet one for the broadcast.
1048574 IP addresses for hosts.
If you used 172.16.1.0 as your subnet then that could be a 255.255.255.0 address so again, 254 IPs for hosts
But the 172.16.0.0/12 subnet if you're going to use the /12 and not make it a /16(255.255.0.0) or /24(255.255.255.0), then the broadcast would actually be 172.31.255.255 That is due to how masks are calculated including more complex masks like /12, but there's often no need to use subnet masks that aren't /8 /16 /24
1Just my two cents: Note that you can send information to a broadcast address; Your computer will automatically sent the packet to the entire network, any computer listening for broadcasts will receive them. Applications like Dropbox and XBMC, as well as protocols like UPNP and Windows' neighbor discovery (this is how other windows computers on the same network show up under Network Locations) use this to discover other machines on the same network to directly share data with.
IPv6 does not have a broadcast address anymore, just multicast.. but that's another story.
9