Understanding Qualified MAC Learning
MAC learning is the process by which a device learns the MAC addresses of all the nodes on a network.
When a node is first connected to an Ethernet LAN or VLAN, it has no information about the other nodes on the network. As data is sent through the network, data packets include a data frame listing their source and destination MAC addresses. The data frame is forwarded to a target port, which is connected to the second device. The MAC address is learned locally at the target port, which facilitates communications for frames that later enter the target port and contain addresses previously learned from a received frame.
During MAC learning, on a ingress packet, the outer tag is implicitly
removed (using the pop
operation) and the learning happens
on the inner tag. MAC learning is preceded by VLAN manipulation. VLAN
used for learning can be changed by VLAN push/pop/swap operations.
Qualified MAC learning enables a device to learn the MAC addresses
of network nodes by determining the innermost VLAN tag of single-tagged,
2-tagged , or 3-tagged ingress packets without deleting the outer
tag (using the pop
operation). If the ingress packet has
one tag, learning happens on VLAN 4096, and no tags are implicitly
removed. If the ingress packet has two tags, MAC learning happens
on the second VLAN and no tags are implicitly removed. If the ingress
packet has more than three tags, all tags beyond the third tag are
treated as part of data and are not considered for MAC learning.
Qualified MAC Learning on the First, Second, and Third VLAN Tags
For a single-tagged ingress packet, qualified MAC learning happens on VLAN 4096, which is the default VLAN.
In the case of a 2-tagged ingress packet, you enable qualified
MAC learning on the second (inner) tag by using the vlan-id inner-all
configuration statement on the VPLS routing instance. Learning on
the second tag happens without the implicit removal of the first (outer)
tag. If the ingress packet has more than two tags, all tags beyond
the second tag are treated as part of data and are not considered
for learning.
Similarly, for an 3-tagged ingress packet, you enable qualified
MAC learning on the third (innermost) tag by configuring the deep-vlan-qualified-learning vlan_tag_number
statement on the logical interface along with the vlan-id
inner-all
statement on the routing instance. Qualified MAC learning
happens on the third tag, and no VLAN manipulation happens on the
outer tags. However, if deep-vlan-qualified-learning vlan_tag_number
is enabled to learn on the third
VLAN and the ingress packet has only two VLANs, the qualified MAC
learning happens on the default VLAN 4096.
Note the following points while configuring qualified MAC learning:
A logical interface contained in a VPLS routing instance configured with
vlan-id inner-all
might or might not havedeep-vlan-qualified-learning vlan_tag_number
configured.A logical interface configured with
deep-vlan-qualified-learning vlan_tag_number
, must belong to a VPLS routing instance that also hasvlan-id inner-all
configured.A logical interface configured with
deep-vlan-qualified-learning vlan_tag_number
, must also be configured with one outer and one inner tag.