This bond is working in failover mode with VLAN tagging over interfaces eth0 & eth1:
ifcfg-bond0
DEVICE=bond0ifcfg-bond0.x (where x is vlan number)
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"
DEVICE=bond0.x
IPADDR=y.y.y.y
NETMASK=y.y.y.y
GATEWAY=y.y.y.y
USERCTL=no
BOOTPROTO=static
ONBOOT=yes
VLAN=yes
IPV6INIT=no
ifcfg-ethx (where x is 0 or 1)
DEVICE=ethx
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
Note that creating bonding.conf in /etc/modprobe.d is no longer required in the latest RHEL 6 releases.
Restart network services and the bond will be created. Make sure all previous non-bonded interfaces are destroyed before restarting network services otherwise they will interfere with the bond creation. A reboot is the easiest way to sort this out.
To check the status of a bonded interface:
cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:9c:02:24:7c:dc
Slave queue ID: 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:9c:02:24:7c:d8
Slave queue ID: 0
To force service to a specific interface:
ifenslave --change-active bond0 eth0
To remove an interface from a bond
ifenslave -d bond0 eth0
To add an interface back into a bond
ifenslave bond0 eth0
No comments:
Post a Comment