From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Niels Ole Salscheider" Date: Sat, 31 Dec 2005 10:08:00 +0000 Subject: [LARTC] Routing multiple conntections to the same ISP Message-Id: <000e01c60df2$167f8360$eeeea8c0@OLE> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0100898579==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============0100898579== Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01C60DFA.7843EB60" This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C60DFA.7843EB60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I have established two connections to the same ISP. After that ip route list showed this: 195.14.247.94 dev ppp0 proto kernel scope link src 81.173.141.207 195.14.247.94 dev ppp1 proto kernel scope link src 81.173.237.84 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.1 default via 195.14.247.94 dev ppp0 I want 192.168.0.2 to connect to the internet by ppp1 and all other computers to connect by ppp0. So I entered following commands in the shell: echo "1" > /proc/sys/net/ipv4/ip_forward iptables --table filter --policy FORWARD ACCEPT iptables --table mangle --append PREROUTING -s 192.168.0.2 --jump MARK --set-mark 4 ip rule add fwmark 4 table 4 Then I modified the main table and table 4, so that they looked like this: Server:~# ip route list 195.14.247.94 dev ppp0 proto kernel scope link src 81.173.141.207 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.1 default via 195.14.247.94 dev ppp0 Server:~# ip route list table 4 195.14.247.94 dev ppp1 proto kernel scope link src 81.173.237.84 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.1 default via 195.14.247.94 dev ppp1 an entered ip route flush cache in the shell. But after this, 192.168.0.2 could not connect to the internet anymore. What is wrong with my routing tables? Thanks, Ole ------=_NextPart_000_000F_01C60DFA.7843EB60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi,
 
I have = established=20 two connections to the same ISP. After that ip route list showed=20 this:
 
195.14.247.94 dev=20 ppp0  proto kernel  scope link  src=20 81.173.141.207
195.14.247.94 dev ppp1  proto kernel  scope=20 link  src 81.173.237.84
192.168.0.0/24 dev eth0  proto = kernel =20 scope link  src 192.168.0.1
default via 195.14.247.94 dev=20 ppp0
I want = 192.168.0.2=20 to connect to the internet by ppp1 and all other computers to = connect=20 by ppp0. So I entered following commands in the = shell:
 
echo "1" >=20 /proc/sys/net/ipv4/ip_forward
iptables --table filter --policy = FORWARD=20 ACCEPT
 
iptables=20 --table mangle --append PREROUTING -s 192.168.0.2 --jump MARK --set-mark = 4
ip rule add=20 fwmark 4 table 4
 
Then I modified the main table and table 4, so that they looked = like=20 this:
 
Server:~# ip=20 route list
195.14.247.94 dev ppp0  proto kernel  scope = link =20 src 81.173.141.207
192.168.0.0/24 dev eth0  proto kernel  = scope=20 link  src 192.168.0.1
default via 195.14.247.94 dev=20 ppp0
Server:~# ip route list table=20 4
195.14.247.94=20 dev ppp1  proto kernel  scope link  src=20 81.173.237.84
192.168.0.0/24 dev eth0  proto kernel  scope=20 link  src 192.168.0.1
default via 195.14.247.94 dev=20 ppp1
 
an entered ip=20 route flush cache in the shell.
 
But after=20 this, 192.168.0.2 could not connect to the internet=20 anymore.
 
What is wrong=20 with my routing tables?
 
Thanks,
 
Ole
------=_NextPart_000_000F_01C60DFA.7843EB60-- --===============0100898579== 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 --===============0100898579==--