I have an HP blade with two NICs, connected to different switches in blade center. When using plain network, I've used to use bonding interface in mode 1 (failover) based on arping to some target. Here is an example of ifcfg-bondX:
BONDING_OPTS="mode=1 arp_interval=2000 arp_ip_target=xxx.xxx.xxx.xxx"
This configuration solves uplink problems, switching to working path.
Requirements changed, and I need more VLANs on same interface. I've tryied to build VLAN's NIC and bond interface over them to achieve same solution. It is work, but not good; bonding interface switch interfaces very frequent. Googling internet shows that this solution even does not considered for some reason.
So I've enforced to use common solution, that does not cover uplink problem, but work.
# yum install -y vconfig
# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 ONBOOT=yes BONDING_OPTS="mode=1 miimon=200 use_carrier=0" # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 MASTER=bond0 SLAVE=yes ONBOOT=yes TYPE=Ethernet HWADDR=00:26:55:1E:0A:72 # cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 MASTER=bond0 SLAVE=yes ONBOOT=yes TYPE=Ethernet HWADDR=00:26:55:1E:0A:6E
Files above configure active-backup bonding interface build from eth0 and eth1 intefaces. This configuration protect switch failure only (HP blade attached directly to switch), and uplink cut-off (if properly configured in switch). It is more than nothing.
Next files conifugre VLAN interfaces. Bolded text directly related to VLAN configuration. The NUMBERS are desired VLANIDs.
# cat /etc/sysconfig/network-scripts/ifcfg-bond0.309 DEVICE=bond0.309 VLAN=yes ONBOOT=yes BOOTPROTO=static NETMASK=255.255.255.0 IPADDR=184.108.40.206 GATEWAY=220.127.116.11 # cat /etc/sysconfig/network-scripts/ifcfg-bond0.1 DEVICE=bond0.1 VLAN=yes ONBOOT=yes BOOTPROTO=static NETMASK=255.255.255.0 IPADDR=192.168.2.10