After machine boots up, when we create a vlan on Lagg interface, vlan interface takes the same MAC address as that of lagg interface. This works fine as expected. Now going further, when we add/delete members of lagg bundle, MAC address of the lagg bundle changes as expected. It is expected that vlan MAC should also get changed, when MAC of lagg interface changes, but it is not happening. This issue is present in only 10 stable. It is not present in HOL and 10.2 release.
Details
- Before Fix **
[Step-0] uname -a
- Output **
FreeBSD Host-XXX 10.3-PRERELEASE FreeBSD 10.3-PRERELEASE #2 r294978M: Thu Jan 28 16:46:33 IST 2016 amd64
[Step-1] ifconfig lagg1 create
[Step-2] ifconfig lagg1 laggproto failover laggport le1 laggport le2
[Step-3] ifconfig vlan1 create
[Step-4] ifconfig vlan1 vlan 1 vlandev lagg1
[Step-5] ifconfig
- Output **
lagg1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:0c:29:5b:6a:04
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
laggproto failover lagghash l2,l3,l4
laggport: le1 flags=1<MASTER>
laggport: le2 flags=0<>
vlan1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0c:29:5b:6a:04
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
vlan: 1 parent interface: lagg1
[Step-6] ifconfig lagg1 -laggport le1
[Step-7] ifconfig
- Output **
lagg1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:0c:29:5b:6a:0e
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
laggproto failover lagghash l2,l3,l4
laggport: le2 flags=1<MASTER>
vlan1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0c:29:5b:6a:04
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
vlan: 1 parent interface: lagg1
- Conclusion **
vlan1 MAC does not change, when Lagg1 MAC changes.
- After Fix **
[Step-0] uname -a
- Output **
FreeBSD Host-XXX 10.3-PRERELEASE FreeBSD 10.3-PRERELEASE #6 r296988: Fri Mar 18 08:30:25 IST 2016 amd64
[Step-1] ifconfig lagg1 create
[Step-2] ifconfig lagg1 laggproto failover laggport le1 laggport le2
[Step-3] ifconfig vlan1 create
[Step-4] ifconfig vlan1 vlan 1 vlandev lagg1
[Step-5] ifconfig
- Output **
lagg1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:0c:29:5b:6a:04
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
laggproto failover lagghash l2,l3,l4
laggport: le1 flags=1<MASTER>
laggport: le2 flags=0<>
vlan1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0c:29:5b:6a:04
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
vlan: 1 parent interface: lagg1
[Step-6] ifconfig lagg1 -laggport le1
[Step-7] ifconfig
- Output **
lagg1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:0c:29:5b:6a:0e
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
laggproto failover lagghash l2,l3,l4
laggport: le2 flags=1<MASTER>
vlan1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0c:29:5b:6a:0e
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
vlan: 1 parent interface: lagg1
- Conclusion **
vlan1 MAC changes, when Lagg1 MAC changes.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I'm not sure this fix is right. It might solve the problem, but might create other issues.
This commit[0], removes the call of EVENTHANDLER_INVOKE due several LOR's.
[0] https://svnweb.freebsd.org/base/stable/10/sys/net/if_lagg.c?revision=287723&view=markup&sortby=date
And this commit[1], fix properly the lladdr usage.
[1] https://svnweb.freebsd.org/base/head/sys/net/if_lagg.c?revision=290239&view=markup
So, what I will do is, I will check the impact to import r290239 on 10-Stable.
It will cost for me couple days.
Best,