wifi fails to connect - no DHCP4 address

This is a continuation of thread http://forums.opensuse.org/english/get-technical-help-here/wireless/477719-wifi-starts-but-loses-association-ap.html#post2486770 The original problem appears to be solved in that dmesg shows that association and authentication now holds. ifstatus wlan0 also shows this to be the case:

wlan0     name: 802.11n WLAN Adapter

DHCP4 client (dhcpcd) is running
. . . but is still waiting for data
DHCP6 client (dhclient6) is running
. . . but is still waiting for data
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:1f:1f:e4:4f:66 brd ff:ff:ff:ff:ff:ff
inet6 fe80::21f:1fff:fee4:4f66/64 scope link
valid_lft forever preferred_lft forever
wlan0 is up
bssid=00:81:d8:42:1e:9a
ssid=BTHub3-TZM5
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED

However, there is still no internet connection and ifconfig wlan0 produces:

wlan0 Link encap:Ethernet HWaddr 00:1F:1F:E4:4F:66
inet6 addr: fe80::21f:1fff:fee4:4f66/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:306 (306.0 b) TX bytes:8986 (8.7 Kb)

As I understand it, there should be a line inet addr:, which indicates to me that DHCP has not done what I expected it to although there is an inet6 addr: line. As far as I can see from YAST there is nothing wrong with my DHCP settings. I may be barking up the wrong tree - can anyone help? Are there other tests/commands I should run to shed light on this?

Switch to using “dhclient” in place of “dhcpcd”.

Yast → System → “/etc/config” settings → network → DHCP → DHCP_CLIENT

that’s assuming that I remembered the sequence, but that’s close enough that you can probably find your way around.

Found the right screen and set DHCP_CLIENT_BIN to dhclient (it was empty originally).

ifconfig wlan0 produced:

wlan0     Link encap:Ethernet  HWaddr 00:1F:1F:E4:4F:66  
          inet addr:192.168.1.65  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:1fff:fee4:4f66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1074 (1.0 Kb)  TX bytes:11828 (11.5 Kb)

Firefox then showed “Connecting” to Google but eventually gave up with the message that the URL was unreachable.

Also tried ping -c 5 -v 192.168.1.254 (the IP address is my router):

PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
From 192.168.1.65 icmp_seq=2 Destination Host Unreachable
From 192.168.1.65 icmp_seq=3 Destination Host Unreachable
From 192.168.1.65 icmp_seq=4 Destination Host Unreachable
From 192.168.1.65 icmp_seq=5 Destination Host Unreachable

So further progress; ifconfig now shows the inet addr: line and Firefox is showing signs of life. What can I try next, please?

I’m not sure what the problem is now.

You can try:


/sbin/arp -a

That should give the MAC address of your router. Then, if you otherwise know what that MAC address should be, see if there is a match. Also check that your router is not setup for MAC filtering, though it seems unlikely that it would have given you an IP address if that were the problem.

I’m guessing that you probably have a 2Wire router, though I don’t think that should be significant.

From arp -a:

? (192.168.1.254) at <incomplete> on wlan0
? (192.168.1.64) at 00:23:54:f0:f3:16 [ether] on wlan0

Not sure what means on the first line as ifstatus wlan0 gives:

    wlan0     name: 802.11n WLAN Adapter
DHCP4 client (dhclient) is running
DHCP6 client (dhclient6) is running
. . . but is still waiting for data
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1f:1f:e4:4f:66 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.65/24 brd 192.168.1.255 scope global wlan0
    inet6 fe80::21f:1fff:fee4:4f66/64 scope link 
       valid_lft forever preferred_lft forever
Configured IPv4 routes for interface wlan0:
  169.254.0.0/16 - - wlan0  
Active IPv4 routes for interface wlan0:
  default via 192.168.1.254
  169.254.0.0/16  scope link
1 of 1 configured IPv4 routes for interface wlan0 up

    wlan0     is up
