Wired network static IP default route won't save correctly in Ubuntu 9.10
In Ubuntu 9.10, when configuring a default route under "System > Preferences > Network Connections > Wired > Auto eth0 > Edit > IPv4 Settings > Routes" it does not always work right. Sometimes the route just doesn't show up. Sometimes it does show up but the gateway is set to 0.0.0.0 (just like a local LAN would be). When it didn't show up, the entry was lost from the "Routes" submenu. When it did show up wrong, it was in that submenu correctly (so it seems it merely configured the network wrong).
I got it to work accidentally by a means that doesn't seem right. When I manually configured the ethernet interface with "ifconfig" and set the route with "route add", everything works ... for a while. Then the network connection goes away. Apparently the network manager in Gnome decided to "refresh" the system from what it thought were appropriate settings. It even did this when it thought the network should be done (by taking it down).
But here's what made it work. I did the manual config complete with the default route while the network manager believed the network was up. I went into "System > Preferences > Network Connections > Wired > Auto eth0 > Edit > IPv4 Settings > Routes" and added nothing (nothing was there) and clicked "OK". Then in "Editing Auto eth0" I clicked "Apply". The effect should have been to change nothing. However, NOW it seems the default route is present (and stays even over a reboot). It seems the route actually had to be in the kernel's route table for it to get saved, and the network manager or the network configuration tool would not set it. Yet it seems to have saved it from there.
OK, the LAN configuration does have a Gateway entry, and that is set to the default gateway. Is that really supposed to be a default route shortcut? It still didn't work even with that set (to the same gateway).
Note that there is nothing wrong with the network or the kernel since manual configuration with the command line tools works exactly as expected. It's the GUI tool that seems to be getting things confused (or some other tools it might be using, such as saving the configuration information wherever it saves it).
This happened on 3 different machines, all running Ubuntu 9.10 64-bit.
|