Load Balancing !!!!!!! unsolved.

Taking care of your Linux box.
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Load Balancing !!!!!!! unsolved.

Post by abdul_mateen »

Asslam-u-Alikum,
About load balacning I have applied the techinique of larc maunal and some manual given here about iptables.But I canot get the result.

My senerio is I have two cable nets one is 10.10.0.x and gateway 10.10.0.1
Second 192.168.5.x and gateway 192.168.5.1

Now I have to combine these bandwidth but when I apply the

#ip ro add scope global nexthop via xxx.xxx.xxx.xxx dev xx weight 1 nexthop via xxx.xxx.xxx. dev xx weight 1
It only uses the firest router and not the second I have added the iptables firewall rules but no result at the end can anybody tell me the perfect solution to it through which I can get it to work.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
syedali999
Battalion Havaldaar Major
Posts: 252
Joined: Sun May 29, 2005 1:45 am
Location: Karachi
Contact:

Post by syedali999 »

do check out : Inlab's Balance
Thanks,
Regards


S. Asad Ali Rizvi
===================
Nomado Telecom
http://www.nomado.eu
alex[NoSpam]@nomado.eu
====================
LPI ID: LPI000102069
My blogs:
http://crea8ivefood.blogspot.com
http://actuarialsciencestudies.blogspot.com
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-u-Alikum,
I have checked it too.But I can not get it to work.Let me clear one thing I want to combine bandwidth of two not exaclty load balancing.I want that when I download the two connection's bandwidth is gained by me for example.

I have 10KB limit both sides. Now when I combine , I would get 20KB.

I have read that Load balancing and Combining bandwidth is some different things.

Thankx
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

i don't think you can combine bandwidth that way.
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear abdul_mateen,
Salam,

FYI, http://www.linuxpakistan.net/forum2x/vi ... t=15#19849

Best Regards.
Farrukh Ahmed
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-u-alikum,
Dear LinuxFreak,
I can't get the simple solution from that thread.Somone is saying that this might be possible some is saying can not.I am bit confuse.Can u redirect me to the exact post in that thread that can solve this.

Best Regards
Dr.AG
Adbdul Mateen.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

no matter how you set it up, if you start a download, the file you download will come down one of the two links. you won't get half the file from one link and half from the other.

you might be able to get around this problem if you use a downloader that opens multiple connections, but that's just for downloads with a downloader. if you click on a large file in a web browser, it'll download down one link, not both. if you're streaming audio or video, you're stuck to one link.
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-u-Alikum,
OK I have a download manager manking multiple connection but still it is not playing a good role it is not showing me even 18kb/s.Tell me some way that I can only make my downloading with the doubled speed.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear abdul_mateen,
Salam,
abdul_mateen wrote:OK I have a download manager manking multiple connection but still it is not playing a good role it is not showing me even 18kb/s.Tell me some way that I can only make my downloading with the doubled speed.
If you are too concern about your bandwidth then i suggest you to use Foundry Load Balancer which is Hardware based Load Balancer. It have many features.

FYI, http://www.foundrynet.com/products/app-switch/

Best Regards.
Farrukh Ahmed
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

abdul_mateen wrote:Asslam-u-Alikum,
OK I have a download manager manking multiple connection but still it is not playing a good role it is not showing me even 18kb/s.
what's it downloading at? 17.9?
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-uAlikm,
dear lambda,
If it were downloading at 17.9kbps I would be very great for me but it is only using one router to connect.

thankx
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-uAlikum
Ok I have found an alternative.As I have two connections Could it be possible that I configure one IP means 192.168.5.1 in Xen.and 10.10.0.1 in Dom0(debian) As I will use bridge.then configure my second ethernet as 192.168.5.2 and access it via gateway 192.168.5.1 as the internet would be running in Xen.

In this senerio bandwidth combining is possilbe? What should I use iptables or ebtables.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

you don't seem to understand the problem. look. all internet communication over ip depends on five things:

source address
source port (usually a random port on your system where the request is sent from)
destination address
destination port (which is port 80 for http, port 25 for smtp, etc)
protocol (tcp or udp, for most cases)

if you start a download from 10.10.10.5, your packets will go to your cable net provider's router, where by using nat, they're mapped to the source address of his external system (say, 202.125.140.10). the return packets, from the site you're downloading from, or viewing, will go back through the internet to 202.125.140.10, and the router or whatever it is will know that it has to send them back to you, at 10.10.10.5.

if you start a download from 192.168.5.5, your packets will go to your cable net provider's router, where by using nat, they're mapped to the source address of his external system (say, 203.68.12.126). the return packets, from the site you're downloading from, or viewing, will go back through the internet to 203.68.12.126, and the router or whatever it is will know that it has to send them back to you, at 192.168.5.5.

the web server you're talking to doesn't know that if it gets a packet from 202.125.140.10, it can reply to 203.68.12.126, or vice versa. so, how do you plan on sending your packets through one network and getting the replies from the other, or from both?

the best you can do is to use software that sends requests from the least loaded network connection. that's why using a downloader that opens multiple connections can make use of both links, because if your load balancing software is set up correctly, it'll send one request out one link, and one request out the other link. that is about the only way possible for you to download files and use both links. for everything else -- normal web browsing, audio/video chat/streaming, etc -- you're stuck to using one link per connection.
abdul_mateen
Battalion Havaldaar Major
Posts: 267
Joined: Tue Nov 18, 2003 10:28 am
Location: Rampuria Mansion
Contact:

Post by abdul_mateen »

Asslam-u-Alikum,
Dear lambda,
You are right I tried d4x and got the speed for only one link I got 18Kb only for one link.Let me make my point clear.I have tried to download slackware from mirror but still got the same speed 9KB but when I downloaded the debian I can get 18Kb what is the mattar with it.

Only for one link or url I can get the downloading speed 18Kb but for the others I have tried some I canot get it.

Can u tell me about that.
Abdul Mateen,
Google Android Developer & Linux Administrator
Addictive Mobility,CA
www.addictivemobility.com.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

what is your problem, really?

1. i have two links, but i can only use one to download files
2. i get high download speeds on one link for some sites, but low download speeds on the same link for other sites.

1 or 2, or both. which is it?

you started off by stating that #1 is the problem you want to solve, but now it appears as if you're talking about #2.
Post Reply