From: Arman Date: Tue, 04 Sep 2007 17:55:17 +0000 Subject: [LARTC] Re: 2 ISP connection sharing problem Message-Id: <13c1e7670709041055t4be18ac9qfa35fc8844b112a4@mail.gmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1586678028==" List-Id: To: lartc@vger.kernel.org --===============1586678028== Content-Type: multipart/alternative; boundary="----=_Part_14587_13770344.1188928517249" ------=_Part_14587_13770344.1188928517249 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I am now testing on a simplest scenario. I have an ip 192.168.3.5 on intranet. I want to route it through ISP1. All other traffic will go through ISP2 which is default gateway on machine so I dont need to add any rule for that. I have executed following commands ---- echo 150 ISP1 >> /etc/iproute2/rt_tables ip rule add from 193.168.3.5/32 to 0.0.0.0/0 table ISP1 ip route add default via 192.168.1.1 table ISP1 ip route flush cache ---- Following is the tables state [root@localhost ~]# ip rule list 0: from all lookup local 32764: from 193.168.3.5 lookup ISP1 32765: from 193.168.3.5 lookup ISP1 32766: from all lookup main 32767: from all lookup default [root@localhost ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.3.0 * 255.255.255.0 U 0 0 0 eth0 203.81.198.0 * 255.255.255.0 U 0 0 0 eth2 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 default 203.81.194.24 0.0.0.0 UG 0 0 0 eth2 [root@localhost ~]# ip route list table ISP1 default via 192.168.1.1 dev eth1 system is natted. I have checked for ip 192.168.3.5 but this is still from default gateway. Not going my settings. Internet is working for 192.168.3.5 but through ISP2. Will I have to do something with main table? -- Regards, Arman ------=_Part_14587_13770344.1188928517249 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all,
      I am now testing on a simplest scenario. I have an ip 192.168.3.5 on intranet. I want to route it through ISP1. All other traffic will go through ISP2 which is default gateway on machine so I dont need to add any rule for that. I have executed following commands
----
echo 150 ISP1 >> /etc/iproute2/rt_tables
ip rule add from  193.168.3.5/32 to 0.0.0.0/0  table ISP1
ip route add default via 192.168.1.1  table ISP1
ip route flush cache
----
Following is the tables state

[root@localhost ~]# ip rule list
0:      from all lookup local
32764:  from 193.168.3.5 lookup ISP1
32765:  from 193.168.3.5 lookup ISP1
32766:  from all lookup main
32767:  from all lookup default

[root@localhost ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     *               255.255.255.0   U     0      0        0 eth0
203.81.198.0    *               255.255.255.0   U     0      0        0 eth2
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         203.81.194.24   0.0.0.0         UG    0      0        0 eth2

[root@localhost ~]# ip route list table ISP1
default via 192.168.1.1 dev eth1

system is natted.

I have checked for ip 192.168.3.5 but this is still from default gateway. Not going my settings. Internet is working for 192.168.3.5 but through ISP2. Will I have to do something with main table?

--
Regards,
Arman
------=_Part_14587_13770344.1188928517249-- --===============1586678028== 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 --===============1586678028==--