PDA

Bekijk de volledige versie : multiple pppoe connections (load balancing)



xection
27-01-2005, 23:54
I'm planing to double my LAN's Internet connection by using two pppoe connection from the same ISP. I just have to be sure that it can be done before I open second account...

I can kill all pppoe connections with:

killall -1 pppd
and I found out that I can connect to pppoe server with command:

pppoecd eth1 -u <username0> -p <password0> -o
which creates interface ppp0. So, my guess is if I run:

pppoecd eth1 -u <username1> -p <password1> -o
that would create ppp1. Right?

Can I use load balancing (using iptables) than? Actually, even split access satissfies my needs. Can someone help me with iptables setup? I guess that it's just a few lines of code.

thanx

Oleg
28-01-2005, 12:56
Look for iptables SNAT target and --to-source option.
But this would be a big pain with stock firmware.
Latest custom firmwares uses real pppd for pppoe. But this will also require bunch of manual work to be done.

xection
29-01-2005, 21:59
Is there a way to alter routing table, so 3 computers (on br0) would use ppp0, and other 3 would use ppp1? I don't see source IPs in routing table...

DeF
13-02-2005, 20:06
On the moment i am using 2 internet connections with my WL-500g. One is an adsl connection on my wan interface and the other is a Motorola Surfboard cable modem on my usb port. Both use DHCP to connect, so i don't have any experience with PPPoE. On the moment i have one computer on my Lan that must use the Cable connection and the rest use the ADSL connection.

To accomplish this i use the 'ip' utility from the iproute2 program and the advanced routing functionality from the Linux kernel. The iproute2 program is supplyed with Oleg's firmware but the 'ip' program is not enabled by default. To enable use the following patch:


--- gateway/Makefile.old 2005-01-21 16:45:15.000000000 +0100
+++ gateway/Makefile 2005-01-21 16:45:42.000000000 +0100
@@ -454,7 +454,9 @@

iproute2-install:
install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
+ install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
$(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
+ $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip

e2fsprogs-install:
install -D e2fsprogs/e2fsck/e2fsck.shared $(INSTALLDIR)/e2fsprogs/sbin/e2fsck

To enable advanced routing you should atleased enable the CONFIG_IP_ADVANCED_ROUTER and CONFIG_IP_MULTIPLE_TABLES kernel options( you might also want CONFIG_IP_ROUTE_FWMARK or others).

With the 'ip' program i made a new routing table with as default gateway the gateway of my cable isp. This is done by:

ip route add default via $GATEWAY dev eth3 table 200
To let a computer use the cable connection i add a new routing rule using the following command:

ip rule add from $CLIENT_IP table 200
all other computer's use the ADSL connection by default.

This is just a very basic setup. I'm still working on a more advanced setup. But at the moment i'm still busy hacking the firmware to get better support for two WAN interface's(If my ADSL connection is down the cable connection doesn't work too :( ). But you might have less trouble with this because you have just one physical interface. In the futher i also plan to use packet marking to make routing decision's so i can choose which connection to use depending on the type of service. Real load balancing will never be possible for me because i use 2 different ISP's so i can't help you with that....

If you didn't already read this you might wan't to look at: http://lartc.org/

mctiew
21-02-2005, 10:20
This is just a very basic setup. I'm still working on a more advanced setup. But at the moment i'm still busy hacking the firmware to get better support for two WAN interface's(If my ADSL connection is down the cable connection doesn't work too :( ).

I am also interested in this. I have also done the similar patching and in addition, a few other patches needed for concurrent load sharing ( vs split access). But my question here is :-

Why you said your ADSL connection is down the cable connection doesn't work too ?

Cheers