Configuring MAC Pinning on Trunk Interfaces for Bridge Domains in a Virtual Switch
A MAC move occurs when a MAC address frequently appears on a different physical interface than the one it was learned on. Frequent MAC moves indicate the presence of loops. To avoid loops across interfaces in virtual switches, you can configure MAC pinning.
This topic describes how to configure MAC pinning on a trunk interface for a bridge domain in a virtual switch. A virtual switch represents a Layer 2 network as it filters and forwards traffic only at the data link layer. Each bridge domain in a virtual switch participates in Layer 2 Learning and Forwarding. When a trunk interface for a bridge domain receives a packet tagged with a VLAN ID that matches the list of VLAN IDs specified with the bridge domain, the packet is then forwarded within the bridge domain that is configured with the matching VLAN ID.
To configure MAC pinning on trunk interfaces for bridge domains in a virtual switch:
- Configure the interface as a trunk interface and specify
the list of VLAN IDs.[edit interfaces]user@host# set interfacetype-fpc/pic/port flexible-vlan-tagginguser@host# set interfacetype-fpc/pic/port encapsulation flexible-ethernet-servicesuser@host# set interfacetype-fpc/pic/port unit logical-unit-number family bridge interface-mode trunkuser@host# set interfacetype-fpc/pic/port unit logical-unit-number family bridge vlan-id-list vlan-id-numbers
- Configure the routing instance as virtual switch and specify
the trunk interface.[edit routing-instances]user@host# set routing-instance-name instance-type virtual-switch;user@host# set routing-instance-name interface interfacetype-fpc/pic/port
- Configure the bridge domain and specify the list of VLAN
IDs.[edit routing-instances]user@host# set routing-instance-name bridge-domains bridge-domain-name vlan-id-list vlan-id-numbers
- Configure MAC pinning on the interface by including the mac-pinning statement at the [edit switch-options] hierarchy level. [edit switch-options]user@host# set interface interfacetype-fpc/pic/port mac-pinning
- In configuration mode, verify the configuration.user@host# show interfacesinterfaces {interfacetype-fpc/pic/port {flexible-vlan-tagging;encapsulation flexible-ethernet-services;unit logical-unit-number {family bridge {interface-mode trunk ;vlan-id-list vlan-id-numbers;}}}}user@host# show routing-instancesrouting-instances{routing-instance-name{instance-type virtual-switch;interface interfacetype-fpc/pic/port;}}user@host# show bridge-domainsbridge-domains {bridge-domain-name{vlan-id -list vlan-id-numbers;}}}}user@host# show switch-optionsswitch-options {interface interfacetype-fpc/pic/port {mac-pinning;}}