Thursday, January 2, 2014

Woes of dual-booting and DHCP NACK on Linksys E2500

I recently upgraded my main router to the Linksys E2500. Overall, I've been quite pleased with the router's performance, and while I haven't logged enough time yet to observe all its behavior quirks, I did notice something strange on my dual boot machine.

My linux server dual boots between Linux (primary) and Windows XP. Each time I change from Windows to Linux, I find that the machine doesn't have any network connectivity. Initially I suspected my client-bridge, but it looks like the isn't the client bridge, but DHCP (still haven't figured out if it is the DHCP server in the Linksys E2500, or the DHCP client implementation in Linux, or the DHCP client in Windows XP, or some packet munging but in the client-bridge).

Each time I boot into Linux, the network interface is brought up during boot (per the instruction in /etc/network/interfaces). Usually this works just fine, but IF I had been running Windows XP prior to booting into Linux, it seems that the DHCP server on the Linksys sends a DHCP NACK causing the DORA to kick-in. Funnily, after the first NACK, the DHCP server stays silent to all subsequent requests resulting in loss of connectivity on the Linux box. Windows XP doesn't seem to suffer from this if I reboot into Windows.

Once the workaround below is implemented, subsequent DHCP requests from Linux keep working till I boot into Windows and back to Linux.

Work arounds:

a) setup Linux network interface manually
b) delete the DHCP address entry for the Linux tower from the router's DHCP clients table
c) run dhclient on the Linux tower to renew DHCP lease

Setting up linux interface manually

sudo ifconfig eth0 up address 192.168.1.101/24
sudo echo nameserver 75.75.75.75 >> /etc/resolve.conf
sudo dhclient -v eth0

the -v in the dhclient causes debug verbose information to be printed to the screen during the DHCP request / discovery process.

Deleting the DHCP address entry is accomplished as below:
a) log into the router
b) Status | DHCP clients table
c) delete DHCP entry
d) save settings

running dhclient
sudo dhclient -v eth0

confirm that /etc/resolv.conf has been updated

Further research to determine if the issue is in the router or windows, or linux or the dd-wrt client-bridge:

a) run wireshark to examine the DHCP request packet from Windows and see if it is different from the one in Linux. E.g. if net mask is different, but requested address is the same, then DHCP server might think that the address was assigned by another
b) connect the Linux tower directly to the Linksys E2500
c) switch out the client-bridge for another
d) check with other dual-boot systems if the same thing is happening

background reading:
http://support.microsoft.com/kb/169289
http://support.microsoft.com/kb/167014




1 comment:

kage said...

this seems to be happening to others as well, so looks like this is a confirmed issue with Linksys E2500

http://community.linksys.com/t5/Wireless-Routers/E2500-router-DHCP-issue-with-dual-boot-system-Win7-and-Linux/td-p/675354