bssid=00:81:d8:42:1e:9a
ssid=BTHub3-TZM5
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.1.65

dmesg gives:

   29.065535] wlan0: authenticate with 00:81:d8:42:1e:9a
   29.089277] wlan0: send auth to 00:81:d8:42:1e:9a (try 1/3)
   29.091117] wlan0: authenticated
   29.103019] wlan0: associate with 00:81:d8:42:1e:9a (try 1/3)
   29.109893] wlan0: RX AssocResp from 00:81:d8:42:1e:9a (capab=0x431 status=0 aid=1)
   29.110157] wlan0: associated
   29.110358] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
   35.757045] EXT4-fs (sda6): re-mounted. Opts: acl,user_xattr,commit=0
   35.762482] EXT4-fs (sda7): re-mounted. Opts: acl,user_xattr,commit=0
   35.765619] EXT4-fs (sda8): re-mounted. Opts: acl,user_xattr,commit=0
   39.138014] wlan0: no IPv6 routers present

and ifconfig wlan0 gives:

wlan0     Link encap:Ethernet  HWaddr 00:1F:1F:E4:4F:66  
          inet addr:192.168.1.65  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:1fff:fee4:4f66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0                                                   
          TX packets:151 errors:0 dropped:0 overruns:0 carrier:0                                                
          collisions:0 txqueuelen:1000                                                                          
          RX bytes:1844 (1.8 Kb)  TX bytes:15080 (14.7 Kb)                                                      

All looks good to me apart from that first line in arp -a. Is there any other clue to the problem? I did check that Firefox tried and failed to connect as before.

Apparently my router (BT HomeHub3; probably not known in the US) does not support MAC filtering. Not sure what a 2-wire router is, but I did find this, which may make more sense to you than it does to me: BT Broadband - and How to Survive It! .

Your computer is failing to get a MAC address for 192.168.1.254.

Are you sure that is the correct IP address for your router?

Maybe take a look in “/var/lib/dhcp/dhclient.leases” to see the DHCP information that was provided to your system.

/var/lib/dhcp/ contains three files as follows:

  • dhclient.leases (the one you asked me to look at) is empty.
  • the second is dhclient.wlan0.lease containing:
lease {
  interface "wlan0";
  fixed-address 192.168.1.65;
  option subnet-mask 255.255.255.0;
  option dhcp-lease-time 86400;
  option routers 192.168.1.254;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.1.254;
  option domain-name-servers 192.168.1.254;
  option broadcast-address 192.168.1.255;
  option host-name "linux-txl6";
  option domain-name "home";
  renew 3 2012/09/19 00:45:45;
  rebind 3 2012/09/19 11:20:30;
  expire 3 2012/09/19 14:20:30;
}
  • the third is dhclient.wlan0.conf, which may help:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
request subnet-mask, broadcast-address, routers,
    rfc3442-classless-static-routes,
    interface-mtu, host-name, domain-name, domain-search,
    domain-name-servers, nis-domain, nis-servers,
    nds-context, nds-servers, nds-tree-name,
    netbios-name-servers, netbios-dd-server,
    netbios-node-type, netbios-scope, ntp-servers;
require subnet-mask;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;

dhclient.wlan0.lease includes the line “option routers 192.168.1.254;”, which appears to be correct.

Does any of this help?

It might be that your router times out on IPv6 requests. Try this:

  • Yast
  • Network Devices
  • Network settings
  • Disable IPv6
    reboot to effect the changes, and see if a connection can be made.

To create a static config manually, that should work if the router’s IP is OK, use these data:

gateway 192.168.1.254
DNS 8.8.8.8 and 8.8.4.4
static IP 192.168.1.65 with
netmask 255.255.255.0

Okay, that looks good.

It shows the DHCP server, router, DNS server all with IP address 192.168.1.254

Your system had to be talking to 192.168.1.254 in order to receive a DHCP assignment. It is puzzling that it cannot communicate thereafter.

