LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-29-2007, 08:09 AM   #1
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Rep: Reputation: 15
Question Bonding / Binding multiple interface into 1


Dear Network Gurus,
I have in real problem, to setup Binding of 4 interfaces, please help me in this problem.

I have 4 DSL modems connected with 4 different ISP's my scenario is

a) My FC-2 machine with LAN eth4 IP=192.168.10.1 and Bond0 IP=192.168.1.1
b) Modem-A LAN IP= 192.168.1.2(connected to FC-2 Bond0's eth0), & ext IP=xxx.xxx.xxx.xxx
c) Modem-B LAN IP=192.168.1.3(connected to FC-2 Bond0's eth1), & ext IP=xxx.xxx.xxx.xxx
d) Modem-C LAN IP=192.168.1.4(connected to FC-2 Bond0's eth2), & ext IP=xxx.xxx.xxx.xxx
e) Modem-D LAN IP=192.168.1.5(connected to FC-2 Bond0's eth3), & ext IP=xxx.xxx.xxx.xxx

Modem-A, B, C, and D LAN connected with my FC-2 machine, and all 4 interfaces of my machine are in Bond0,
Now please help me what default Gateway I should set in my FC-2 machine?>???
or I have to set 4 gateways in my machine??
and most important question is:
Will this configuration works??


Thanks in advance.
Rizwan.

Last edited by netguy2000; 08-29-2007 at 08:10 AM.
 
Old 08-29-2007, 08:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
that configuration appears ot be nonsensical... can we back up and get a description of what you're actually trying to achieve? combining 4 56k links to 1 larger one? not going to get anywhere doing it like this.
 
Old 08-29-2007, 08:59 AM   #3
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Sorry you dont understand my requirements,
I want to combine 4 DSL modems, speed is 1 Mbps each Modem,
The reason of combining 4 Modems is to increase my Internet Pipe bandwidth.
if 1 or 2 Modems disconnect then my traffic goes from 3rd and 4th modems, if my traffic increase from 1 or 2 Mbps then 3rd and 4th Modems serves respectively.

My question is:
Now please help me what default Gateway I should set in my FC-2 machine?>???
or I have to set 4 gateways in my machine??
and most important question is:
Will this configuration works??
 
Old 08-29-2007, 09:03 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
it's a lot more complex than you think, really not that simple. check out chapter 4 of lartc.org and that will cover the theory of achieveing what you want. you can't just bond them. a bond is where you are using multple links to reach the same piece of local infrastructure, a switch or something, not a website thousands of miles away.
 
Old 08-29-2007, 09:17 AM   #5
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Thanks for your help,
Let me see what lartc.org says in "Routing for multiple uplinks/providers" section
 
Old 08-29-2007, 11:11 AM   #6
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi acid,

this "bonding or balancing" thing happens again - dont you think?
some get misconception about "does bonding equal balancing" maybe?
no offense guys.

MLPPP?

just my opinion

cheers.

Last edited by rossonieri#1; 08-29-2007 at 11:14 AM.
 
Old 08-30-2007, 03:09 AM   #7
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Do u mean MLPPP will support this load sharing??
 
Old 08-30-2007, 03:26 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
mlppp will manage a multi link PPP connection, hence it's name, but this isn't what you have... is it? you just have 4 adsl routers. i think that as *I* mentioned dialup originally that's hwere mlppp came into it, but is not actually useful here.
 
Old 08-30-2007, 06:15 AM   #9
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Dear acid,
so I found "Nano-Howto to use more than one independent Internet connection" this seems to work for me, in case if one modem goes disconnect.
But what if traffic goes more and more than 1 MB(capacity limit of my single modem), does this configuration share load with second modem??? (i guess no, it can not)

and if your answer is also "CAN NOT" then how can I share traffic load with this configuration??

what configuration I should use for load balancing/ sharing??
1) Routing for multiple uplinks/providers (Load balancing)
from (http://lartc.org/howto/lartc.rpdb.multiple-links.html)
OR
2) Load sharing over multiple interfaces.
from (http://lartc.org/howto/lartc.loadshare.html)

Please help me.
 
Old 08-30-2007, 06:20 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
as above, lartc.org chapter 4 all the way.
 
Old 08-30-2007, 10:38 AM   #11
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi netguy2000,

while i'm not too good explaining things,
maybe you want to take a look a this :
http://www.freestuffjunction.co.uk/bondedadsl.shtml.

that is for bonding (MLPPP) only - not to load balance multiple route.

cheers.
 
Old 08-30-2007, 11:07 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
your isp supports mlppp on adsl? not something I've ever come across (but I spend very little time evaulating ISP's!) i only know about MLPPP from my CCNA
 
