You are not logged in.
Pages: 1
Topic closed
Sometimes Netcfg has trouble making a connection to my wireless network - is been a problem with two different routers and two different laptops, so I don't think it's a hardware issue.
I've done a little research (as much as I can) and I think I've found that dhcpcd is the culprit. I've piped the output of dhcpcd from /usr/lib/network/connections/ethernet and this is what it gives me when it fails:
dhcpcd[1329]: version 5.2.12 starting
dhcpcd[1329]: wlan0: using hwaddr 00:24:d7:98:de:b4
dhcpcd[1329]: wlan0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[1329]: wlan0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[1329]: wlan0: reading lease `/var/lib/dhcpcd/dhcpcd-wlan0.lease'
dhcpcd[1329]: wlan0: rebinding lease of 192.168.0.2
dhcpcd[1329]: wlan0: sending REQUEST (xid 0xca401306), next in 4.76 seconds
dhcpcd[1329]: wlan0: sending REQUEST (xid 0xca401306), next in 8.63 seconds
dhcpcd[1329]: timed out
After that dhcpcd isn't running. Running dhcpcd manually always gives me a connection:
[root@x201 ~]# dhcpcd -B
dhcpcd[23337]: version 5.2.12 starting
dhcpcd[23337]: wlan0: rebinding lease of 192.168.0.2
dhcpcd[23337]: eth0: waiting for carrier
dhcpcd[23337]: wlan0: broadcasting for a lease
dhcpcd[23337]: wlan0: offered 192.168.0.2 from 192.168.0.1
dhcpcd[23337]: wlan0: acknowledged 192.168.0.2 from 192.168.0.1
dhcpcd[23337]: wlan0: checking for 192.168.0.2
dhcpcd[23337]: wlan0: leased 192.168.0.2 for 86400 seconds
Here's my Netcfg profile:
CONNECTION='wireless'
INTERFACE='wlan0'
SECURITY='wpa'
ESSID='stokholm'
KEY='my_passphrase'
IP='dhcp'
What gives?
Last edited by Lars Stokholm (2011-06-05 16:07:49)
Offline
Apparently the router sometimes takes a lot of time to offer a lease - so it seems at least:
Jun 5 17:56:44 localhost dhcpcd[1214]: version 5.2.12 starting
Jun 5 17:56:45 localhost dhcpcd[1214]: wlan0: rebinding lease of 192.168.0.2
Jun 5 17:56:55 localhost dhcpcd[1214]: wlan0: broadcasting for a lease
Jun 5 17:58:59 localhost dhcpcd[1214]: wlan0: offered 192.168.0.2 from 192.168.0.1
Jun 5 17:58:59 localhost dhcpcd[1214]: wlan0: acknowledged 192.168.0.2 from 192.168.0.1
Jun 5 17:59:00 localhost dhcpcd[1214]: wlan0: checking for 192.168.0.2
Jun 5 17:59:05 localhost dhcpcd[1214]: wlan0: leased 192.168.0.2 for 86400 seconds
Jun 5 17:59:06 localhost dhcpcd[1214]: forked to background, child pid 5224
Look at the times. Almost two minutes before an offer is recieved.
Increasing DHCP_TIMEOUT helps but I still don't understand why the offer is so late.
Offline
Lars,
have you tried dhclient instead ?
put the line
DHCLIENT=yes
somewhere in your profile.
You must have dhclient installed.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
Not yet, but I'll keep it in mind. Thanks.
Offline
Sometimes dhcpcd repeatedly failed to get the IP (errors logged as "rebinding lease of..." -> "reject NAK via..."). This was very annoying because forced me to setup sets of static IPs for these situations.
I discovered that manually erasing /var/lib/dhcpcd (with files from previous days) a successful IP negotiation was achieved. It seems that dhcpcd is broken in some way (or at least not robust enough). I have switched to dhclient with the proper setting (placing DHCLIENT=yes in the network profile). Maybe netcfg should remove the dhcpcd dependency and automatically use dhclient when installed.
Offline
Lars,
have you tried dhclient instead ?
put the line
DHCLIENT=yes
somewhere in your profile.
You must have dhclient installed.
Mektub
Big thanks, that sloves the problem for me too.
Offline
deadshox, please don't necrobump threads especially not for +1 type of post.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Pages: 1
Topic closed