Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
It would be helpful to know what Ubuntu you are using. –  Ringtail Feb 21 '12 at 4:53

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

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.