Showing posts with label client bridge. Show all posts
Showing posts with label client bridge. Show all posts

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




Wednesday, June 29, 2011

Wireless bridge mode on Netgear WNR2000 V2

Flashing netgear router WNR2000v2

1. do a hard reset with rest to factory defaults (“30/30/30” reset) on WNR2000v2 router (“router”). Check to see if defaults kicked in
2. Download “trailer” build for router. This is a version of DD-WRT specifically addressed to the router and will have the router name in it.
3. Disable compound TCP for windows Vista or newer
CTCP can be enabled with the command:
netsh interface tcp set global congestionprovider=ctcp
or disabled with the command:
netsh interface tcp set global congestionprovider=none
To display the current setting for CTCP use:
netsh interface tcp show global

E.g. (in admin cmd window):
C:\Windows\system32>netsh interface tcp show global
Querying active state...

TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Chimney Offload State : disabled
Receive Window Auto-Tuning Level : highlyrestricted
Add-On Congestion Control Provider : none
ECN Capability : disabled
RFC 1323 Timestamps : disabled

NOTE: remember to re-enable CTCP after setup is done

4. Disable wireless networking
5. Disable firewall and anti-virus
6. Use IE for uploading firmware
7. Once firmware is uploaded (wait 10 minutes), DD-WRT default login page shows up (use IE)
8. set password temporarily to login: root, pass: admin (to keep things simple. Change once setup is working)
9. Basic setup:
a. change IP address to 192.168.1.3
b. gateway: 192.168.1.1 (main router)
c. local dns: 192.168.1.1
d. Click APPLY settings
e. Relogin to router at 192.168.1.3

10. Change wireless settings
a. Client bridge mode
b. Wireless mode: G-ONLY (only for initial setup. Change later to GN or N-only as applicable)
c. SSID: put your ssid mynetwork
d. Network config: bridged
e. Remember to APPLY changes on each page as the settings change
11. Change wireless security
a. WPA personal
b. TKIP
c. Give private shared key (PSK)
d. NOTE: cannot use dynamic keys due to limitation of 802.11 protocols
e. Click APPLY
f.



30/30/30 reset: with the router on, press and hold reset switch for 30 seconds. DO NOT let go. Turn off the router power using the OFF switch, continue to press the reset switch for another 30 seconds. DO NOT LET GO. With the reset switch continually pressed, turn on the router power. Continue to keep the reset switch pressed for another 30 seconds. Wait about 2 minutes and log in to the router to check if reset took effect. You should be able to log in with the defaults.

Router default login: Netgear was thoughtful with the WNR2000v2: it provided an on-off switch at the back of the router. Also, they printed the default access credentials right on the back of the router:
http://www.routerlogin.net
login: admin
pass: password

references:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
http://www.dd-wrt.com/wiki/index.php/Installation#Is_Your_Router_Supported.3F
http://dd-wrt.com/phpBB2/viewtopic.php?p=446547#446547
http://en.wikipedia.org/wiki/Compound_TCP
http://www.dd-wrt.com/wiki/index.php/Settings#Disable_Compound_TCP

http://blog.chinthaka.org/2011/01/flashing-netgear-wnr2000-v2-with-dd-wrt.html