If I think of something else, I will post back.

That’s what puzzles me too. I wondered if it might be a problem with the browser, but even if that were the case I should get a response from my router with ping, but all I get back is the message that the ‘Destination Host is unreachable’. Yet there is nothing I can find that suggests the link between system and router has been lost.

Knurpht - tried restricting wlan0 to DHCP4, but that did not produce any change. I’ll try the static settings shortly.

I’ve been fiddling with this for so long and gone down so many blind alleys that I may well have put on an obscure setting that is causing all this. Perhaps I should try a clean install (with 12.2). It’s a desperate step; any views?

I doubt that a clean install will work.

Assuming that you have another computer on that LAN, try using that to find the MAC address of the router. Then see if you can hardwire that MAC address into the arp tables (use the “arp” command as root). Check the man pages.

The last time I did that, I found it useful to create a small file in the format of “/etc/ethers”, and then use the “-f” option to arp. But I was dealing with a different problem - I was visiting elsewhere, and the home network was badly configured with two different routers answering to the same IP. So I use “arp” to hardwire the router that worked.

Let me add a note.

When your computer is successful in getting a DHCP address, it is contacting the router with a broadcast - essentially making a request to address 0. And it can do that without having the MAC address of the router. Once it has an IP, it seems unable to get a MAC address.

My best guess - and it is only a guess - is that there might be a driver problem in making arp requests. If all else fails, you could try installing the compat package (not sure of its name), and using the Windows driver for your wifi card. I have no experience with that.

The computer I am using is dual bootable, Linux and Vista. It works fine, except that the internet connection works on Vista while on Linux (ie openSUSE) it doesn’t. On Vista, which runs McAfee, the network map that McAfee brings up confirms the IP address for the router I am using. What is curious is that the router is shown as offline although it is doing what it is supposed to do. To me it seems as if some flag is set in the router saying it is offline; the flag is ignored in Vista but not in openSUSE. Does this give any clues?

You were getting “host unreachable” with ping attempts. And that is what normally happens when the ARP protocol fails to discover the MAC address that corresponds to the ip address you are sending to.

To me, that indicates some incompatibility between the two systems (opensuse and the router).

That’s why I suggest trying the compat-wireless drivers, if you can work out how to do that.

You might try a google search with your network card model number and “linux” in the search argument, to see if you can find other people who have run into the same problems and perhaps solved it.

On 09/22/2012 02:56 PM, nrickert wrote:
>
> You were getting “host unreachable” with ping attempts. And that is
> what normally happens when the ARP protocol fails to discover the MAC
> address that corresponds to the ip address you are sending to.
>
> To me, that indicates some incompatibility between the two systems
> (opensuse and the router).
>
> That’s why I suggest trying the compat-wireless drivers, if you can
> work out how to do that.
>
> You might try a google search with your network card model number and
> “linux” in the search argument, to see if you can find other people who
> have run into the same problems and perhaps solved it.

I do not think that compat-wireless would make much difference. From what has
been posted, the wireless device has connected and associated. Any problem in
getting an IP is due to some problem in the rest of the system. Changing the
driver will not cure that.

Forgot to respond to nrickert’s suggestion that I add in the compat-wireless packages; seeing lwfinger’s reply above reminded me. I did this under my previous thread mentioned in my first post, where association either did not take place or was immediately dropped. lwfinger suggested I add the compat-wireless packages, which immediately resolved the association problem but exposed the dhcp problem which is the subject of this thread. So unfortunately no further mileage in that, it would seem. I was interested to discover in my net searches that my router uses a Linux kernel {perhaps most of them do), although of course that is no guarantee of success. I will continue searches along the lines that nrickert suggests, but I have found nothing yet. In view of the anomaly of McAfee under Vista showing the router to be offline yet working normally, I am inclined to the view that there is an incompatibility between router and openSUSE rather than the network card, but I’ll keep trying.