Page MenuHomeFreeBSD

MAC of VLAN interface does not change
AbandonedPublic

Authored by rpokala on Mar 18 2016, 11:37 AM.

Details

Summary

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.

Test Plan
  • 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
Unit Tests Skipped

Event Timeline

pushkarbk_gmail.com retitled this revision from to VLAN interface MAC does not change.Mar 18 2016, 11:37 AM
pushkarbk_gmail.com updated this object.
pushkarbk_gmail.com edited the test plan for this revision. (Show Details)
pushkarbk_gmail.com updated this revision to Diff 14418.

Changes look good to me.

Regards,
LN

pushkarbk_gmail.com retitled this revision from VLAN interface MAC does not change to MAC of VLAN interface does not change.Mar 18 2016, 11:40 AM
pushkarbk_gmail.com updated this object.
pushkarbk_gmail.com edited the test plan for this revision. (Show Details)
pushkarbk_gmail.com edited edge metadata.
gopu.0206_gmail.com accepted this revision.

I am fine with the changes.

This revision is now accepted and ready to land.Mar 18 2016, 11:46 AM
araujo edited edge metadata.Mar 22 2016, 7:22 AM
araujo requested changes to this revision.

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,

This revision now requires changes to proceed.Mar 22 2016, 7:22 AM
rpokala edited reviewers, added: pushkarbk_gmail.com; removed: rpokala.Jun 8 2018, 3:22 AM
rpokala commandeered this revision.
rpokala abandoned this revision.Jun 8 2018, 3:22 AM