LAGG troubleshooting/question

Started by gman529, August 29, 2022, 09:14:14 PM

Previous topic - Next topic
I currently have a LAGG interface and I'm trying to see if the issue I'm experience is caused by flapping or something else.

The port overview shows the following:
LAGG Statistics   active ports:2
flapping:2

Does this mean I am having issues with my interface?

Not necessarily. If you reboot either OPNsense or the device at the other end of that lagg interface, there are some "flaps" while everything is set up. I don't know for how long FreeBSD keeps that state in the ifconfig output but I have that across multiple devices and I repeatedly checked at the other end (all Cisco) and the LACP connections seem to be just fine.

Try ifconfig -v lagg0 and if both ports are in the forwarding state, you are probably fine. You might want to set "Use flowid" to "Yes" and see if that improves the reporting.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Luckily I found your post @pmhausen, I was getting crazy because in the INTERFACES: OVERVIEW of my lagg0 and lagg1 interfaces I hade flaps:2 and flaps:3, even though everything seems to be working fine.

I tried ifconfig -v, but results are not in sync with the UI, hope it's just a matter of waiting for the UI to refresh data:

root@OPNsense:~ # ifconfig -v lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: LAN (lan)
options=4802028<VLAN_MTU,JUMBO_MTU,WOL_MAGIC,NOMAP>
ether 02:d4:32:81:89:00
inet 10.1.10.1 netmask 0xfffffe00 broadcast 10.1.11.255
laggproto lacp lagghash l2,l3,l4
lagg options:
flags=94<USE_NUMA,LACP_STRICT,LACP_FAST_TIMO>
flowid_shift: 16
lagg statistics:
active ports: 2
flapping: 0
lag id: [(8000,02-D4-32-81-89-00,016B,0000,0000),
(8000,60-32-B1-41-3D-0A,07CA,0000,0000)]
laggport: igb0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3f<ACTIVITY,TIMEOUT,AGGREGATION,SYNC,COLLECTING,DISTRIBUTING>
[(8000,02-D4-32-81-89-00,016B,8000,0001),
(8000,60-32-B1-41-3D-0A,07CA,8000,0001)]
laggport: igb1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3f<ACTIVITY,TIMEOUT,AGGREGATION,SYNC,COLLECTING,DISTRIBUTING>
[(8000,02-D4-32-81-89-00,016B,8000,0002),
(8000,60-32-B1-41-3D-0A,07CA,8000,0002)]
groups: lagg
media: Ethernet autoselect
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@OPNsense:~ # ifconfig -v lagg1
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: ONT_LAN (opt2)
options=4802028<VLAN_MTU,JUMBO_MTU,WOL_MAGIC,NOMAP>
ether 40:62:31:0c:0e:e5
inet 192.168.1.222 netmask 0xffffff00 broadcast 192.168.1.255
laggproto lacp lagghash l2,l3,l4
lagg options:
flags=94<USE_NUMA,LACP_STRICT,LACP_FAST_TIMO>
flowid_shift: 16
lagg statistics:
active ports: 3
flapping: 0
lag id: [(8000,40-62-31-0C-0E-E5,018B,0000,0000),
(8000,60-32-B1-41-3D-0A,0E2E,0000,0000)]
laggport: igb3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3f<ACTIVITY,TIMEOUT,AGGREGATION,SYNC,COLLECTING,DISTRIBUTING>
[(8000,40-62-31-0C-0E-E5,018B,8000,0004),
(8000,60-32-B1-41-3D-0A,0E2E,8000,0017)]
laggport: igb4 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3f<ACTIVITY,TIMEOUT,AGGREGATION,SYNC,COLLECTING,DISTRIBUTING>
[(8000,40-62-31-0C-0E-E5,018B,8000,0005),
(8000,60-32-B1-41-3D-0A,0E2E,8000,0016)]
laggport: igb5 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3f<ACTIVITY,TIMEOUT,AGGREGATION,SYNC,COLLECTING,DISTRIBUTING>
[(8000,40-62-31-0C-0E-E5,018B,8000,0006),
(8000,60-32-B1-41-3D-0A,0E2E,8000,0018)]
groups: lagg
media: Ethernet autoselect
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


There's a small bug in the code that uses the same number for "active ports" and "flapping".

I've opened a PR on GitHub to fix it: https://github.com/opnsense/core/pull/6641.