Project

General

Profile

Actions

Bug #11335

open

Spoofing the MAC on a LAGG interface does not work for some NIC types.

Added by Steve Wheeler over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
Start date:
01/29/2021
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.x
Affected Architecture:
All

Description

When you spoof the MAC on an assigned LAGG interface in the webgui the new MAC is shown immediately as the 'ether' address on the first interface in the lagg:

igb4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 11:22:33:44:55:88
    hwaddr 00:90:7f:d0:28:10
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
igb5: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:90:7f:d0:28:10
    hwaddr 00:90:7f:d0:28:11
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:90:7f:d0:28:10
    inet6 fe80::290:7fff:fed0:2810%lagg0 prefixlen 64 scopeid 0xd
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
    groups: lagg
    laggproto lacp lagghash l2,l3,l4
    laggport: igb4 flags=0<>
    laggport: igb5 flags=0<>

The second interface and the LAGG interface still show the hwaddr MAC from the first interface.

If you reboot at this point some NIC types will then propergate the MACs to all the interfaces in the LAGG and the LAGG interface and any VLANs on that.
For example em:

em4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=81209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER>
    ether 11:22:33:44:55:77
    hwaddr 00:90:7f:87:dc:79
    media: Ethernet autoselect
    status: no carrier
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
em5: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC> metric 0 mtu 9000
    options=81209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER>
    ether 11:22:33:44:55:77
    hwaddr 00:90:7f:87:dc:7a
    media: Ethernet autoselect
    status: no carrier
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    description: lagg
    options=81209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER>
    ether 11:22:33:44:55:77
    inet6 fe80::290:7fff:fe87:dc79%lagg0 prefixlen 64 scopeid 0xc
    laggproto lacp lagghash l2,l3,l4
    laggport: em4 flags=0<>
    laggport: em5 flags=0<>
    groups: lagg
    media: Ethernet autoselect
    status: no carrier
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lagg0.20: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    description: OPT3
    options=3<RXCSUM,TXCSUM>
    ether 11:22:33:44:55:77
    inet6 fe80::290:7fff:fe87:dc79%lagg0.20 prefixlen 64 scopeid 0xd
    groups: vlan
    vlan: 20 vlanpcp: 0 parent interface: lagg0
    media: Ethernet autoselect
    status: no carrier
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

However LAGGs of igb or ix NICs do not.

But it can be manually set in those NIC types:

[2.4.5-RELEASE][admin@m400-3.stevew.lan]/root: ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:90:7f:d0:28:10
    inet6 fe80::290:7fff:fed0:2810%lagg0 prefixlen 64 scopeid 0xd
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
    groups: lagg
    laggproto lacp lagghash l2,l3,l4
    laggport: igb4 flags=0<>
    laggport: igb5 flags=0<>
[2.4.5-RELEASE][admin@m400-3.stevew.lan]/root: ifconfig lagg0 ether 11:22:33:44:55:66
[2.4.5-RELEASE][admin@m400-3.stevew.lan]/root: ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 11:22:33:44:55:66
    inet6 fe80::290:7fff:fed0:2810%lagg0 prefixlen 64 scopeid 0xd
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
    groups: lagg
    laggproto lacp lagghash l2,l3,l4
    laggport: igb4 flags=0<>
    laggport: igb5 flags=0<>

And when you do that the MAC is imediately pushed to all the LAGG members:

igb4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 11:22:33:44:55:66
    hwaddr 00:90:7f:d0:28:10
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier
igb5: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=6400bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 11:22:33:44:55:66
    hwaddr 00:90:7f:d0:28:11
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: no carrier

So this looks like some issue with the way this is applied in pfSense. We made some changes to account for the fact that LAGGs usually inherit their MAC from the first member interface. However it looks like ifconfig now does that for us so it can be applied directly to the LAGG.

I have tested this in 2.4.5p1 and in 2.5/21.02 current snapshots.

No data to display

Actions

Also available in: Atom PDF