# lagg(4) using failover with carrier on both laggports but no traffic



## nocturnal (Nov 28, 2011)

Everyone who's been there know that if a link does not go down on one of the laggports it is not considered down and will not fail over. So for example of a switch loses its configuration, or vlans, FreeBSD won't fail over to the other port. This is exactly what happened to me and I was wondering how to prevent this in the future? My first instinct was to write a heartbeat script, but then I ran into a wall when I couldn't figure out how to ping out from a specific interface. 

*ping -I* doesn't work as I expect it to. None of the physical laggports have any IP address, only the lagg0 interface has the IP. So what are good heartbeat of keepalive solutions for these unexpected situations? 

Both laggports are connected to physical switches with IP addresses, I could for example get the Cisco configuration from them, ping their IP or try to log into them over ssh. Or just open a connection to their ssh port with netcat.


----------



## phoenix (Nov 29, 2011)

Configure two separate vlans on the switch, give the switch an IP in each vlan, then stick each physical interface on the BSD box into the two vlans, and ping the IP of the switch in each vlan.  The vlans are only used for the heartbeat traffic and are not part of the lagg interface.


----------



## nocturnal (Nov 29, 2011)

phoenix said:
			
		

> Configure two separate vlans on the switch, give the switch an IP in each vlan, then stick each physical interface on the BSD box into the two vlans, and ping the IP of the switch in each vlan.  The vlans are only used for the heartbeat traffic and are not part of the lagg interface.



Great idea, to have the switches handle this. They already have management ips and no VIP so if I ping one of their MGMT ips I would always get a response from that switch, then it's all a matter of checking the return code of ping. 

Thanks for the help!


----------

