On 05/11/2011 01:12 PM, Ferry Huberts wrote: > Hi list/Dan > > Yesterday I by accident looked at the routing table of a Windows 7 laptop > with both ethernet and wlan connected and I saw something interesting: > > Both connections set up a default gateways in the routing table! > Each default gateway takes the metric of the connection to which it > belongs, so for for example for the ethernet a metric of 0, for the wlan a > metric of 100, etc. > > Which is quite logical in fact and made me wonder why we don't do that? > It seems obvious now that I've seen it done, or am I missing something? > > I've tested it on my F15 laptop and seems to work > > This would also make any code handling the default gateway go away! > You'd just need to clean up all entries belonging to the connection that's > going away, and not touch other routing entries :-) > > > Example routing table: > > Destination Gateway Genmask F Metric R U Iface > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 > 192.168.1.0 0.0.0.0 255.255.255.0 U 1000 0 0 wlan0 > 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 > 0.0.0.0 192.168.1.1 0.0.0.0 UG 1000 0 0 wlan0 >
I tested some ifdown/ifup combinations and currently it doesn't do the correct thing: - have both links up - have 2 default routes, like described above - ifdown eth0 - ifup eth0 - ifdown wlan0 ---> default gateway entry of eth0 is removed, no default gateway is left I think this is because NM is triggered from the CLI. I'm also seeing the default gateway for eth0 having a metric of 0 while the network route for eth0 has a metric of 1. This is a mismatch! Maybe either or both of these are the cause of things not working correctly currently. I'm guessing mostly the fact that NM is triggered being the cause. grtz -- Ferry Huberts _______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
