LinuxQuestions.org
Visit Jeremy's Blog.
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-15-2005, 02:47 AM   #1
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
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.
 
Old 08-15-2005, 02:54 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492

Rep: Reputation: 50
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?
 
Old 08-16-2005, 12:59 AM   #3
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
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?
 
Old 08-16-2005, 07:59 AM   #4
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
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
 
Old 08-16-2005, 11:44 AM   #5
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
thanks buddy. I'll take a look at it and see whether it will work.
 
Old 08-17-2005, 09:15 AM   #6
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
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
 
Old 08-19-2005, 10:42 AM   #7
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Internet connections.. xmeson Slackware 1 08-22-2004 07:49 AM
Internet connections apffal Mandriva 0 03-10-2004 06:44 AM
two internet connections Santas Linux - Networking 4 02-06-2004 11:06 AM
Two possible connections to the Internet? vincebs Linux - Networking 3 01-21-2004 05:40 PM
Internet connections on LAN dalraidia Linux - Networking 1 02-17-2003 05:35 PM

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

All times are GMT -5. The time now is 08:37 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