[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.

Removing dhclient.leases doesn't work.

It did DHCPREQUEST for about 10 secs, then did a DHCPDISCOVER, got a
DHCPOFFER and did again DHCPREQUEST for some time to fall back to
DHCPDISCOVER again, and again, and again...

Now, changing the client ID got me a new IP address, but doing that every
time is not really an option.

Since this post, I contacted my ISP and they say they can see my REQUEST,
and hey! Yes, there goes the ACK! Another REQUEST, another ACK! But
somehow, I don't receive them. I use tcpdump <options> | dhcpdump and that
works perfectly, I can see all DHCP options, addresses and things and the
REQUEST is for the same address as the original one. Even the OFFER offers
this old address. The DHCPACK leaves the server (they say), but doesn't
reach me.

What puzzles me most is that when I change the client ID, I _do_ get the
DHCPACK. What's going on?

David



Reply to: