Re: [LARTC] routing

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, so I think I understand this simple routing question.  I have
several internal subnets: 172.16.1.0/24, 172.16.2.0/24, etc.  I have 2
out-going network links:
1.1.1.1 and 2.2.2.2

So I can change the out-going route by using:
echo "100 link1" >> /etc/iproute2/rt_tables
ip rule add from 172.16.1.0/24 table link1
ip rule add from 172.16.2.0/24 table link1
ip route add default via 1.1.1.1 dev $EXTERNAL_INTERFACE table link1

echo "200 link2" >> /etc/iproute2/rt_tables
ip rule add from 172.16.3.0/24 table link2
ip rule add from 172.16.4.0/24 table link2
ip rule add from 172.16.5.0/24 table link2
ip route add default via 2.2.2.2 dev $EXTERNAL_INTERFACE table link2


and if I understand this correctly, this doesn't change anything in
iptables, so I can still this at the end of my firewall script.  I'll
also want to use SNAT and change the out-going IP's so they come back on
the correct link.  Look good?  I can't test this in production very
often, so before I do I thought I'd run it by everyone since I'm very
much a newbie on tc...

Thanks!
Dan




[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux