From: Kris D. <kd...@vi...> - 2012-04-09 14:30:07
|
Jeff wrote: > Here is what I am getting when I try to start dhcp > /etc/dhcp3/dhcpd.conf line 110: subnet 192.168.1.1 netmask > 255.255.255.0: bad subnet number/mask combination. > subnet 192.168.1.1 netmask 255.255.255.0 > ^ > Configuration file errors encountered -- exiting Strictly speaking, a CIDR netblock starting on 192.168.1.1 cannot have a netmask of 255.255.255.0, it can only have a mask of 255.255.255.255. This is determined by the positions of 1's in the binary expansion of the IP and netmask: 192 168 1 1 11000000 10101000 00000001 00000001 255 255 255 255 11111111 11111111 11111111 11111111 The network IP may not have 1 bits to the right of any 1 bits in the netmask - note that 192.168.1.1 has a 1 in the farthest bit to the right, so the mask must be all 1's down to that position as well. A block starting on .2 could have a mask of .254, .4 could have .252, etc: 192 168 1 2 11000000 10101000 00000001 00000010 255 255 255 254 11111111 11111111 11111111 11111110 192 168 1 4 11000000 10101000 00000001 00000100 255 255 255 254 11111111 11111111 11111111 11111100 So for a 255.255.255.0 mask, your subnet must be .0. -kgd |