Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Debian GNU/Linux Reference Guide
Prev Home Next

10.12.2 Manage multiple net connections

[FIXME] Policy routing (by Phil Brutsche [email protected]): See the iproute manual for details. Traffic control (tc) may also be interesting.

Environment:

     eth0: 192.168.1.2/24; gateway 192.168.1.1
     eth1: 10.0.0.2/24; gateway 10.0.0.1
     No masquerading on this machine.

Special magic:

  • ip rule add from 192.168.1.2 lookup 1

  • ip rule add from 10.0.0.2 lookup 2

  • ip route add to default via 10.0.0.1 metric 0

  • ip route add to default via 192.168.1.1 metric 1

  • ip route add table 1 to 192.168.1.0/24 via eth0

  • ip route add table 1 to 10.0.0.2/24 via eth1

  • ip route add table 1 to default via 192.168.1.1

  • ip route add table 2 to 192.168.1.0/24 via eth0

  • ip route add table 2 to 10.0.0.2/24 via eth1

  • ip route add table 2 to default via 10.0.0.2

  • [FIXME] I've never done this. How to set up dialup as backup to a fast connection with autodial features? Please send me a patch here :)


    Debian GNU/Linux Reference Guide
    Prev Home Next


     
     
      Published under the terms of the GNU General Public License Design by Interspire