Re: dhcp-client cleanup



Bit Twister wrote:
On Sat, 25 Feb 2006 21:47:11 -0500, cga wrote:

hmm.. that would reset the client system to its original state but the dhcp server system..


Yep, it would be sad if a client could reset a server. :(

otoh wouldn't it make sense being able to tell the server.. ok I'll be on the road with this machine for the next couple of days so I won't be needing this ip address.. feel free to move it back to your pool of free/unused ip addresses.. Or am I missing something..?


depending on how it is configured would still retain the lease information.. and might refuse to give me another lease because it thinks I already have one (?) And since I have no access to my ISP's dhcp server configuration I cannot verify the above assumption.


Well, a new requirement.
Doing a man dhclient would suggest you could release the assigned ip addy.


at least on my system - the dhclient man page only talks of configuring one (or several) interface(s).. says nothing about de-configuring them or releasing the ip address.. doesn't say anything about turning on some form of verbose/debugging mode either :-(



Debian sarge and etch. The sarge system has never had any problems connecting. The etch system, otoh, practically never connects successfully.. Except that the other day I left it up overnight.. ran dhclient manually in the morning and immediately obtained a lease.. eth0 and the route table were correctly configured and I was able to go online. So my guess since I had changed nothing in my setup is that for some reason my isp's dhcp server having heard nothing from me for a number of hours decided to reclaim my lease.


Once you get a lease, your box is supposed to renew it based on renew,
rebind, expire times in the dhclient*.leases file.

ok. so if I understand you correctly I should edit this file - changing the rebind or expiration date and wait for dhclient to wake up and take action..?

now the problem with this is that on the etch system the dhclient.eth0.leases file is created empty - since I was unable to obtain a lease - So, should I create a syntactically valid file with a fake ip address etc. and an expiration date/time at eg. current time plus thirty seconds.. save it.. and wait for dhclient to wake up and seeing that the lease is expired go get me a new one..???

Apart from striking me as being rather complicated .. I'm not sure this would work anyway.. since surely the dhcp server at the other end must keep track of the leases it has served - with rebind.. expiration dates and times.. etc.

I've even tried copying over the lease file from the sarge /var/run/ but that did not work either. IIRC dhclient could not get a lease from the server.. fell back on the lease that was in the lease file.. ifconfig eth0 showed the ip address dhclient picked up from the lease file.. but the interface was not listed as "up" and the routing table was not configured.


This is all guesswork as I have really no knowledge of dhcp.. but I would imagine that the server would keep track of which machines/nic's he has already provided with and ip address and might would turn down a new request from a machine with a currently active lease..


I have no direct knowledge about a server, but, I know I get the same
IP address from my ISP, regardless if I released the IP address or not.


And that would explain why I am practically never able to bring up the connection.


Only if your log show the request refused. :)

Nothing of the sort.. It just sends out its requests and fails to obtain a lease practically every time - got a connection twice in possibly a hundred attempts over a period of three weeks.

With the same identical hardware and the same ISP, I always connect whenever I bring up the sarge system.

Maybe I should try removing everything that has to do with bringing up the network from /etc/rc.2 and try to do everything manually since I am pretty sure that the problem is with the etch init scripts. I tried a number of debian-derived live CD's and ran into the same problem every time. otoh I tried the current version of the "linux system rescue CD" which is based on gentoo and eth0 came up every time.


Are the errors, dropped, overruns, frame faults pretty clean
ifconfig

Well I didn't look since I was unable to bring up eth0 I didn't think there would be anything there of any significance.

s
For extra points
http://www.ietf.org/rfc/rfc2131.txt

Maybe I should email it to my ISP..? :-)

No.. I have three different systems installed on this laptop Win98.. sarge.. and etch.. and only etch has this connection problem. So either way I look at it the odds are that the etch networking scripts are the culprit.. and unfortunately I neither have the time nor the ability to debug this.
.



Relevant Pages

  • Re: Router
    ... for that period of time then, when the lease has expired, it has to check ... If the DHCP server is rebooted, ... Ah, right, it seems the server can invalidate all clients by broadcasting ...
    (comp.sys.acorn.networking)
  • Re: DHCP released leases go to new computers too soon
    ... If you issue an ipconfig /all, the lease period is 15 days? ... They keep getting their leases from the same server. ... The DHCP server shows 15 day leases and my computer shows 15 days. ... "Mathieu CHATEAU" wrote: ...
    (microsoft.public.windows.server.networking)
  • DDNS strangeness
    ... I have it updating the DNS server as I expect when I boot the X desktop. ... in the past (this information is stored in the lease) and does not ... This can lead to cases where the DHCP server adds a record, ...
    (freebsd-current)
  • Re: [9fans] QTCTL?
    ... That would "freeze" clients for at most 5 seconds when a client fails ... And the ones with better latencies can afford not ... Anytime you are running a file from a server, ... Rcache makes lease available with parameters, ...
    (comp.os.plan9)
  • Re: dhcp-client cleanup
    ... Your lease likely expires in 24 ... my ISP's dhcp server configuration I cannot verify the above assumption. ... ifup eth0 or whatever script/mechanism etch provides. ...
    (comp.os.linux.networking)