View Single Post
  #8  
Old 13th May 2008, 11:46
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

By default you have one routing table which you can see by running the command

Code:
ip ro sh
Now because you want to do policy based routing you need a second table which i have named table 4 it can be any other number or you can make it a label by adding the mapping to /etc/iproute2/rt_tables.

We have the relevant routes to handle the traffic in this second table.

Then to force the traffic to use the table we use the fwmark rule with works hand in hand with iptables marking in the mangle table. There other ways to specify rules.

To get all the details on how advanced routing on linux works look at
Code:
man ip
And read these sites.
http://lartc.org/howto/
http://www.linux-foundation.org/en/Net:Iproute2
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote