I have created a bond0 interface running over eth0 and eth1. We running 2 802.1q vlans over this - vlan 10 and 20.
This works ok with link failure but we need to enable arp_ip_detection option for path checking. Can I enable this somehow per vlan interface, i.e. so bond0.10 monitor ip x.x.x.x and bond0.20 monitor y.y.y.y
This is so that if bond0.10 fails, then it will try using bond0.10 on eth1 instead of eth0. I would guess I need to specify this somehow in /etc/modprobe.conf but Im not sure how, currenlty I added:
alias bond0 bonding
options bond0 mode=1 miimon=100 primary=eth0
Here is my config:
If you're trying to get the VLANs to fail over independently (e.g., vlan 10 active on eth0, vlan 20 active on eth1), then that isn't going to work. In active-backup mode, only one slave is active at a time, and all traffic goes over that slave. If that's what you want, then you're looking for two independent bonds on the same pair of slave interfaces; bonding isn't really set up for that.
If you're happy to just have the two VLANs fail over as a pair, that's easily done with options of the form "arp_interval=100 arp_ip_target=10.10.10.10,184.108.40.206" with the appropriate IP addresses. That doesn't sound like what you're looking for, though.
Thx that is what I wanted so I guess thats not possible, I am thinking of a workaround though. In that arp_ip_target option, does that mean if either 10.10.10.10 'OR' 220.127.116.11 'OR' 'both 10.x and 20.x fail' then then i failover the whole pair? i.e. essentially both targets have to be there for the interface to be active.
Right now, the way it works is if any arp_ip_target responds, the link is considered to be up. I have on my todo list a change to make the ARP monitor optionally require responses from all arp_ip_targets, but that it at least a couple months out. It also needs some tweaks to issue the proper ARPs on the proper VLANs. This feature is meant for the use you have in mind, as well as for gang failover type configurations, but it's not done yet.
Also, I'm simplifying a bit above; bonding doesn't actually check the ARPs unless you enable arp_validate, so normally any traffic will work, not just ARPs.
I have found a way round to do what I need, which is using the trunk failover feature on the cisco igesm module (this is in a bladecentre) I have tested it and it works ok.
The problem is that due to the topology we need to use the arp_ip_monitor for one of the vlans (because the trunk failover feature is limited to 2 groups), this also works but I think there is a bug with it. When I use this feature I have what looks like a flapping link.
pr 17 11:25:28 wpsv05 kernel: bonding: bond0: backup interface eth0 is now up
Apr 17 11:25:28 wpsv05 kernel: bonding: bond0: backup interface eth0 is now down
Apr 17 11:25:30 wpsv05 kernel: bonding: bond0: backup interface eth0 is now up
Apr 17 11:25:30 wpsv05 kernel: bonding: bond0: backup interface eth0 is now down
Could someone verify if this is a bug?
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: down
Link Failure Count: 54
Permanent HW addr: 00:14:5e:f5:91:20
Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:1a:64:03:90:a0
My bonding options are:
alias bond0 bonding
options bond0 mode=1 arp_interval=100 arp_ip_target=10.119.76.1
Just to follow up on my own post. I investigated the issue whats causing the link up/down messages, they are arp broadcasts coming in on another vlan interface on the non active interface (this only happens when the interface fails over) When I disconnect this link and the broadcasts stop, the problem goes away.
Would this issue be fixed with arp_validate option?
Is it possible I can upgrade bonding driver somehow? My current version doesnt support the option above.