Skip to contentSkip to conversation

Multiple ADSL link

LARTC Jerome Kerdreux 2 participants 5 messages Jul 11, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,

It's my first post on this list, i'm not a ip route / qdisc guru, and have a awfull english. So if i may say something stupid ...

In fact i got a problem with my ISP(s) .

I have 2 ISP / 2 DSL Modem / 3 nic / on my firewall and something like 20 computers behing it.

      20 machines with 192.168.0.xxx/16 private IPs
                       |
                       |
                       |eth2 (192.168.0.1)
              ===========
              |     Linux 2.4.18   |
              ===========
                 |eth0         |eth1
                 |             |
                 |             |
                 |             |
               ppp0           ppp1
               (IP1)          (IP2)

Notation :

provider 1 :
IF1="ppp0" # interface
IP1="xxx.xxx.xxx.xxx" # ip of if1
P1="xxx.xxx.xxx.1" # gateway ip
P1_NET="xxx.xxx.xxx.0" # network

provider 2 :
IF2="ppp1"
IP2= ...
P2= ...
P2_NET= ...

eth0 and eth1 have no ip there are only used for the ppp

Now I can only use 1 provider at the same time
cause I can't route them.

As said before I want to use the provider at the same time without distinction.(Perhaps I will look at a way to have stmp / dns / ssh on one ppp and ftp / http on the other but i gonna try w/ a simple thing before )

I tried several things like the teql module.
http://lartc.org/howto/lartc.loadshare.html
but I still have the same pb. the teql module
is loaded but outgoing packet don't know the
way to go out (I think)

So yesterday i try w/ load balancing way
http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN284
(multipath in fact)

I figured out how to have ppp0 and ppp1 used at the same time the ppp0 doesn't transmit anything. only some udp 6 (really strange)
Another thing I don't really understand if I need to use the Split Access (previous in the howto).

This section isn't really clear for my awfull english and isn't transalted in the french howto.

Does I need to add something else than

ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1

And the next question is how can I NAT this traffic cause I don't have only one IF but 2 ? (with teql I is easy .. but don't work for me) ..

Thanks for any help.

------------------------
Jerome Kerdreux aka SoaF

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Today, mahhy a écrit:

m>On Thu, 11 Jul 2002, Jerome Kerdreux wrote:
m>> ip route add default scope global nexthop via $P1 dev $IF1 weight 1 m>> nexthop via $P2 dev $IF2 weight 1

m>I havent looked at the LARTC HOWTO in depth yet, but I believe you are m>wanting to implement Equal Cost Multipath Routing. ECM allows for m>*outgoing* traffic to be load-balanced across multiple ISP connections. m>
m>There is some good information in the Advanced Routing HOWTO on m>http://www.linuxdoc.org, I suggest you read that as well.
m>
m>Here is the general script I use to implement ECM, you will have to edit m>it for your own values (different interface names, IP addresses, gateway m>addresses, etc):
m>

m>  /sbin/ip rule add from <IP Num 1> table 124
m>  /sbin/ip rule add from <IP Num 2> table 120
m>  /sbin/ip route add default via <IP-GW Num 1> dev eth0 table 124
m>  /sbin/ip route add default via <IP-GW Num 2> dev ppp0 table 120
m>  /sbin/ip route delete default
m>  /sbin/ip route add default scope global nexthop via <IP-GW Num 1> dev

m>eth0 nexthop via <IP-GW Num 2> dev ppp0
m> /sbin/ip route flush cache
m>
m><IP Num 1> is the first IP address on my Linux Router m><IP Num 2> is the second IP address on my Linux Router m><IP-GW Num 1> is the first IP address's default Gateway m><IP-GW Num 2> is the second IP address's default Gateway m>
m>replace them with appropriate values for your system.

Oh thanks Mahhy I test that :)

Here is what I test :

