on dhcpd.conf

DA Ming Ming.Da at alcatel-sbell.com.cn
Fri Nov 16 10:00:42 UTC 2007


Simon, thank you for your quick response.
I'll try according to your comments.

                                                              Best
Regards!
DA MING
( +86-25-84731240-5109 / (Alcanet) 2735-5109
@ Ming.Da at alcatel-sbell.com.cn
 

-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On
Behalf Of Simon Hobson
Sent: Friday, November 16, 2007 5:51 PM
To: dhcp-users at isc.org
Subject: RE: on dhcpd.conf

DA Ming wrote:

>  >According to ISC's guidance, I modified the
>>/etc/dhcpd.conf to add my own available IP
>>addresses that the DHCP server should generate.
>>Unfortunately, I found that in the DHCPOFFER
>>message, the IP address allocated to client is
>>not the one I expected as in the dhcpd.conf.
>>For example, I added the following lines
>>subnet 192.168.129.0 netmask 255.255.255.0 {
>>    range 192.168.129.1 192.168.129.6;
>>    option routers 192.168.180.2;
>>    option broadcast-address 192.168.180.255;
>>    option domain-name-servers ns1.example.org;
>>    default-lease-time 0xffffffff;
>>    max-lease-time 0xffffffff;
>>}
>>But the IP address allocated to client in DHCPOFFER is
'192.168.180.5'.
>>Should I modify the /etc/dhcpd.conf or
>>*/dhcp-3.0.5/server/dhcpd.conf? or are there any
>>other points that I must take into account?



DA Ming wrote:

>I've deleted the router and broadcast-address 
>options and saved other related parts (seems so).
>Please see the attachment for reference.

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

ddns-update-style ad-hoc;

#authoritative;

log-facility local7;

subnet 192.168.129.0 netmask 255.255.255.0 {
   range 192.168.129.1 192.168.129.6;
   default-lease-time 0xffffffff;
   max-lease-time 0xffffffff;
}
subnet 192.168.130.0 netmask 255.255.255.0 {
   range 192.168.130.1 192.168.130.6;
   default-lease-time 0xffffffff;
   max-lease-time 0xffffffff;
}
subnet 192.168.131.0 netmask 255.255.255.0 {
   range 192.168.131.1 192.168.131.6;
   default-lease-time 0xffffffff;
   max-lease-time 0xffffffff;
}
subnet 192.168.132.0 netmask 255.255.255.0 {
   range 192.168.132.1 192.168.132.6;
   default-lease-time 0xffffffff;
   max-lease-time 0xffffffff;
}

host fantasia {
   hardware ethernet 00:0c:29:65:ad:08;
   fixed-address 192.168.180.2;
}


#shared-network 224-29 {
#  subnet 192.268.180.0 netmask 255.255.255.0 {
#    option routers 192.168.180.1;
#  }
#  subnet 192.168.180.0 netmask 255.255.255.0 {
#    option routers 192.168.180.1;
#  }
#  pool {
#   allow members of "foo";
#    range 192.168.180.21 192.168.180.30;
#  }
#  pool {
#   deny members of "foo";
#    range 192.168.180.31 192.168.180.40;
#  }
#}


There was at some point a declaration for 
192.168.180.0 (I assume from the original sample 
config) - are you sure that this was commented 
out when you first noticed the problem ?


A couple of other points :

You need a routers declaration for every subnet, eg :
subnet 192.168.129.0 netmask 255.255.255.0 {
   routers 192.168.129.254;
   range 192.168.129.1 192.168.129.6;
   default-lease-time 0xffffffff;
   max-lease-time 0xffffffff;
}
without this your clients will not be able to 
communicate with anything outside of their subnet.

The server must be made authoritative to work properly.

And you need to change the domain name and DNS 
servers options to something appropriate for your 
network.

The lease times are rather short for a production 
server - but should be OK for testing. For 
production, most people tend to use a minimum of 
several hours, and more usually several days (or 
even weeks).





More information about the dhcp-users mailing list