Skip to content

Ethname does not handle multiple LAG member interfaces correctly #3

@jimsiff2

Description

@jimsiff2

I have ethname configured and working correctly on an opnsense firewall with four USB NICs. The interface-MAC address relationships remain consistent across reboots. If I add a single USB NIC to a lagg interface, ethname continues to work correctly. Interface lagg0 takes the MAC address of the single member interface ue0.

ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:68:4c
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:6a:70
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:66:97
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:68:4c
	laggproto lacp lagghash l2,l3,l4
	laggport: ue0 flags=0<>
	groups: lagg
	media: Ethernet autoselect
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

If I add multiple USB NICs to a lagg interface, ethname stops working correctly.

After ue0 and ue1 join lagg0, ue0 takes the MAC address of ue1 as ether, and moves the original ue0 MAC address to hwaddr. The lagg interface takes the MAC address of ue1. Here is ifconfig output for the USB NICs and a new two interface lagg, but before a reboot.

ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	hwaddr 00:50:b6:f1:68:4c
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:6a:70
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:66:97
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	laggproto lacp lagghash l2,l3,l4
	laggport: ue1 flags=0<>
	laggport: ue0 flags=0<>
	groups: lagg
	media: Ethernet autoselect
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

After a reboot, one or more USB NICs is renamed to en_50003_1 or similar. In addition, lagg0 no longer has ue0 and ue1 as members, but ue1 (correct) and en_50003_1 / ue2 (incorrect). This causes LACP inconsistencies and interfaces left in a blocking state.

ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:68:4c
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
en_50003_1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	hwaddr 00:50:b6:f1:6a:70
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:66:97
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:50:b6:f1:67:13
	laggproto lacp lagghash l2,l3,l4
	laggport: en_50003_1 flags=0<>
	laggport: ue1 flags=0<>
	groups: lagg
	media: Ethernet autoselect
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Does ethname need to handle ethernet interfaces with both a 'ether' and 'hwaddr' in a different manner? Where does lagg formation occur in relation to ethname execution? I have ethname running via /usr/local/etc/rc.syshook.d/early/02-ethname

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions