[NTLUG:Discuss] dhcp question

Chris Cox cjcox at acm.org
Mon Mar 10 12:28:02 CDT 2008


Ed Leach wrote:
> I have 2 CentOS machines on the same network. I have a dhcp server set
> up. I'm restarting networking on a client machine in the same network.
> It finds the dhcp server and restarts networking, but it is not being
> updated with a new IP address.
> 
> On the server I'm getting this error in /var/log/messages:
> 
> ---
> localhost dhcpd: DHCPREQUEST for 192.168.0.103 from 00:11:31:f1:3b:bc
> via eth0: unknown lease 192.168.0.103.
> ---

The client has requested the address 192.168.0.103 and there is
not an existing lease for that address and MAC.

> 
> 192.168.0.103 is the IP address of the client that I believe the client
> is getting from the router. Why wouldn't the client get it's IP address
> from the dhcp server?

Clients usually make a request for an address that they had
previously... just part of the protocol.  The DHCP server can always
say "no" and give them a different address of course.  Client may
also pass a desired hostname (for DDNS for example, see below).  DHCP
doesn't have to accept that either... but can and send messages to
a DNS server (e.g. ISC BIND).

> 
> Below is my config file, which I have simplified as much as possible but
> is still not working.
> 
> Also - I'm studying to take the RHCE exam some time and am looking for
> some help if there is someone in the North Dallas or Plano area who
> could provide advice and/or some kind of mentoring (like testing me).
> I'm going through Jang's prep book and every once in a while get tripped
> up by something like the above problem.
> 
> Thanks,
> 
> Ed
> 
> ------------------------------
> 
> ddns-update-style interim;
> ignore client-updates;

If you want to use ddns you'll need to setup a key or allow
updates by IP in your bind(named) configuration.

> 
> subnet 192.168.0.0 netmask 255.255.255.0 {
> 
> option routers 192.168.0.1;
> option subnet-mask 255.255.255.0;
> 
> option time-offset -18000; # Eastern Standard Time

Not familiar with that one, time-offset.  Times in
the ISC lease db are stored in GMT AFAIK.  I guess
a client can use that to figure out its timezone (?).

> 
> range dynamic-bootp 192.168.0.128 192.168.0.254;
> default-lease-time 21600;
> max-lease-time 43200;
> }
> 

You'll also want to make sure that you are the ONLY dhcp
server on the network being serviced.  DHCP works via
broadcasts (IPv4).

Ted Lemon's DHCP Handbook is the best resource that
I know of for DHCP info.  Ted and Ralph Droms are
the authors and I think both are working for ISC.





More information about the Discuss mailing list