[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhclient problem

David Fokkema <fokkema@nat.vu.nl> writes:
>          I don't know what's going on since the syslog shows that after
> each DHCPREQUEST there is a DHCPOFFER from the correct server.

That's broken server behaviour.  The server is supposed to respond
with either a DHCPACK or a DHCPNAK (or not respond at all).  If it
responds with DHCPACK, the client gets the address it asked for.  If
it responds with DHCPNAK, *then* the client generates a DHCPDISCOVER
to which the server responds with a DHCPOFFER.

Anyway, after getting no correct answer to a DHCPREQUEST for a bit,
the DHCP client is supposed to fall back to a DHCPDISCOVER to get a
new address.  By default it does so in only 10 seconds, but this can
be overridden by the "reboot" value in "/etc/dhclient.conf".  Perhaps
you've overridden it with too large a value?  Or what does "dhclient
hangs (almost) forever" mean?

If you can't get it to work correctly, a quick fix is to add a line
near the beginning of the "/sbin/dhclient" to:

        rm /var/lib/dhcp/dhclient.leases

Then, since the DHCP client has no leases, it'll start out by doing a
DHCPDISCOVER without delay.  Depending on the DHCP server at the other
end, you may still get the same IP address every time.

Kevin <buhr@telus.net>

Reply to: