Network bond and tag

From T2B Wiki
Jump to navigation Jump to search

On the host

In /etc/sysconfig/network-scripts:

  • ifcfg-bond0
DEVICE="bond0"
BOOTPROTO=none
IPADDR=192.168.10.135
BROADCAST=192.168.255.255
NETMASK=255.255.0.0
NM_CONTROLLED="no"
ONBOOT="yes"
USERCTL=no
BONDING_MASTER=yes
TYPE=Bond
BONDING_OPTS="mode=4 miimon=100 lacp_rate=0"

To get second bond interface tagged to vlan 2 (PUB)

vconfig add bond0 2
  • ifcfg-bond0.2
DEVICE="bond0.2"
BOOTPROTO=none
ONPARENT=yes
IPADDR=193.58.172.92
BROADCAST="193.58.172.127"
NETMASK=255.255.255.128
GATEWAY=193.58.172.2
NM_CONTROLLED="no"
ONBOOT="yes"
USERCTL=no
VLAN=yes
  • Aggregate interfaces eth0 and eth1 to the bond:
    • ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="no"
ONBOOT="yes"
USERCTL=no
MASTER=bond0
SLAVE=yes
  • ifcfg-eth1
DEVICE="eth1"
BOOTPROTO=none
NM_CONTROLLED="no"
ONBOOT="yes"
USERCTL=no
MASTER=bond0
SLAVE=yes

On the switch

We are configuring everything in LACP [<=> mode=4 in MODPROBE_OPTS for bond0]

  • Adding the PoX interface on the 10G switch
    • Using the interface, create the lacp port first in tab ETH Mgmt, click on Link Aggregation, Provide in the box LAG Interface Number PoX (X a number).
    • On tab Ports, click on the port you want to add, select LAG: PoX, LAG mode: active (LACP rate is auto on slow [<=> lacp_rate=0 in MODPROBE_OPTS for bond0] )
If is does not work and complains about vlans, follow the section Adding a new port to PoX below
  • on the switch in CLI:
    • the PoX port is going to be in hybrid mode, to have untagged[=access] vlan1 and tagged[=hybrid allowed-vlan] vlan 2 : [ vlan1 cannot be tagged on the switch ]
cd somewhere ?
switchport mode hybrid
switchport access vlan 1
switchport hybrid allowed-vlan 2
  • Adding a new port to PoX
cd port
switchport mode hybrid
switchport access vlan 1
switchport hybrid allowed-vlan 2

then on the interface, add the port to PoX following the previous section.