Balancing multiple connections over same interface
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Balancing multiple connections over same interface
i have 3 accounts(each bandwidth limited) with my isp to which i connect thru the same NIC(eth0) & they are connected as ppp0,ppp1,ppp2.
i get 3 global ip's via these connections.
so i think i ve a DHCP server to which i connect via pppoe...
i want to aggregate(balance) these multiple connections....
i read around a bit & used the following command to balance...
>>>ip route del default
>>> ip route add default scope global nexthop via 221.165.128.66 dev ppp0 weight 1 nexthop via 221.165.128.66 dev ppp1 weight 1 nexthop via $P2 dev ppp2 weight 1
where 221.165.128.66 is my server...
as from : h ttp://lartc.org/howto/lartc.rpdb.multiple-links.html
but theres hardly any balancing going on.....
can someun help me heer.....
also this site h ttp://lartc.org/howto/lartc.rpdb.multiple-links.html
defines some parameters...can someun temme wat the parameter $P1_NET is????
Let us first set some symbolical names. Let $IF1 be the name of the first interface (if1 in the picture above) and $IF2 the name of the second interface. Then let $IP1 be the IP address associated with $IF1 and $IP2 the IP address associated with $IF2. Next, let $P1 be the IP address of the gateway at Provider 1, and $P2 the IP address of the gateway at provider 2. Finally, let $P1_NET be the IP network $P1 is in, and $P2_NET the IP network $P2 is in.
You should do it in a bit different way. You have three interfaces (ppp0,1 and 2) and they have IPs assigned to them. One may have the one your mentioned, but there are three differnet ones. Let's say they're 192.168.1.1, 192.168.1.2 and 192.168.1.3 (unlikely, but that's just an example).
So you have:
Code:
$P1=192.168.1.1
$IF1=ppp0
$P1=192.168.1.2
$IF1=ppp1
$P1=192.168.1.3
$IF1=ppp2
ip route add default scope global nexthop via $P1 dev $IF1 weight 1 \
nexthop via $P2 dev $IF2 weight 1 \
nexthop via $P3 dev $IF3 weight 1
$P1_NET in the orginal script is your provider subnet mask (192.168.1.0 in the example above for all interfaces -- what will probably make it all crash...)
well in my case since i ve the 3 accounts with the same ISP....$P1=$p2=$P3=221.165.128.66
& there is hardly any balancing(if at all)....
on my windowsXP, i get increased down speed using IDM....here i connect 1, start the download the n start another.... since IDM splits the file into many parts...a different part gets started downloading from this connection & then i connect 3rd & thus the 3 are balanced....
but this balancing as u can see has severe disadvantages...no upload balancing & no balancing at all for any other application than IDM..
in linux i cant even do this...cuz the balancing is not present at all...the script gives me no added upspeed or downspeed...
this is ip routing table after the script
[root@maldi ~]# ip route list
221.165.128.66 dev ppp0 proto kernel scope link src 221.128.50.1
221.165.128.66 dev ppp1 proto kernel scope link src 221.128.50.55
221.165.128.66 dev ppp2 proto kernel scope link src 221.128.50.175
169.254.0.0/16 dev eth0 scope link
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.3.162
default equalize
nexthop via 221.165.128.66 dev ppp0 weight 1
nexthop via 221.165.128.66 dev ppp1 weight 1
nexthop via 221.165.128.66 dev ppp2 weight 1
this is correct but unfortunately no balancing....
Originally posted by mailmaldi well in my case since i ve the 3 accounts with the same ISP....$P1=$p2=$P3=221.165.128.66
I think you're just taking the wrong IP. You need to use the ones associated with the interfaces. Do you really have the same IP in results from all 'ifconfig ppp0', 'ifconfig ppp1' and 'ifconfig ppp2'? The same IP makes it impossible for your ISP to distinguish between them and create correct routing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.