LinuxQuestions.org
Help answer threads with 0 replies.
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 01-17-2012, 10:47 PM   #1
San123
LQ Newbie
 
Registered: Nov 2011
Posts: 21

Rep: Reputation: Disabled
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.
 
Old 01-18-2012, 04:44 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi San123,

I think following link should be able to help you out: https://help.ubuntu.com/community/UbuntuBonding
 
Old 01-18-2012, 10:17 PM   #3
San123
LQ Newbie
 
Registered: Nov 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-19-2012, 12:52 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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.
 
1 members found this post helpful.
Old 01-19-2012, 02:35 AM   #5
San123
LQ Newbie
 
Registered: Nov 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Ok.. Thank you
 
  


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
NIC Bonding jeewiz Linux - Networking 2 10-14-2011 03:21 PM
NIC Bonding: Does not failover successfully. Only one NIC is active Akhran Debian 2 02-18-2011 07:26 PM
LXer: Setting Up Dual-Dual NIC Bonding On Ubuntu In 30 Seconds LXer Syndicated Linux News 0 01-22-2009 08:30 AM
Multiple instances of NIC Bonding on Ubuntu Server GeneNZ Linux - Networking 0 08-19-2008 05:13 PM
Has anyone verified that NIC bonding works in Ubuntu? BrianK Ubuntu 3 01-18-2007 10:30 PM

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

All times are GMT -5. The time now is 02:58 PM.

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