Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


centos65_bonding

CentOS 6.5 bonding - LACP VLAN trunk

  • Create bond interface.
    vi /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    BOOTPROTO=none
    ONBOOT=yes
    USERCTL=no
    BONDING_OPTS="mode=4 miimon=100"
  • Load kernel bond0 interface.
    vi /etc/modprobe.d/bonding.conf
    alias netdev-bond0 bonding
  • Add interfaces to bond.
    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    ONBOOT=yes
    BOOTPROTO=none
    
    vi /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth1
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    ONBOOT=yes
    BOOTPROTO=none
    
    vi /etc/sysconfig/network-scripts/ifcfg-eth3
    DEVICE=eth3
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    ONBOOT=yes
    BOOTPROTO=none
  • Load bonding module.
    modprobe bonding
  • Show bonding stats.
    cat /proc/net/bonding/bond0

Create VLAN devices

  • Create VLAN50 device and bridge for KVM guests.
    vi /etc/sysconfig/network-scripts/ifcfg-br50
    DEVICE=br50
    ONBOOT=yes
    SLAVE=bond0.50
    TYPE=Bridge
    VLAN=yes
    NM_CONTROLLED=no
    
    vi /etc/sysconfig/network-scripts/ifcfg-bond0.50
    DEVICE=bond0.50
    VLAN=yes
    ONBOOT=yes
    USERCTL=no
    NM_CONTROLLED=no
    BRIDGE=br50
centos65_bonding.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1