[SOLVED] DHCPDISCOVER sudden failure

Kernels & Hardware, configuring network, installing services

[SOLVED] DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-27 14:29

Sudden failure to obtain DHCP IP address using Wicd 1.7.2.4
- No previous DHCP issues with this computer/router
- Computer can connect to WiFi router with Wicd using static IP address
- wicd.log shows DHCPOFFERs ignored on first attempt, no DHCPOFFERs later (MAC<-->leased IP?)
- Other devices can get DHCP leases from router
- No other router available for testing

Wicd config:
- DHCP Client - Automatic
- Driver - wext
- Backend - external
- Debug mode - enabled

Not sure where/how to start troubleshooting. Did try manual wpa_supplicant and got successful association but did not know how to try to configure wlan0 as a DHCP client and the sequence of port config, association, and lease request. I'm out of my depth here. Suggestions?

Running Debian 8/Jessie
uname -a
Linux hp-deb 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux

Code: Select all
2018/11/27 06:10:00 :: Listening on LPF/wlan0/2c:33:7a:10:d3:b1
2018/11/27 06:10:00 :: Sending on   LPF/wlan0/2c:33:7a:10:d3:b1
2018/11/27 06:10:00 :: Sending on   Socket/fallback
2018/11/27 06:10:00 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
2018/11/27 06:10:00 :: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
>>>2018/11/27 06:10:00 :: DHCPOFFER from 10.0.0.1
2018/11/27 06:10:03 :: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
2018/11/27 06:10:06 :: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
2018/11/27 06:10:14 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
2018/11/27 06:10:14 :: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
>>>2018/11/27 06:10:14 :: DHCPOFFER from 10.0.0.1
2018/11/27 06:10:20 :: canceling connection attempt
2018/11/27 06:10:20 :: attempting to set hostname with dhclient
2018/11/27 06:10:20 :: using dhcpcd or another supported client may work better
2018/11/27 06:10:20 :: running kill dhcp.
2018/11/27 06:10:20 :: DHCP connection failed
2018/11/27 06:10:20 :: Exception in thread Thread-6:
2018/11/27 06:10:20 :: Traceback (most recent call last):
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
2018/11/27 06:10:20 ::     self.run()
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/networking.py", line 350, in run
2018/11/27 06:10:20 ::     self._connect()
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/networking.py", line 941, in _connect
2018/11/27 06:10:20 ::     self.set_ip_address(wiface)
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/networking.py", line 73, in wrapper
2018/11/27 06:10:20 ::     return func(self, *__args, **__kargs)
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/networking.py", line 469, in set_ip_address
2018/11/27 06:10:20 ::     dhcp_status = iface.StartDHCP(hname)
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/wnettools.py", line 195, in newfunc
2018/11/27 06:10:20 ::     return func(self, *args, **kwargs)
2018/11/27 06:10:20 ::   File "/usr/lib/python2.7/dist-packages/wicd/wnettools.py", line 622, in StartDHCP
2018/11/27 06:10:20 ::     self.dhcp_object.wait()
2018/11/27 06:10:20 :: AttributeError: 'NoneType' object has no attribute 'wait'
2018/11/27 06:10:20 ::
2018/11/27 06:10:20 :: Sending connection attempt result aborted

2018/11/27 06:11:45 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 4
2018/11/27 06:11:49 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 6
2018/11/27 06:11:55 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 11
2018/11/27 06:12:06 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 15
2018/11/27 06:12:21 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 8
2018/11/27 06:12:29 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 10
2018/11/27 06:12:39 :: DHCPDISCOVER on wlan2 to 255.255.255.255 port 67 interval 7
>>>2018/11/27 06:12:46 :: No DHCPOFFERS received.
Last edited by secdroid on 2018-11-28 16:18, edited 1 time in total.
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38

Re: DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-27 16:44

Neglected to mention that I removed wicd and re-installed it, along with suggested files. No change.

My guess is that a config file or non-wicd-specific python library is damaged...
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38

Re: DHCPDISCOVER sudden failure

Postby Head_on_a_Stick » 2018-11-27 17:56

secdroid wrote:Did try manual wpa_supplicant and got successful association but did not know how to try to configure wlan0 as a DHCP client

Code: Select all
# dhclient

EDIT: wicd seems to use dhcpcd5 for the backend so you will have to install dhclient to check that.

The problem is more likely to be the router if you can connect with a static address.
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8322
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-27 21:16

Head_on_a_Stick wrote:
secdroid wrote:Did try manual wpa_supplicant and got successful association but did not know how to try to configure wlan0 as a DHCP client

Code: Select all
# dhclient

