Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a bridge connection from my mobile phone connected via USB to my laptop running Ubuntu 12.04 to another computer connected via ethernet cable. The bridge thus connects usb0 and eth0. I set it up by typing following commands on my laptop:

$ ifconfig usb0 promisc up
$ brctl addbr br0
$ brctl addif br0 usb0 eth0
$ ifconfig br0 up

Now the other computer (connected to my laptop via ethernet) can connect to the internet. I now use following commands to restore the internet connection on my laptop:

$ ifconfig br0 up
$ route del default
$ route add default gw br0

After this operation, route prints the following kernel ip routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 br0
link-local      *          U     1000   0        0 usb0    *        U     0      0        0 br0    *        U     1      0        0 usb0

Everything works fine, both computers can connect to the internet, but then suddenly my laptop looses the connection.

I found that this happens because the kernel ip routing table was modified. route now gives following output:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 usb0
link-local      *          U     1000   0        0 usb0    *        U     1      0        0 usb0

Apparently Ubuntu does not like to be connected via br0 and thus switches back to usb0. The connection can be restored though, by again resetting the route table:

$ route del default
$ route add default gw br0

Unfortunately, after a few moments the connection is lost again. Once it would even last for 5 minutes before Ubuntu decided to kill it again.

How can I prevent Ubuntu from modifying the kernel ip routing table?

share|improve this question
Ok, I finally found a solution. Unfortunately I do not have enough reputation to post it immediately, as an answer. askubuntu told me I will have to wait for 8 hours before I can answer my own question. Once this delay is over I will post my solution. – kassiopeia Mar 4 '13 at 11:14
up vote 2 down vote accepted

Ok, in case anyone else has the same problem, here is how I solved it: I simply disabled the network manager by typing following command:

$ stop network-manager

Note that the network manager clears the routing table and brings down all connections before it exits, so you have to bring back up all interfaces that you need.

I had to additionally type following commands for my bridge to work again:

$ ifconfig usb0 up
$ ifconfig eth0 up

Further I needed to edit /etc/resolv.conf to get address resolution back to work. I added following lines, which sets the Google DNS servers as nameservers:


Now everything works as expected, both computers have internet connection.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.