route troubles -- please help

Tom H tomh0665 at
Sun Feb 21 00:34:32 UTC 2010

> I am using a laptop on both a wireless network and a wired network. It would be
> nice, I thought, to have two different names for it. So I changed the hostname
> just before bringing it up... BAD BAD! I have got the hostname back where it
> should be. However, I have no routes, at boot and can not get to my wired
> network. What should I do to get things back together?

> I have tried adding the routes manually and route -n shows them correctly. But
> the network is still unreachable, even after stopping & starting networking. Of
> course, when I reboot after adding the routes they go away again. Are they not
> kept somewhere in a file that I can edit or configure?

If you are configuring your nics with Network Manager, you have to set
your routes through its GUI (System-Preferences-Network Connections)

If you are configuring your nics with /etc/network/interfaces, add

up route add [-net|-host] <net|host>/<mask> gw <ip> dev <interface>
post-up route add [-net|-host] <net|host>/<mask> gw <ip> dev <interface>
down route del [-net|-host] <net|host>/<mask> gw <ip> dev <interface>
post-down route del [-net|-host] <net|host>/<mask> gw <ip> dev <interface>
to it

or create a route upstart job or a route init script

More information about the ubuntu-users mailing list