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

Re: Multiple ISP's and traffic shaping

On Fri, 2003-05-23 at 11:44, Bastian Winkler wrote:
> hi,
> it should work if you if you use iproute and iptables. 
> add ISP0 and ISP1 to /etc/iproute2/rt_tables
> make a default route for each table:
> ip route add default via $ISP0 table ISP0
> ip route add default via $ISP1 table ISP1
> then let your linux-box know when to use the tables:
> ip rule add fwmark 1 table ISP0
> ip rule add fwmark 2 table ISP1
> now it should route packages marked with '1' through ISP0 and packages
> marked with '2' through ISP1. 
> you can mark packages with iptables now. e.g.
> iptables -t mangle -s $DMZ -j MARK --set-mark 2
> note: in some cases i had to use additional SNAT with iptables to send
> the packages with the correct sourceip. 
> iptables -t nat -A POSTROUTING -m mark --mark 2 -j SNAT --to-source
> $ISP1-IP
> perhaps it helps for you. 

I will try this sollution 
It sound like a winner ;)

Maurice Lucas

Reply to: