# lagg failover not working



## da1 (Sep 30, 2015)

Hi all,

I have a FreeBSD 10.2 amd64 running in virtualbox with 2x bridged em() interfaces.

I've created a lagg0 interface via rc.conf:

```
ifconfig_em0="up"
ifconfig_em1="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport em0 laggport em1 192.168.x.5/24"
defaultrouter="192.168.x.1"
```

If both interfaces have a cable connected to them, the lagg() works but if I pull out the cable from em0, I get:

```
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
   ether 08:00:27:9d:a1:56
   inet 192.168.x.5 netmask 0xffffff00 broadcast 192.168.x.255
   nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
   media: Ethernet autoselect
   status: active
   laggproto failover lagghash l2,l3,l4
   laggport: em0 flags=5<MASTER>
   laggport: em1 flags=0<ACTIVE>
```

ie em1 doesn't become MASTER and ACTIVE. If I connect the cable back to em0, the lagg interface works again.

Has anyone managed to configure a working failover lagg interface?


----------



## SirDice (Sep 30, 2015)

The problem is that the "new" MASTER interface doesn't send an ARP. So the switch doesn't know the active interface changed. If you run a ping _from_ this machine the switch will properly learn the new position of the MAC address and fail-over works as expected. But if there's no traffic it will take a while for the CAM table entry to expire on the switch.

If you have STP active on your switches you may want to take a look at bridge(4) instead. But there's no LACP or load-balancing, only fail-over.


----------



## da1 (Sep 30, 2015)

There was a thread from 2010 that talked exactly about that but for my case, it still does not work. em1 does not become MASTER and ACTIVE even if I ping from/to it.

Each interface connects to another switch so I cannot use bridge() here.


----------



## unficyp (Oct 7, 2015)

I have the same problem. There are a couple of bug reports open saying that lagg doesnt notify the switches via ARP (or RARP or any other method like Linux Bonding and Vmware are doing) so they dont update their tables soon enough. Seems like this combination of 2 NICs connected to 2 separate switches is not supported using lagg failover and adding a gratuitous ARP or any other notification method is not wanted.


----------



## da1 (Oct 7, 2015)

https://forums.freebsd.org/threads/lagg-failover-is-not-working-at-all.16718/
http://lists.freebsd.org/pipermail/freebsd-net/2012-February/031328.html


----------



## unficyp (Oct 8, 2015)

ThxThanks, but this looks a bit dated.
Looking through the bug reports, it seems that the advertised method is to use rstp.


----------



## da1 (Oct 8, 2015)

AFAIK this was the last talk about this issue.


----------

