Linux - NetworkingThis 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.
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.
I want to try NIC bonding in ubuntu server provided with three different internet connections and also has 4 port NIC card. But I was bit confused how to configure IP address for the bonding driver as each service provider is assigned with static IP.
Which IP address should I use for bonding driver?
Will slave networks use bonding driver's IP for routing internet traffic or their respective static IP's assigned by ISP?
Can we set any IP for bonding driver or is it mandatory to use any one of the static IP's of slave networks?
I would be grateful if someone share their knowledge.
NIC bonding or link aggregation is mainly used to combine multiple network ports into a group and in doing so combine the bandwidth. In your setup, having three different internet providers, I don't understand quite what you're asking. If you have four NICs and want to setup a bonding using for example two of them, you could assign the IP of one of the providers to the bonding interface and assign two of the four NICs as slaves to that bonding interface. The other two NICs would remain with the IP from the other two providers assigned. If you want to have a bonding for all three connections you'll have to add extra NICs. AFAIK you cannot set an IP to a NIC that functions as slave for a bonding, the IP gets configured on the bonding interface.
How many NICs do you have in total on that machine?
I have four port NIC card on the server in which three ports for connecting 3 ISP's and fourth port for connecting LAN.
I want to attach all the providers to the bonding interface. LAN traffic can be distributed over three network slaves connected to the bonding interface in balance-rr mode.
If we configure the IP address for bonding interface using any of the service providers, do all the slave networks use the bonding interface IP to route the traffic? I was stuck with this doubt.
I have four port NIC card on the server in which three ports for connecting 3 ISP's and fourth port for connecting LAN.
This is not bonding. Bonding NIC ports involves all of them going in parallel from one machine to another machine (host, router, switch). They become a group that is usually identified as a single special interface. It's like a RAID array is for storage.
Quote:
Originally Posted by San123
I want to attach all the providers to the bonding interface. LAN traffic can be distributed over three network slaves connected to the bonding interface in balance-rr mode.
Bonding would be all 3 cables going to one other machine that also has 3 ports and is configured to bond them together.
Quote:
Originally Posted by San123
If we configure the IP address for bonding interface using any of the service providers, do all the slave networks use the bonding interface IP to route the traffic? I was stuck with this doubt.
You are getting 3 different IP addresses, 1 from each ISP. That or you are getting separate subnets. You CAN connect these all to the same machine via 3 NIC ports. But that is NOT bonding. It is just 3 separate networks connected (the connected network being the LAN or point-to-point that reaches each ISP ... regardless of the fact that you can get to the internet by each).
Once you have them connected, you must make a decision which one to target routing to. You could route the whole internet to one ISP. Or you can be selective and route part of the internet in different directions although that is likely to conflict with incoming traffic that addressed a particular IP address you got from one of the ISPs.
Real network redundancy involves a major routing effort (google for "BGP routing" or "BGP4 routing"). It would mean you need to get portable IP addresses (good luck if you can't justify a need for a large amount) and make your own routing announcements to the internet, which would then see 3 possible routes for your IP addresses. And not all ISPs even support customers doing this (the big ones do).
In short, if you have to ask how to begin with this, it is out of your league. Sorry, but that is the honest truth. If your business justifies the things that are needed, you could afford to hire a couple network engineers with CCIE certification.
Otherwise just run your internet servers on 3 separate NIC with separate IPs, and set up a firewall that can switch ISP, or 3 separate small firewalls you can turn on and off to select which ISP to use. Some redundancy is possible, but it's still getting into a very complex area you are not prepared for, and no easy-bake recipe exists for.
Bonding will sum up the bandwidths offered by each individual link and will have the same MAC address for all the slave networks.
If we configure IP for bonding interface using any one IP of the available ISP's (say 3), do all slave networks will use bonding device's IP or link IP given by service provider to route internet traffic?
Bonding will sum up the bandwidths offered by each individual link and will have the same MAC address for all the slave networks.
If we configure IP for bonding interface using any one IP of the available ISP's (say 3), do all slave networks will use bonding device's IP or link IP given by service provider to route internet traffic?
There is no gain for internet access with bonding, with one exception. If an ISP offers ethernet connected service (often called "ethernet handoff"), they MAY be able to provide even greater bandwidth by offering bonded ethernet. So if they offer you 1 gigabit service, and you want to upgrade to 3 gigabit service, maybe they can put in a router or switch that has 3 ports bonded.
If you have only 100 megabit links, it's probably more cost effective, and certainly easier to handle, to just upgrade to 1 gigabit links. It may in some cases be easier to upgrade to 10 gigabit links. Commodity off-the-shelf equipment at 1 gigabit is readily available and barely more expensive than 100 megabit (10 megabit is almost impossible to find). 10 gigabit is still quite expensive, including requiring expensive cables with expensive connectors, and is best done with fiber. So bonding only makes economic sense in most cases when going from 1 gigabit to 4 gigabit or so (though it can make sense at higher levels for facilities involving very large storage-area-networks ... SANs).
There are no protocols established for bonding across multiple ISPs. Bonding is at the link layer.
For better capacity and redundancy through multiple ISPs, as described before you need portable IP addresses (an IP address allocation directly from your address registry) which can be routed through ISPs, if such ISPs are equipped to handle the BGP route announcements from their customers (that's an extra step beyond them having portable IPs and BGP for their own network). But if you are really working at this scale, you probably want to connect directly to "core network providers", anyway.
Thanks Skaperen for sharing your valuable knowledge...
All the three links are offered at 1Gbps bandwidth (different service providers). As of now resources are under-utilized as we are using one ISP and if link-outage occurs we are going for manual switch-over to other link.
Now I want to automate switch-over (fault tolerance) and also increase band-width by using bonding.
Each ISP is provided with default gateway(router).
Server specifications:- OS: Ubuntu Server Ed.,(11.04) , 4 port NIC card (3 ports for connecting 3 ISP's and other for connecting LAN).
I have gone through ubuntu bonding documentation but got confused with IP assignment for bonding interface.
Bonding will show the kernel as if it is a single physical device by having same MAC address(Layer-2).
IP address and gateway for bonding interface can be assigned with any one of the 3 service providers IP and gateway.
Internal LAN traffic can be distributed over 3 slave networks attached to the bonding interface by keeping the bond mode in balance-rr mode or mode 0.
All the traffic will have same MAC address because of bonding.
Network traffic will have which IP and gateway? (As bonding driver is configured with only one of the three available IP's and gateways).
I would be grateful for your help and suggestions.
Bonding just can't function this way because there is more to it that needs to be done on the other end ... ONE other end. Since the 3 ISPs are providing 3 separate handoffs, the ISP ends won't know what to bond since from each of their perspective, this is only one ethernet to deal with.
Even if you did have 2 or 3 ethernets from the same ISP (for extra bandwidth, not for fallback on failure), they would have to configure the bonding on their end, too.
Bonding is something that has to be configured on BOTH ends of the multiple cable link, and all the cables have to go to a single machine on each end.
If all you want is automatic fallback, you can get that PARTIALLY by setting up a routing table with 3 different metric levels for each of the ISPs. But that will only catch failures that are apparent to the NIC (as in the ethernet fails). If the ISP fails to get to the internet, your computer with 4 NICs won't see that, so that type of failure won't be corrected. A smarter program is needed that constantly checks the 1st ISP for reachability to the internet, and upon persistent failure, changes the routing to go through another ISP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.