Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-15-2005, 02:47 AM
|
#1
|
Member
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157
Rep:
|
Bonding two internet connections
Hi all,
I have 2 broadband connection at my office. I just want to know how can I "bond" these two together. I have read of ethernet bonding. How am i do that? Can anyone give simple network diagram to achieve this.?
Thanks in advance.
|
|
|
08-15-2005, 02:54 AM
|
#2
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492
Rep:
|
You need a special router for this. While this is not too hard, they are rather expensive i believe. That said maybe some has built a linux box to do this instead? I suppose if you had a linux box with 2 NICs on the internet side and one on the LAN side, you could use linux to load balance etc...
Anyone done this, as it is of interest to me?
|
|
|
08-16-2005, 12:59 AM
|
#3
|
Member
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157
Original Poster
Rep:
|
thanks for the reply. I have searched for the answer and i got this :
3 NICs for the Linux server. 2 of them to connect to the internet. 1 to connect to LAN.
I have 2 broadband connections with the same ISP. ethernet bonding can be done with these two.
My configuration:
eth0 -- xxx.xxx.xxx.xxx (public ip) <-- to ISP
eth1 -- aaa.aaa.aaa.aaa (private ip) <-- connected to LAN
eth2 -- yyy.yyy.yyy.yyy (public ip) <-- to ISP
Code:
modprobe bonding mode=0
ifconfig eth0 down
ifconfig eth2 down
ifconfig bond0 ??????????? up
ifenslave bond0 eth0
ifenslave bond0 eth2
what ip should i use for the bonding device. private ip or public ip?
|
|
|
08-16-2005, 07:59 AM
|
#4
|
Member
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384
Rep:
|
hi,
you should use a public IP, but i don't think you'll be able to use the IP given by your first provider on the link to the second one.
i think that so as to use bonding, both your machine AND the network equioement on which it is connected must be configured for bonding... which won't be the case since you'll have trouble to have your 2 ISP agree on that 
maybe you should have a look at multi-homing (or load balancing between 2 ISP), here's an howto: http://lartc.org/howto/lartc.rpdb.multiple-links.html
(give a try with bonding prior to looking at loadbalancing, since it's much more easy... but i would be _greatly_ surprised if it worked).
good luck
|
|
|
08-16-2005, 11:44 AM
|
#5
|
Member
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157
Original Poster
Rep:
|
thanks buddy. I'll take a look at it and see whether it will work. 
|
|
|
08-17-2005, 09:15 AM
|
#6
|
Member
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157
Original Poster
Rep:
|
let's say i have 2 default gateways. meaning that the 2 gateways are the link to the two providers that i have.
route add default gw jjj.jjj.jjj.jjj
route add default gw kkk.kkk.kkk.kkk
When I connect to the internet, which route the packets will go through? I noticed that the two modems were blinking when I connected to the internet.
Can I use this command to load-balance the connection?
ip route add default scope global nexthop via jjj.jjj.jjj.jjj dev eth0 weight 1 nexthop via kkk.kkk.kkk.kkk dev eth2 weight 1
|
|
|
08-19-2005, 10:42 AM
|
#7
|
Member
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157
Original Poster
Rep:
|
hi all,
After several days of hard work, my work has come to a dead end. the command ip route stated above when run produced error. I have no clue what caused this but i think i have to make a table T1 and T2. How to add these tables in /etc/iproute2/rt_tables? as stated in this link : http://lartc.org/howto/lartc.rpdb.multiple-links.html
anyone please?
|
|
|
All times are GMT -5. The time now is 08:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|