/sbin/ip rule add from <IP Num 1> table T1
/sbin/ip rule add from <IP Num 2> table T2
/sbin/ip route add default via <IP-GW Num 1> dev ppp0 table T1
/sbin/ip route add default via <IP-GW Num 2> dev ppp1 table T2
/sbin/ip route delete default
/sbin/ip route add default scope global nexthop via <IP-GW Num 1> dev ppp0 nexthop via <IP-GW Num 2> dev ppp1 /sbin/ip route flush cache

but I still have the same pb
===================================================================
ip route:
194.206.78.3 dev ppp1 proto kernel scope link src 62.212.102.172 80.15.151.1 dev ppp0 proto kernel scope link src 80.15.151.117 192.168.0.0/16 dev eth2 proto kernel scope link src 192.168.0.1 default

        nexthop via 80.15.151.117  dev ppp0 weight 1 dead
        nexthop via 62.212.102.172  dev ppp1 weight 1

===================================================================

ppp0 seems to be detected as dead.

So all the trafic go throught ppp1 and only get this on ppp0
===================================================================
tcpdump -i ppp0:
15:50:22.786991 80.24.174.28.1073 > 80.15.151.117.4665: udp 6 15:50:22.787074 80.15.151.117 > 80.24.174.28: icmp: 80.15.151.117 udp port 4665 unreachable [tos 0xc0]
15:50:36.917769 62.178.40.99.1275 > 80.15.151.117.4665: udp 6 15:50:36.917855 80.15.151.117 > 62.178.40.99: icmp: 80.15.151.117 udp port 4665 unreachable [tos 0xc0]
15:50:37.446685 217.235.251.61.2588 > 80.15.151.117.4665: udp 6 15:50:37.446767 80.15.151.117 > 217.235.251.61: icmp: 80.15.151.117 udp port 4665 unreachable [tos 0xc0]
===================================================================
all the trafic i get it that :(

Another thing is that when I drop all the route and just put ppp0 as default route. this interface works well . this sound really strange.

Any body have a idea ?

I put the list in Cc: too :)

/Thanks

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Jerome Kerdreux

Hello,

Quoted 5 lines · Jerome Kerdreux

default

        nexthop via 80.15.151.117  dev ppp0 weight 1 dead
        nexthop via 62.212.102.172  dev ppp1 weight 1

=================================>
ppp0 seems to be detected as dead.

This bug is fixed in iproute2 package from this year.
Fetch the latest archive.

Regards

--
Julian Anastasov <[email protected]>

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

author
#3 lore raw
In reply to Jerome Kerdreux
Quoted 5 lines · Julian Anastasov

Hello,

On Thu, 11 Jul 2002, Jerome Kerdreux wrote:

Quoted 8 lines
Quoted 5 lines

default

        nexthop via 80.15.151.117  dev ppp0 weight 1 dead
        nexthop via 62.212.102.172  dev ppp1 weight 1

=================================> >
ppp0 seems to be detected as dead.

This bug is fixed in iproute2 package from this year.
Fetch the latest archive.

(Please add this in the Howto . I spent a couple of hours to find that)

Ok thanks .. I miss this bug fix . and gonna try this tomorrow.

so the nex question is :
How could i NAT my local traffic throught this 2 ppp I usually do that w /

$IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

but this assume you have only one not two :))

Thanks again all for the help. :)

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#4 lore raw
In reply to Jerome Kerdreux

Hello,

Quoted 5 lines · Jkx
Quoted 2 lines

This bug is fixed in iproute2 package from this year.
Fetch the latest archive.

(Please add this in the Howto . I spent a couple of hours to find that)

Always use the latest software in such situations, the
HowTo is not a changelog :)

Quoted 3 lines

so the nex question is :
How could i NAT my local traffic throught this 2 ppp I usually do that w /

Check this URL:

http://www.linuxvirtualserver.org/~julian/#routes

and read some docs and the included examples. Then
you will be able to build correct routing rules for your setup.

Regards

--
Julian Anastasov <[email protected]>

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/