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 have two internet connections provisioned at different bandwidth. I installed 'ifenslave' tool to attach/detach network slave for NIC bonding.
Firstly it is required to enable NIC's by using the command:
$ ifconfig eth0 up
$ ifconfig eth1 up
It is followed by assigning ip address, subnet mask and gateway for the available interfaces.(Is this step required, when we bond 2 interfaces as a single device?)
Here I was confused with the settings of NIC's.
When we make NIC bonding, it appears as single port to the kernel.
Can we assign IP address of the bonding device manually say 192.168.1.x , netmask as 255.255.255.0 and gateway address as router's IP address?
I would be thankful,if someone help in this problem.
I had already gone through that document. I think it is required to comment out the IP address, hardware address(MAC), gateway address and subnet mask of the interfaces. When we do NIC merging which can be accomplished by ifenslave tool, one MAC address appears for all interfaces. When we do NIC bonding for two slaves which MAC address will it use for routing. Or is it manual setting in which we can set any of the two available MAC addresses.
How incoming traffic will be routed using one MAC address when we are using two interfaces? I mean how bonding driver will differentiate the incoming packets so that it distributes over the available slaves.
Your valuable guidance will be appreciated.
I have done this on my CentOS server and as far as I remember I did not mention AC address in bond configuration file. Bond configuration involves merging two interfaces to act as one for redundancy and bandwidth sharing. When you create the bond the IP address of both the interface will 1 and it is the responsibility of the switch to identify where the packet is destined to.
Example I have created a bond on one of the machine and set the IP 192.168.1.10. I bring up the ethernet bond which will present two ethernet as 1. Any packets destined to 192.168.1.10 will be routed to this machine on the basis of IP and the MAC address of the two interfaces. When you do a ping from another machine on this IP it will populate the IP address of those 2 interfaces in the ARP cache of the switch.
So basically what I am trying to say that the routing will take place on the basis of actual MAC address. It does not differentiate for which interface it should send because they are acting as 1. If one of the interface goes down then the other one will take over and your machine will still be able to communicate.
NIC bonding at interface level for providing redundancy and load balancing at small scale. If you want to achieve this at large level then it is usually done at switch level.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.