+ Post New Thread
Results 1 to 3 of 3
*nix Thread, bridging and bonding network cards in Technical; I have a server that I'm going to start trialling KVM, it's running Ubuntu 9.0.4 & I have KVM running ...
  1. #1
    clodhopper's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    93
    Thank Post
    0
    Thanked 11 Times in 11 Posts
    Rep Power
    18

    bridging and bonding network cards

    I have a server that I'm going to start trialling KVM, it's running Ubuntu 9.0.4 & I have KVM
    running OK but I'm having trouble getting my brain round how Ubuntu decides which netcard gets which
    ip address & then how to setup bridging.

    The server has 6 Gb cards, two onboard(currently eth0,eth1)that I'd like to keep for management etc
    & a quad port card that I'd like to bridge two for virtual machines & bond two for access to our new
    SAN when it arrives.

    Currently I have configured the server with the two onboard ports (see interfaces file below) but I
    can't get my brain round is how it's know's what IP address to give to each card (used to go by MAC
    address) & how to setup the bridging & bonding bit for the quad port card, the server sees them OK
    in /var/log/messages as eth2,3,4,5 but they aren't configured.

    I have looked at loads on setting up the bridging but only on single cards not multiples so if
    anyone could point me in the right direction I'd be very appreciative.

    Thanks
    Brian Chivers


    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo eth0 eth1
    iface lo inet loopback

    # The primary network interface
    iface eth0 inet static
    address 192.168.210.1
    netmask 255.255.0.0
    network 192.168.0.0
    broadcast 192.168.255.255
    gateway 192.168.0.2
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.0.1
    dns-search portsmouth-college.ac.uk

    iface eth1 inet static
    address 192.168.210.2
    netmask 255.255.0.0
    broadcast 192.168.255.255
    network 192.168.0.0

  2. #2

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,611
    Thank Post
    1,226
    Thanked 772 Times in 670 Posts
    Rep Power
    234
    Quote Originally Posted by clodhopper View Post
    I have looked at loads on setting up the bridging but only on single cards not multiples so if anyone could point me in the right direction I'd be very appreciative.
    A quick Google for "ubuntu port bonding" brought up this:

    https://wiki.ubuntu.com/LinkAggregation

    Which seems quite simple. Forget "bridging", that's something else entirely (a software version of a network switch), you want "bonding", which from the link above should simply be a case of defining a "bond" interface (i.e. "bond0", like "eth0") and listing the eth interfaces you want in it, along with giving it wahtever IP address you want:

    Code:
    auto bond0
    iface bond0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    gateway 192.168.1.254
    dns-nameservers 192.168.1.254
    post-up ifenslave bond0 eth0 eth1
    pre-down ifenslave -d bond0 eth0 eth1
    You might need to install a bonding driver (ifenslave) before you start, and the documentation there doesn't seem too keen on Ubuntu's network manager, recommending you remove it. IEEE 802.3ad support on the switch is also handy, seemingly.

    This related thread from a couple of months ago might have some useful information in it:

    DRBD, NIC bonding, load balancing, Openfiler...

    --
    David Hicks

  3. #3

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by clodhopper View Post
    Currently I have configured the server with the two onboard ports (see interfaces file below) but I
    can't get my brain round is how it's know's what IP address to give to each card (used to go by MAC
    address) & how to setup the bridging & bonding bit for the quad port card, the server sees them OK
    in /var/log/messages as eth2,3,4,5 but they aren't configured.
    If Ubuntu works the same as Debian (which it normally does) and you are using udev (which you probably are) your device names are defined by MAC in /etc/udev/rules.d/70-persistent-net.rules and then mapped to IP addresses in /etc/network/interfaces.

SHARE:
+ Post New Thread

Similar Threads

  1. 2 network cards in server?
    By TechSupp in forum Windows Server 2000/2003
    Replies: 10
    Last Post: 12th October 2009, 01:11 PM
  2. Teaming Network Cards
    By KWestos in forum Wireless Networks
    Replies: 3
    Last Post: 14th May 2009, 10:54 PM
  3. Bridging network connections
    By _Bat_ in forum *nix
    Replies: 9
    Last Post: 31st December 2008, 04:59 PM
  4. Multiple Network Cards
    By Jackd in forum *nix
    Replies: 4
    Last Post: 9th December 2008, 11:29 AM
  5. RIS Network Cards
    By edie209 in forum Hardware
    Replies: 10
    Last Post: 22nd May 2006, 06:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •