-- Main.dlgawley - 18 Nov 2010

The cscf-adm account should be available on all CSCF administered Ubuntu hosts. If the account doesn't exist or password doesn't work report the problem to tg-linux.

We'll need this software package:

sudo apt-get install ifenslave

The following shows a setup for two lacp trunks (bonds), one bonding of four 1Gb ports and one bonding of two 10Gb ports.

There are three files of interest for this setup:

  1. "/etc/udev/rules.d/70-persistent-net.rules" is used to customize the "NAME" of the physical network interfaces
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x1010 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:8e:09:48", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1010 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:8e:09:49", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:8e:09:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:4f:8e:09:47", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x8086:0x10fb (ixgbe)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:69:7b:b5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"

# PCI device 0x8086:0x10fb (ixgbe)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:69:7b:b4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"

  1. "/etc/modprobe.d/aliases.conf" is used to assign the "NAME" of the bond (trunk) interfaces.

#
# Want to define an network interface NAME that we're going to use for
# ifenslave bond interfaces of both the 1 Gb ports and 10 Gb ports.
# We also define our default values for the bond which includes the 
# number of bonds being created ("max_bonds" value).

alias bond0 bonding
alias bond1 bonding
options bonding mode=802.3ad miimon=100 downdelay=200 updelay=200 max_bonds=2

  1. "/etc/network/interfaces" is used to define the interface configuration (provided network-manager is not installed (in which case you'll need to translate this configuration to the format used by the /etc/NetworkManager/system-connections files).
# 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
iface lo inet loopback

# Note: to use the following network setup for bonding multiple NIC
#       connections together.
#
#       You will need to "apt-get install ifenslave"
#       and append these two lines 
# alias bond4x1Gb bonding
# options bonding mode=802.3ad miimon=100 downdelay=200 updelay=200
#       to the "/etc/modprobe.d/aliases.conf" file.
#

# Tell the system that all interfaces are being handled manually.
auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto eth2
iface eth2 inet manual

auto eth3
iface eth3 inet manual

auto eth4
iface eth4 inet manual

auto eth5
iface eth5 inet manual

# Setup the desired 802.3ad interface using ifenslave.
auto bond0
iface bond0 inet static
        #  Networking information
        # On switch dc-cs2:trk43
        address      129.97.152.203
        netmask      255.255.255.0
        network      129.97.152.0
        broadcast    129.97.152.255
        gateway      129.97.152.1
        # Now bond the four 1Gb network interfaces together.
        #  in an active active setup where they are all equal.
        bond-primary eth0 eth1 eth2 eth3
        # what happens as part of startup/shutdown cycle.
        post-up   /sbin/ifenslave    bond0 eth0 eth1 eth2 eth3
        post-down /sbin/ifenslave -d bond0 eth0 eth1 eth2 eth3

auto bond1
iface bond1 inet static
        #  Networking information
        # On switch dc-cs2:trk38 Vlan 819
        # address      10.15.4.10
        # broadcast    10.15.4.255
        # network      10.15.4.0
        # netmask      255.255.255.0
        # Now bond the four 1Gb network interfaces together.
        #  in an active active setup where they are all equal.
        bond-primary eth4 eth5
        # what happens as part of startup/shutdown cycle.
        post-up   /sbin/ifenslave    bond1 eth4 eth5
        post-down /sbin/ifenslave -d bond1 eth4 eth5

# End of ifenslave example.

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2011-03-18 - DaveGawley
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback