Click to See Complete Forum and Search --> : dhcp cofiguration nightmare


frew k panik
03-09-2002, 02:13 AM
ok, this is my current dhcp config:

ddns-update-style ad-hoc;
subnet 192.168.0.1 netmask 255.255.255.0 {
range 192.168.0.1 192.168.0.60;
default-lease-time 86400;
max-lease-time 86400;
option routers 192.168.0.1;
option ip-forwarding off;
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 205.152.0.5, 205.152.16.20;
}


Ok, I am confused now. If I make my netmask = 255.255.255.1 it says:

dhcpd: Address range 192.168.0.1 to 192.168.0.60, netmask 255.255.255.1 spans multiple subnets!

But if I make my netmask = 255.255.255.0 it says:

dhcpd: /etc/dhcpd.conf line 2: subnet 192.168.0.1: bad subnet number/mask combination.
dhcpd: subnet 192.168.0.1 netmask 255.255.255.0
dhcpd: Configuration file errors encountered -- exiting

So now I MUST make my IP 192.168.0.0. But if I do do that I get errors....?

The Whizzard
03-09-2002, 03:02 AM
Hopefuly my post in this link will help you. (http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=1&t=026818)

jscott
03-09-2002, 03:14 AM
In order to use that class of addresses [192.168.0.1 - 192.168.0.254], you need something like:


subnet 192.168.0.0 netmask 255.255.255.0 {
option broadcast-address 192.168.0.255 ;
option subnet-mask 255.255.255.0 ;
range 192.168.0.2 192.168.0.254 ;
}


You can't assign a brodcast address that doesn't match the subnet (or is it the converse?) And if you're going to make the server hold a static IP, exclude it from the range above (eg. 192.168.0.1 would be a valid static IP)