Old 09-01-2007, 07:27 AM   #13
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Thanks alot acid,
I did lartc.org chapter 4 configuration and its working fine. but when ever I reboot my server I have to re-type my all ip rule and ip route configuration commands, How can I save these configuration commands ?? so I shall not reconfigure my server on every reboot.
pllzz help.
 
Old 09-01-2007, 08:36 AM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
i'm not sure what the best way to make it permanent really is to be honest. the fedora "iptables" service *might* save the iptables side, and you can add the routes to /etc/sysconfig//network-scripts/route-eth0 (i think) but you can just manually type all commands in to /etc/rc.local adnt they'll definitley be just run after everything else has finished booting which is probably a suitable path of least resistance.

in terms of your topology, are you still using 4 nics? you can't need to do that, one nic with the 4 routers on a switch would be much more logical.
 
Old 09-03-2007, 04:41 AM   #15
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 115

Original Poster
Rep: Reputation: 15
Thanks Alot Acid,
I did my configuration done with your and lartc chapter-4 help.
here is my configuration (hope this will help others)

Fedora Core-2
kernel- 2.6.5-1.358
LAN cards 3
eth1= 192.168.1.14 (connected with internet)
eth2= 10.16.10.5 (connected with internet)
eth3= 192.168.10.5 (connected with LAN)
Kernel patch (available from) http://www.ssi.bg/%7Eja/#routes-2.6

We want to give table main a priority of 50 to make sure it is looked at first.
# ip rule add prio 50 table main

Now we are removing default gateway, if there was no default gateway setup earlier the below mention command should give error, or it will execute fairly.
# ip route del default table main
# iptables -t nat -A POSTROUTING -o eth1 -s 192.168.10.0/24 -j SNAT --to 192.168.1.14
# iptables -t nat -A POSTROUTING -o eth2 -s 192.168.10.0/24 -j SNAT --to 10.16.10.5

Setup a State-full firewall:
# iptables -t filter -N keep_state
# iptables -t filter -A keep_state -m state --state RELATED, ESTABLISHED -j ACCEPT
# iptables -t filter -A keep_state -j RETURN

# iptables -t nat -N keep_state
# iptables -t nat -A keep_state -m state --state RELATED, ESTABLISHED -j ACCEPT
# iptables -t nat -A keep_state -j RETURN

And calling this at the beginning of the script:
# iptables -t nat -A PREROUTING -j keep_state
# iptables -t nat -A POSTROUTING -j keep_state
# iptables -t nat -A OUTPUT -j keep_state
# iptables -t filter -A INPUT -j keep_state
# iptables -t filter -A FORWARD -j keep_state
# iptables -t filter -A OUTPUT -j keep_state

No we are adding default routes for each interface:
# ip rule add prio 201 from 192.168.1.0/24 table 201
# ip route add default via 192.168.1.2 dev eth1 src 192.168.1.14 proto static table 201
# ip route append prohibit default table 201 metric 1 proto static

# ip rule add prio 202 from 10.16.10.0/24 table 202
# ip route add default via 10.16.10.1 dev eth2 src 10.16.10.5 proto static table 202
# ip route append prohibit default table 202 metric 1 proto static

# ip rule add prio 222 table 222
# ip route add default table 222 proto static nexthop via 192.168.1.2 dev eth1 nexthop via 10.16.10.1 dev eth2

I made a script of my above line and add this script in /etc/rc.local , so every time my Server boots, these line add automatically.

I also edit my /etc/sysctl.conf

net.ipv4.ip_forward = 1 (for enable forwarding between my interfaces)
net.ipv4.route.gc_interval = 8 (changing route memory default from 60 sec. to 8 sec.)

Last edited by netguy2000; 09-03-2007 at 04:42 AM.
 
  


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
Finding out Bonding mode of Interface ajeet528 Linux - Networking 4 07-09-2015 03:19 AM
Bonding a virtual interface frd4460 Linux - Networking 3 11-01-2013 04:48 PM
binding ssh and nessusd to ethernet interface sscultima Linux - Server 1 07-11-2007 09:32 PM
Binding multiple IP Addresses to same NIC Harlin Linux - Networking 4 10-26-2005 06:10 AM
Telnetd binding interface ultrix Linux - Security 2 02-11-2005 05:23 PM

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

All times are GMT -5. The time now is 05:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration