LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2005, 02:41 PM   #1
mailmaldi
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 0
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.
 
Old 08-21-2005, 02:33 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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...)
 
Old 08-21-2005, 04:12 PM   #3
mailmaldi
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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....
 
Old 08-24-2005, 01:04 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
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.
 
Old 08-24-2005, 01:39 PM   #5
mailmaldi
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
ppp0 = 221.128.50.1

ppp1 = 221.128.50.55

ppp2= 221.128.50.175

since all these are via pppoe...they all pass packets thru 221.165.128.66 which is my dns server...
 
Old 08-25-2005, 04:07 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
So theya re your $P1 and so on.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
outbound web traffic load balancing across multiple nics univaco Linux - Networking 5 01-21-2009 01:25 PM
Multiple Connections with OpenBSD and PF IMNOboist Linux - Networking 0 04-29-2005 11:34 PM
Load balancing across two internet connections? mlg9000 Linux - Networking 3 03-14-2005 10:00 AM
Load Balancing 2 Internet Connections LinuxGeek Linux - Networking 3 01-16-2005 04:15 AM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration