Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Sep 2005 09:48:51 +0100
From:      Mark Cullen <mark.r.cullen@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   dhclient + DHCPNAK = release ip?
Message-ID:  <433512F3.7060404@gmail.com>

next in thread | raw e-mail | index | archive | help
Good morning  :-)

I've recently switched ISP and got a static IP. However, my ADSL modem 
is a bit dense it seems. With a dynamic IP things worked reasonably 
well. With my new static IP, however, whenever the connection drops - I 
don't have the worlds highest quality phone line or something - either 
dhclient or the modem gets a bit confused because the IP is the same.

Here's what happens when I catch it disconnecting and do a `ifconfig 
fxp1 delete` just after the DHCPNAK:

Sep 23 10:36:19 bone dhclient: DHCPREQUEST on fxp1 to 255.255.255.255 
port 67
Sep 23 10:36:19 bone dhclient: DHCPNAK from 192.168.0.1
Sep 23 10:36:19 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 5
Sep 23 10:36:19 bone dhclient: DHCPOFFER from 192.168.0.1
Sep 23 10:36:19 bone dhclient: DHCPREQUEST on fxp1 to 255.255.255.255 
port 67
Sep 23 10:36:19 bone dhclient: DHCPACK from 192.168.0.1
Sep 23 10:36:19 bone dhclient: New Network Number: xxxxxxxxxxxxx
Sep 23 10:36:19 bone dhclient: New Broadcast Address: 255.255.255.255
Sep 23 10:36:19 bone dhclient: Reason: BOUND
Sep 23 10:36:19 bone dhclient: Old IP Address (fxp1):
Sep 23 10:36:19 bone dhclient: New IP Address (fxp1): xxxxxxxxxxxxxx
Sep 23 10:36:19 bone dhclient: New Subnet Mask (fxp1): 255.255.255.0
Sep 23 10:36:19 bone dhclient: New Broadcast Address (fxp1): 255.255.255.255
Sep 23 10:36:19 bone dhclient: New Routers: xxxxxxxxxxxxx
Sep 23 10:36:19 bone dhclient: bound to xxxxxxxxxxxxx -- renewal in 57 
seconds.

With this, all is good and my connection works again. Here's what is 
actually happening if I don't either 1) restart dhclient or 2) ifconfig 
fxp1 delete after the DHCPNAK

Sep 23 12:08:08 bone dhclient: DHCPREQUEST on fxp1 to 192.168.0.1 port 67
Sep 23 12:08:08 bone dhclient: DHCPNAK from 192.168.0.1
Sep 23 12:08:08 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 7
Sep 23 12:08:15 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 10
Sep 23 12:08:25 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 4
Sep 23 12:08:29 bone dhclient: No DHCPOFFERS received.
Sep 23 12:08:29 bone dhclient: No working leases in persistent database 
- sleeping.
Sep 23 12:08:29 bone dhclient: DEBUG: FAIL
Sep 23 12:08:30 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 5
Sep 23 12:08:35 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 6
Sep 23 12:08:41 bone dhclient: DHCPDISCOVER on fxp1 to 255.255.255.255 
port 67 interval 10
Sep 23 12:08:51 bone dhclient: No DHCPOFFERS received.
Sep 23 12:08:51 bone dhclient: No working leases in persistent database 
- sleeping.

and it just does this forever and as a result I lost my connection.

So, my question, is there a way to make dhclient release the IP address 
on the interface whenever it gets this DHCPNAK message?

Apologies for my probably rather bad attempt at explaining my problem.

Thanks in advance,
Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?433512F3.7060404>