Bridge and Independent VLAN learning - VLAN interfaces locked MAC addresses

Actually it is not possible to change the MAC addresses for VLAN interfaces on bridges.

This can be a problem when a device external MAC address in a VLAN is the one that is used on the bridge and other bridge VLAN interfaces. This create a MAC address conflict.

It should be possible with an Independent VLAN learning bridge to set a different MAC address for each VLAN interface on the bridge.


Why VLAN interfaces on bridges are actually locked to the MAC address of the underlying bridge interface ? is there a reason, or is it just some glue code missing to allow configuration of the VLAN interface MAC address ?

AFAIK it’s customary to have same MAC address in all VLANs handled by same hardware interface in many OSes.

In addition: this is not a problem at all with IVL as all switches will build their FDB with triplets VID+MAC+port. This can be a problem with SVL when different VLANs take different paths (e.g. with MSTP), when switches build their FDB with dublets MAC+port …

Regardless, there are some tricks to get different MAC per VLAN, one of them involves multiple bridges. And probably there are other tricks.



AFAIK it’s customary to have same MAC address in all VLANs handled by same hardware interface in many OSes.

Yes but it is probably more an historical reason, when all bridges were SVL even inside hardware switches.

The problem with the actual implementation, is that if the bridge ports are not hardware accelerated, then even if you do not add the bridge interface inside some VLAN aware bridge VLANs, then the bridge MAC address will be learned by every VLAN FIB and will conflict if you have a VLAN with an external MAC that is the same as the bridge MAC address. It is not a common situation, but it can happen when replacing an Internet provider box by a router : because you’ll need the same MAC address inside the router for some VLANs, and outside the router for other ones. This is because some providers are protecting their network by checking the destination MAC address on every VLAN they deliver. Then you have to keep this MAC address on different VLANs inside the router, but externally you’ll need it too for one or two of them.

I had this problem. I did solved it activating hardware offload on the required ports.

Seems like when the bridge ports are hardware offloaded, the IVL is a full IVL : when you do not put a VLAN interface on the bridge for a VLAN, and when you do not put the bridge interface inside this VLAN as a tagged port, then the bridge MAC address is not learned by the FIB of this VLAN. But if the physical ports are not hardware accelerated, then the FIBs will learn the bridge MAC address for every VLANs even if the bridge interface is not in those VLANs.