DHCP lease expiration causing gateway to drop for USB wlan interface

Not a “Wireless not working” post (this time).

Finally, I got the new RTL8192CU USB stick working on OpenSUSE 12.1 This was a struggle. I ended up switching to the vendor driver from RealTek, 8192cu. Kernel driver, rtl7182cu, might have worked in the end if I had stuck with it, but I gave up on it. (I will go back and try the kernel driver again.)

Here is the list of problems and solutions that finally gave me a solid connection on the ASUS USB-N13 stick using DHCP from the gateway/router. (So I also do need to try a fixed IP address again.)

  1. “ifup wlan0” gets IPv6 address, but fails to get IPv4 address, possibly because firmware gives error on attempt to set Power Saver option. Workaround, as root: dhclient -4 wlan0
  2. Power Saver is active all the time and cannot be controlled from iwconfig. Workaround, as root: echo “options 8192cu rtw_power_mgnt=0 rtw_enusbss=0” >> /etc/modprobe.d/8192cu
  3. Routing table looses wlan gateway setting when DHCP lease expires. Workaround: On router-gateway give new leases very long lifetime.

I also have an older wireless PCI a/b/g adapter card on the same machine. When this card is the routing table default gateway device, it is not ejected from the routing table when its lease expires. The USB stick device does get ejected in the same circumstance.

Maybe that behavior is just unique to the two devices I have. Maybe not, given the amount of “USB Wireless not working” posts I have seen lately, with USB sticks now supporting N and IPv6.

Of course, I continue to need to apply my workarounds by hand on every PC reboot or gateway reset.

       -- Dan Connelly

I had that problem on my work system, back when I was running 11.3. I “fixed” it by switching to “dhclient” in place of “dhcpcd”.

It is normal for the connection to be reset when the lease expires. The “bug” is that the lease is expiring. It is supposed to be renewed before it expires.

Back on my work 11.3 system, I think it was because the DHCP server was on a different LAN segment, and accessible via a DHCP relay agent on the local router. Apparently, this confused the version of “dhcpcd”. I could see lease renewal attempts failing in the logs, and then the lease would expire after which it was able to acquire a new lease.

I’m not sure whether that will help you. I am not having problems with 12.2.