Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've a Debian system without UI, with a GPRS modem attached to it. Now, this system is connected with ethernet through a standard cable. I want to obtain a configuration that allows the computer to access internet via ethernet, if an ethernet cable is connected, otherwise use the GPRS to do so. Pratically speaking, I want the eth0 interface to be the preferable interface if it is on, ppp (only) if former isn't mounted.

How to obtain an easy /etc/network/interfaces configuration to achieve this?

Thanks!

share|improve this question

There are if-up.d /if-down.d directories in /etc/ppp/ . you should put there ifup\ifdown scripts to configure yours default gw.

share|improve this answer

Archedius, assuming your debian system has /sbin/ip help and /etc/iprout??/
iproute2 gives you the both a systemwide default gateway and a NIC/interface specific default gateway. It is called source based routing as opposed to destination based routing. The source in your case is the GPRS modem. PolicyRouting.org or download Alexey Kuznetsov's IP Command Reference.

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.