[CentOS] routing with 2 ISPs

David Hláčik david at hlacik.eu
Sun Dec 20 18:54:03 UTC 2009

Hello guys,

Sorry to bothering you.

I had a small network with one ISP and firewall.

eth1 -> Is connected to my ISP
eth0 + eth0.1 , eth0.2 and etc are my local networks.

All my network accesses internet via eth1.

My routing table looks like the following :   U     0      0        0 eth1   U     0      0        0 eth0   U     0      0        0 eth0   U     0      0        0 eth0.8   U     0      0        0 eth0.5   U     0      0        0 eth0.7   U     0      0        0 eth0.4   U     0      0        0 eth0   U     0      0        0 eth0.6     U     0      0        0 eth0.8         UG    0      0        0 eth1

Recently I have added secon provider via ADSL.

ADSL modem is connected via eth0.8 . Using adsl-setup I have created
ppp interface ppp0.

Now I want to achieve the following :

Computers from local network range (eth0.7) should
access internet using my second internet provider via ppp0.

I believe that for that I need to use advanced networking and iproute package.

I will add the second routing table named "adsl" and configure routing
via ppp0 there. Together with that i need to set in iptables , nat
table to masquerade all ips going out via ppp0.  I believe I need to
use ip command for this.

And the finally my questions are :

1) Is there a good tutorial / howto for using iproute on the internet,
except of the LARTC.org
2) Can i utilize by tools of CentOS, to have my configuration (with
second routing table, using ip ) somehow stored - to be permanent when
I will do machine restart? I mean there are networking-scripts
/etc/sysconfing/network-scripts which can handle, IP assigment,
virtual LANS, aliases even static routes. Can they handle advanced
routing as well?

Thank you milion times.

David Hlacik

More information about the CentOS mailing list