Pages

Welcome to My Blog

This is to share my IT experience with friends all around the world.
I have been working in Linux Fedora Systems for more than 8 years. Its fun to share knowledge and learn..
As everyone knows when a problem arises in your systems "googling" is the way that many depend on..

All the posts here are my working experiences during my working life.. So you can count on it..

I have added the references where I got help in solving IT issues


Monday, March 7, 2011

IP Route2 - Advanced routing for Linux

We can use a Linux box as a advanced routing device by using iproute2 features. We have used a gateway server cater 3 ISP Internet connections. It supports policy based routing, load balancing etc.

Good reference
http://www.linux-tutorial.info/modules.php?name=Howto&pagename=Adv-Routing-HOWTO/index.html
http://www.policyrouting.org/iproute2.doc.html

Useful commands
Create a table
/sbin/ip rule add from a.b.c.d/n table 200
Add routes
/sbin/ip route add x.x.x.x/n2 via gateway_of_eth0 dev eth0 table table_number
E.g.
/sbin/ip route add 10.168.0.0/24 via 192.168.8.30 dev eth2 table 200

Adding a default rule
/sbin/ip route add default via gateway_of_eth2 dev eth2 table 200

Display routing table
ip route show table table_name

No comments:

Post a Comment