Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Example: Loop Detection Using the MAC Move Approach

This example shows how to detect loops using the MAC move approach.


This example requires the following hardware and software components:

  • MX Series 3D Universal Edge Routers

  • Junos OS Release 13.2 running on all the devices


When a MAC address appears on a different physical interface or within a different unit of the same physical interface and if this behavior occurs frequently, it is considered a MAC move.

Configuration errors at the network can force traffic into never ending circular paths. Once there are loops in the Layer 2 network, one of the symptoms is frequent MAC moves, which can be used for rectification of the problem. When it is observed that a source MAC address is moving among the ports, interface is blocked based on the configured action-priority for the interface. If the action-priority value configured for interfaces is the same, the last interface for the bridge domain on which the MAC address move occurred is blocked.


CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

In the previous example, all the interfaces, including the trunk interfaces in bd10 and bd11 will be monitored. If there are frequent MAC moves detected within interfaces ge-1/0/5 and ge-1/0/6, interface ge-1/0/5 is blocked. The blocking for trunk interfaces is such that data traffic only for a VLAN (on which the MAC move is detected) will be blocked and not for all the VLANs in the trunk. No action will be taken if a frequent MAC move is observed in bd12.

Configuring Loop Detection Using the MAC Move Approach

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode.

To configure loop detection using the MAC address move approach:

  1. Configure the interfaces.

  2. Configure the bridge domain parameters.


From configuration mode, confirm your configuration by entering show interfaces and show bridge-domains commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.


Verifying That the Logical Interfaces Blocked Due to MAC Move Are Displayed


Ensure that the current set of logical interfaces blocked due to a MAC move, if any, are displayed.


From operational mode, enter the show l2-learning mac-move-buffer active command.


As a result of MAC move detection, one of the involved interface bridge domains will be blocked. The output shows that the ge-1/0/6 logical interface is blocked.