Summary
Add support for user-defined MAC addresses on dummy interfaces
Use case
There are a number of use cases for having a MAC address on dummy interfaces. My specific use case is to anchor a MAC address to a bridge interface in an EVPN-MH deployment. This prevents the anycast gateway's MAC address from being treated as unknown unicast traffic in certain failure scenarios, which causes erroneous duplication of packets through flooding to the DF.
Before anchoring to bridge
vyos@PE2# sudo bridge fdb show | grep aa:bb aa:bb:cc:dd:ee:f0 dev br0 self permanent --> No exit interfaces causes this to be treated as unknown unicast vyos@vyos# run ping 172.16.0.6 PING 172.16.0.6 (172.16.0.6) 56(84) bytes of data. 64 bytes from 172.16.0.6: icmp_seq=1 ttl=62 time=3.87 ms 64 bytes from 172.16.0.6: icmp_seq=1 ttl=62 time=5.02 ms (DUP!)
After anchoring to bridge
vyos@PE2# sudo bridge fdb show | grep aa:bb aa:bb:cc:dd:ee:f0 dev dum10 vlan 1 master br0 permanent aa:bb:cc:dd:ee:f0 dev dum10 master br0 permanent aa:bb:cc:dd:ee:f0 dev br0 self permanent vyos@vyos# run ping 172.16.0.6 PING 172.16.0.6 (172.16.0.6) 56(84) bytes of data. 64 bytes from 172.16.0.6: icmp_seq=1 ttl=62 time=4.49 ms