Ubuntu sets a wrong routing table if the router is switched off and on again:
Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0 192.168.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0
In order to get a correct route I have to manually delete the wlan connection and set it up fresh (as if I connect to that wlan the very first time); Ubuntu then asks me for the wlan password. And then I get the correct routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
However, it doesn't keep that routing table correctly. How can I force Ubuntu to automatically choose the proper route without having to manually delete the wifi connection each time?
I'm using Ubuntu 12.04 64-bit. Yes, I'm using DHCP. It's about the WiFi.
The Ethernet works, but WiFi always gets wrong routing tables. And it's definitely a Ubuntu bug, because on a fresh install it's like that. No matter if it's Ubuntu, Kubuntu or Xubuntu (I tried them all). Doesn't happen with other non-Ubuntu based distros. Also doesn't happen with Windows 7.
This bug was introduced with 11.04. Because I tried this version, too. Same problem. And I also tried version 10.04 then. With 10.04 the WiFi tables are correct and it works. As of version 11.04 routing tables are messed up.
Ubuntu messes up the routing tables when the router is switched off and on again. Then I have to delete the WiFi connection in the NetworkManager and set it up fresh in order to get a correct routing table again. As I said, it's purely an Ubuntu problem. No problems with other distros.