From mboxrd@z Thu Jan 1 00:00:00 1970 From: bert hubert Date: Tue, 25 Dec 2001 12:16:48 +0000 Subject: Re: [LARTC] routing Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Mon, Dec 24, 2001 at 10:58:14PM -0600, Daniel Wittenberg wrote: > 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 Looks good. > 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... We use a combination of SNAT/DNAT, MASQ, CBQ, iptables AND Policy routing in production, and it all works fine. Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk Netherlabs BV / Rent-a-Nerd.nl - Nerd Available - Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/