EDIT: wicd seems to use dhcpcd5 for the backend so you will have to install dhclient to check that.

The problem is more likely to be the router if you can connect with a static address.

Not quite sure that I'm following you here:

- An Android phone and a Fire OS (Amazon's Android) tablet are having no problems leasing an IP address from the router. That would appear to eliminate the router as the source of the DHCP lease issues.

- The router is one of those ISP appliance routers with no tools for the end user. I did unplug and reboot to ensure that in-RAM leases would be forgotten. No change.

- dhclient is already installed, but dhcpd5 is not installed.

Code: Select all
root@hp-deb:/home/fdz# which dhclient
/sbin/dhclient
,,,
root@hp-deb:/home/fdz# which dhcpcd5
root@hp-deb:/home/fdz# apt-get install dhcpcd5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  resolvconf
Suggested packages:
  dhcpcd-gtk
The following NEW packages will be installed:
  dhcpcd5 resolvconf
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 175 kB of archives.
After this operation, 571 kB of additional disk space will be used.

If I'm understanding this correctly, the protocol is to use dhclient to request an IP from the router's DHCP server and then use wpa-supplicant to associate (authenticate via WPA2). I'll try to see if I can make that work in order to get a better insight into what's going on.
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38

Re: DHCPDISCOVER sudden failure

Postby Head_on_a_Stick » 2018-11-28 06:06

secdroid wrote:The router is one of those ISP appliance routers with no tools for the end user.

Have you tried pointing your browser to the router's address? They usually have a web page for configuration.

Find this with
Code: Select all
empty@buster:~ $ ip r
default via 192.168.1.254 dev wlp2s0 proto dhcp src 192.168.1.223 metric 20
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.223
192.168.1.254 dev wlp2s0 proto dhcp scope link src 192.168.1.223 metric 20
empty@buster:~ $

^ The default via address is the one you want ;)

Did you try running `dhclient` (as root)?
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8322
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-28 12:04

Head_on_a_Stick wrote:Have you tried pointing your browser to the router's address? They usually have a web page for configuration.

Yes. The listing of current connections, connection history, and WiFi config are all fine.

One lie: "Every device listed below was auto discovered via DHCP." I am currently connected via static IP, using the computer with the DHCP issue. The screen only distinguishes between DHCP and reserved IPs. I'm connected with a static, but unreserved IP. (Really should reserve an IP for testing purposes.)

Unfortunately, the logs are pretty limited and don't seem to offer much help in diagnosing these sorts of issues. The modem/router is a Comcast/Xfinity Technicolor CGM4140COM. The documentation sucks, but the screens are pretty self-explanatory.

Head_on_a_Stick wrote:Did you try running `dhclient` (as root)?

Will do later today. I need to read the nice docs I downloaded on how to use dhclient, dhclient.conf, and dhclient-script. Lots of stuff there.

My guess is that I will be able to do a DHCP connection with association using dhclient and wpa-supplicant. I'm hoping that my issue is with a wicd config file or python issue that I can sort out via what I learn.

After that, I really should find the time to upgrade this computer to Debian 9... :lol:
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38

Re: DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-28 16:00

That did not work out. Using dhclient against Xfinity got no offers. [Note: my first fail post did show two offers]

Code: Select all
 dhclient -d wlan0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/2c:33:7a:10:d3:b1
Sending on   LPF/wlan0/2c:33:7a:10:d3:b1
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Borrowed a travel router and shutdown the Xfinity's WiFi. DHCP works against the travel router.

Code: Select all
# dhclient -d wlan0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/2c:33:7a:10:d3:b1
Sending on   LPF/wlan0/2c:33:7a:10:d3:b1
Sending on   Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.10.1
RTNETLINK answers: File exists
bound to 192.168.10.101 -- renewal in 272949 seconds.

I guess the next step is to hope that turning off the Xfinity WiFi purged any bad info and things will work when I turn it on. If that doesn't work, I'll reset to original state and hope for the best.
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38

Re: DHCPDISCOVER sudden failure

Postby secdroid » 2018-11-28 16:16

....And I'm back connected to the Xfinity via DHCP.

Thanks for hanging with me, "Head_on_a_Stick". I guess my only beef with Debian's wicd is the ungraceful & unhelpful failure message. The real fault was that the Xfinity modem/router got its bits crossed and there was no obvious way to terminate all leases.

Very educational. Next step is to buy my own modem and router so that I have docs and better control over what is going on.

I shudder to think what would have happened if I tried Xfinity "customer service." :roll:

At least this taught me a few things.
secdroid
 
Posts: 31
Joined: 2009-12-18 18:38


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable