From: mangal regmi Date: Tue, 21 Aug 2007 10:43:08 +0000 Subject: [LARTC] two providers Message-Id: <330981.60268.qm@web50604.mail.re2.yahoo.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1583918923==" List-Id: References: <303673.2397.qm@web50604.mail.re2.yahoo.com> In-Reply-To: <303673.2397.qm@web50604.mail.re2.yahoo.com> To: lartc@vger.kernel.org --===============1583918923== Content-Type: multipart/alternative; boundary="0-266752722-1187692988=:60268" Content-Transfer-Encoding: 8bit --0-266752722-1187692988=:60268 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit many many thanks for ur help ok i m making my problem more clear... my LAN ip is :172.16.100.0/24 ip of eth1 is :202.51.78.122 and this is fixed and permanent address and it has no netmask and gateway(so, to provide internet to my LAN i have used the ppp0 for this connection ) ip of eth2 : 203.78.165.154; netmask:255.255.255.248; gateway:203.78.165.153 for eth0 my file is :/etc/sysconfig/network-scripts/ifcfg-eth0 for eth1 :/etc/sysconfig/network-scripts/ifcfg-eth1 for eth2:/etc/sysconfig/network-scripts/ifcfg-eth2 and my rules are placed in /etc/iproute2/rt_tables as suggested by lartc.org and the whole copy of my above file is copied below:::>>> # # reserved values # #255 local #254 main #253 default #0 unspec # # local # #1 inr.ruhep # # below this is added by me and above this is by default # two addational routing tables #ip route add 202.51.78.0/24 dev eth1 src ppp0 table T1 #ip route add default via ppp0 table T1 ip route add 203.78.165.0/24 dev eth2 src 203.78.165.154 table T2 ip route add default via 203.78.165.153 table T2 # main routing table ip route add 202.51.78.0/24 dev eth1 src ppp0 ip route add 203.78.165.0/24 dev src 203.78.165.154 # preference for default route ip route add default via 202.51.76.122 # routing rules ip rule add from ppp0 table T1 ip rule add from 203.78.165.154 table T2 # entries for local network ip route add 172.16.100.0/24 dev eth0 table T1 ip route add 203.78.165.0/24 dev eth2 table T1 ip route add 127.0.0.0/8 dev lo table T1 ip route add 172.16.100.0/24 dev eth0 table T2 ip route add 202.51.78.0/24 dev eth1 table T2 ip route add 127.0.0.0/8 dev lo table T2 #load balancing ip route add default scope global nexthop via ppp0 dev eth1 weight 1 nexthop via 203.78.165.153 dev eth2 weight 1 this above one is the full and exact copy of my working.... --------------------------------- Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. --0-266752722-1187692988=:60268 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit many many thanks for ur help
ok i m making my problem more clear...

my LAN ip is :172.16.100.0/24
ip of eth1 is :202.51.78.122  and this is fixed and permanent address
                and it has no netmask and gateway(so, to provide internet to my LAN i have used the ppp0 for this connection )
ip of eth2 : 203.78.165.154; netmask:255.255.255.248; gateway:203.78.165.153

for eth0 my file is :/etc/sysconfig/network-scripts/ifcfg-eth0
for eth1 :/etc/sysconfig/network-scripts/ifcfg-eth1
for eth2:/etc/sysconfig/network-scripts/ifcfg-eth2

and my rules are placed in /etc/iproute2/rt_tables as suggested by lartc.org
 
and the whole copy of my above file is copied below:::>>>


#
# reserved values
#
#255    local
#254    main
#253    default
#0      unspec
#
# local
#
#1      inr.ruhep

#
# below this is added by me and above this is by default
# two addational routing tables

#ip route add 202.51.78.0/24 dev eth1 src ppp0 table T1
#ip route add default via ppp0 table T1
ip route add 203.78.165.0/24 dev eth2 src 203.78.165.154 table T2
ip route add default via 203.78.165.153 table T2

# main routing table

ip route add 202.51.78.0/24 dev eth1 src ppp0
ip route add 203.78.165.0/24 dev src 203.78.165.154

# preference for default route

ip route add default via 202.51.76.122

# routing rules

ip rule add from ppp0 table T1
ip rule add from 203.78.165.154 table T2

# entries for local network

ip route add 172.16.100.0/24    dev eth0 table T1
ip route add 203.78.165.0/24    dev eth2 table T1
ip route add 127.0.0.0/8        dev lo   table T1
ip route add 172.16.100.0/24    dev eth0 table T2
ip route add 202.51.78.0/24     dev eth1 table T2
ip route add 127.0.0.0/8        dev lo   table T2

#load balancing
ip route add default scope global nexthop via ppp0 dev eth1 weight 1 nexthop via 203.78.165.153 dev eth2 weight 1

this above one is the full and exact copy of my working....





Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. --0-266752722-1187692988=:60268-- --===============1583918923== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1583918923==--