You are not logged in.
Hoi,
My laptop is usually connected using WiFi, which works fine. When I dock the laptop (which has an ethernet cable plugged in) the laptop gets an IP on eth0 as well, which breaks all network connectivity. For example, existing SSH sessions just stop responding, until I pull the cable.
How can I fix this?
I'm using XFCE4 and NetworkManager. (testing)
Thanks in advance,
Offline
I think the problem is that NetworkManager generally prefers ethernet over WiFi and thus tries to route all traffic through eth0 as soon as you connect the cable.
I guess you could fix it by using your routing table to prefer the wireless connection over ethernet, but then you would have the problem the other way around. Use the route command to check your routing table and change it according to your setup.
route add default gw {IP-ADDRESS} {WIFI-INTERFACE}
Last edited by Ranmaru (2012-05-22 03:27:24)
Offline
I think the problem is that NetworkManager generally prefers ethernet over WiFi and thus tries to route all traffic through eth0 as soon as you connect the cable.
I guess you could fix it by using your routing table to prefer the wireless connection over ethernet, but then you would have the problem the other way around. Use the route command to check your routing table and change it according to your setup.
route add default gw {IP-ADDRESS} {WIFI-INTERFACE}
Yeah I was suspecting something like that. (route metric, perhaps). I just tried it now and my current connections are actually working. Now, the problem would be that if I open an SSH connection to a server over the LAN, then remove the laptop from the docking station, that'd break. I wonder if it's possible (perhaps with iptable rules?) to make all HTTP, HTTPS traffic go over LAN (if available), and prefer SSH on WiFi...
Wifi only
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default wifi 0.0.0.0 UG 0 0 0 wlan0
10.114.17.0 * 255.255.255.0 U 0 0 0 wlan0
Wifi + LAN
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default non-wifi 0.0.0.0 UG 0 0 0 eth0
10.36.60.0 * 255.255.255.0 U 0 0 0 eth0
10.114.17.0 * 255.255.255.0 U 0 0 0 wlan0
Offline