Network bond and tag

From T2B Wiki
Revision as of 12:46, 21 April 2016 by Shkelzen Rugovac (talk | contribs) (→‎On the switch)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 it 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 (ex: Po5): [ vlan1 cannot be tagged on the switch ]
melswitch1 [standalone: master] > enable
melswitch1 [standalone: master] # config term
melswitch1 [standalone: master] (config) # interface port-channel 5
melswitch1 [standalone: master] (config interface port-channel 5) # switchport mode hybrid
melswitch1 [standalone: master] (config interface port-channel 5) # switchport access vlan 1
melswitch1 [standalone: master] (config interface port-channel 5) # switchport hybrid allowed-vlan 2
  • Adding a new port to PoX (ex: ethernet 1/27)
melswitch1 [standalone: master] (config) # interface ethernet 1/27
melswitch1 [standalone: master] (config interface ethernet 1/27) # switchport mode hybrid
melswitch1 [standalone: master] (config interface ethernet 1/27) # switchport access vlan 1
melswitch1 [standalone: master] (config interface ethernet 1/27) # switchport hybrid allowed-vlan 2

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