I am able to do the iphone usb tethering under ubuntu(11.10) which will be recognized as eth1 interface (I also have an eth0 internet connection).

What I want to do is, when the eth1 is up, I want to make it as the default gateway, and if eth1 is down, then return back to using eth0 as default gateway.

How can I make it happen?

  • It would be helpful to know what Ubuntu you are using. – Ringtail Feb 21 '12 at 4:53

I have done the exact thing you are wanting on my laptop only using a droidX running on android but the basis is the same. What you have to do is set up a bridge between your two interfaces so that they can share a single internet connection based on whichever one becomes active. This is done by utilizing the bridge_ports option that is part of the bridge-utils package in ubuntu. I have provided a link to show you how this is done in a few easy steps.

First install the bridge-utils PPA using the following command"

sudo apt-get install bridge-utils

Then follow this link to assist you in setting it up by modifying your /etc/network/interfaces file http://manpages.ubuntu.com/manpages/lucid/en/man5/bridge-utils-interfaces.5.html

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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