problem with multi gatway routing

Linux Advanced Routing and Traffic Control

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

 



hi,
i wann to make multigateway routing and i read ur how to on http://lartc.org/howto/lartc.rpdb.multiple-links.html and create some rules which i am sending u, but with this rules i am not able to do multigateway routing on my linux router so plz help me out.
thanks
the rules are given below

IF0=eth0
IF1=eth1
IF2=eth2
IP1=192.168.1.2
IP2=61.246.243.86
P1=192.168.1.1
P2=61.246.243.81
P1_NET=192.168.1.0/24
P2_NET=61.246.243.0/28
P0_NET=10.10.0.0/16

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.2 table T1
ip route add default via 192.168.1.1 table T1
ip route add 61.246.243.0/28 dev eth2 src 61.246.243.86 table T2
ip route add default via 61.246.243.81 table T2

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.2
ip route add 61.246.243.0/28 dev eth2 src 61.246.243.86

ip route add default via 192.168.1.1

ip rule add from 192.168.1.2 table T1
ip rule add from 61.246.243.86 table T2

ip route add 10.10.0.0/16     dev eth0 table T1
ip route add 61.246.243.0/28     dev eth2 table T1
ip route add 127.0.0.0/8 dev lo   table T1
ip route add 10.10.0.0/16     dev eth0 table T2
ip route add 192.168.1.0/24     dev eth1 table T2
ip route add 127.0.0.0/8 dev lo   table T2

ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1
     
echo 1 > /proc/sys/net/ipv4/ip_forward

IT=/usr/local/sbin/iptables
FO=FORWARD
IN=INPUT
OT=OUTPUT
PRE=PREROUTING
POST=POSTROUTING
MQ=MASQUERADE
######################## Flust all chains ##################################
/sbin/iptables -F FORWARD
/sbin/iptables -F OUTPUT
/sbin/iptables -F INPUT
/sbin/iptables -F -t nat
/sbin/iptables -F -t mangle

####################### Set the default policy #############################

/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P OUTPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT


/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.


Ring'em or ping'em. Make
PC-to-phone calls as low as 1¢/min with Yahoo! Messenger with Voice.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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