LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   About NIC bonding in Ubuntu (https://www.linuxquestions.org/questions/linux-networking-3/about-nic-bonding-in-ubuntu-924344/)

San123 01-17-2012 10:47 PM

About NIC bonding in Ubuntu
 
Hi...

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.

T3RM1NVT0R 01-18-2012 04:44 PM

@ Reply
 
Hi San123,

I think following link should be able to help you out: https://help.ubuntu.com/community/UbuntuBonding

San123 01-18-2012 10:17 PM

Hi... T3RM1NVT0R

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.

T3RM1NVT0R 01-19-2012 12:52 AM

@ Reply
 
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.

San123 01-19-2012 02:35 AM

Ok.. Thank you


All times are GMT -5. The time now is 05:24 AM.