Network bond and tag

From T2B Wiki
Revision as of 12:18, 21 April 2016 by Romain Rougny (talk | contribs) (Created page with "=== On the host === In '''/etc/sysconfig/network-scripts''': :* ifcfg-bond0 <pre>DEVICE="bond0" BOOTPROTO=none IPADDR=192.168.10.135 BROADCAST=192.168.255.255 NETMASK=255.255...")
(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