Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring Loop Prevention in VPLS Network Due to MAC Moves

MAC Moves Loop Prevention in VPLS Network Overview

Starting in Junos OS 14.2, you can configure the router to prevent a loop in a VPLS network. In a virtual private LAN service (VPLS) deployment, when a previously learned media access control (MAC) address appears on a different physical interface, for example, local interfaces (Gigabit Ethernet interfaces) or label switched Interfaces (LSIs), or within a different unit of the same physical interface and if this behavior occurs frequently, then it is considered a MAC move.

You can configure the router to report a MAC address move based on the following parameters:

  • Number of times a MAC address move occurs

  • Specified period of time over which the MAC address move occurs

Configuration errors at the network can force traffic into never ending circular paths or loops. These loops in the VPLS network cause frequent MAC moves between different interfaces which can be used to rectify the problem by disabling such an interface in the network. The following two approaches can be used to disable the interface causing the loop:

  • Base learning interface (base IFL) approach algorithm- This is the primary approach used to disable the looped interface. Base interface information is maintained for every MAC in the routing instance. If the MAC stays at the interface it was first learned for 300 seconds, then the interface-MAC association is considered to be stable and this interface is considered as the base interface of the MAC. If the MAC move happens frequently between the local interface and the LSI interface while the base interface of the MAC is an LSI, then the local interface is considered to be looped and has to be disabled.

  • Statistical approach algorithm– This is the secondary approach used to disable the looped interface. If the MAC has not been learned for over 300 seconds at an interface, then it does not have a base interface and hence the statistical approach is used.

    If the MAC that has no base interface information( Base Learning interface is null) starts moving, then the statistics of such MAC moves between different interfaces is learned. If the statistics show MAC moves from LSI to local interface or from local interface to local interface, then the local interface is considered to be looped and is disabled.

There are certain MACs that can move between different interfaces, for example, primary role change in the Virtual Router Redundancy Protocol (VRRP). The base interface of such MAC moves cannot be maintained as this leads to the assumption of a loop creation. Hence, such MACs should be configured as virtual MACs. Example of virtual MACs are 00:00:5e:00:01:xx for VRRP, 00:00:0c:07:ac:xx for hot standby router protocol (HSRP) , 00:07:b4:00:01:xx for global server load balancing (GSLB), and 02:bf:xx:xx:xx:xx for VMotion.

Starting with Junos OS Release 17.4R1, the global-mac-move statement replaces the vpls-mac-move statement. The following timers under the global-mac-move statement help in monitoring the disabled interfaces:

  • Cooloff time — The cooloff time starts when the interface gets disabled. During this time any MAC move happening in the routing instance is ignored. This ensures that only one interface is blocked at a given time on a routing instance, and blocking of another interface happens only after the expiration of the cooloff timer provided the given MAC moves are still observed. By default, the cooloff time is 30 seconds.

  • Interface recovery time — When an interface gets disabled , it is disabled permanently. Configuring the interface recovery time ensures that the interface gets enabled on completion of the interface recovery time duration. We recommend that you configure an interface recovery time of more than 300 seconds.

  • Statistical approach wait time — The time when the statistics are collected after MAC moves are observed to determine the existence of a loop when there is no base IFL for the MAC address. . By default, the statistical approach wait timer is 30 seconds.

    Before the base learning interface of a MAC address is established, the statistical approach algorithm is used in MAC move loop prevention. When a statistical approach algorithm is used, the offending MAC address is shown with a MAC address of 00:00:00:00:00:00. Until the base learning interface of MAC addresses are established, this may cause interfaces with routing loops to be misidentified.

Configuring VPLS Loop Prevention Due to MAC Moves

In a virtual private LAN service (VPLS) deployment, when a previously learned media access control (MAC) address appears on a different physical interface, for example, local interfaces (Gigabit Ethernet interfaces) or label switched Interfaces (LSIs), or within a different unit of the same physical interface and if this behavior occurs frequently, then it is considered a MAC move. The router reports a MAC address move based on the number of times a MAC address move occurs and the specified period of time over which the MAC address move occurs. Configuration errors at the VPLS network can lead to loops that cause frequent MAC moves between different interfaces. These moves can be used to rectify the problem by disabling such interface in the network. The following two approaches can be used to disable the interface:

  • Base learning interface (base IFL) approach algorithm — This is the primary approach used to disable the looped local interface.

  • Statistical approach algorithm — This is the secondary approach used to disable the looped local interface.

Some virtual MACs can genuinely move between different interfaces and such MACs can be configured to ignore the moves. The cooloff time and the statistical approach wait time are used internally to find out the looped interface. The interface recovery time can be configured to auto-enable the interface that gets disabled due to a loop in the network.

Before you begin to configure loop prevention in a VPLS network:

  1. Configure the VPLS topology.

  2. Configure the VPLS routing instances.

  3. Enable VPLS MAC move action on a VPLS instance.

  4. Configure the routing and signaling protocols.

The following uses the global-mac-move command, which replaced the vpls-mac-move command starting with Junos OS Release 17.4R1.

To configure loop prevention in a VPLS network:

  1. Configure the threshold time and the threshold count to detect MAC moves.

    For example, configure the threshold time as 30 and the threshold count as 4 to detect MAC moves.

    Note:

    If the threshold time and threshold count are not configured, then the default values are used. The default value of threshold time is 1 second, and default value of threshold count is 50.

  2. (Optional) Configure a cooloff time to ensure that no other interface gets disabled once an interface, for a routing instance, is disabled during this time period.
  3. (Optional) Configure the statistical approach wait time to determine the existence of a loop based on the statistics collected after MAC moves are observed when there is no base IFL for the MAC address.
  4. (Optional) Configure the interface recovery time to ensure that the disabled interface gets enabled on completion of the interface recovery time duration.
  5. (Optional) Configure the virtual MAC address to ignore the MAC moves as this leads to the assumption of loop creation.
  6. Configure the VPLS routing instance of an interface.
  7. Enable MAC move action on the interface for the VPLS instance, and configure the VPLS neighbor.

Example: Configuring Loop Prevention in VPLS Network Due to MAC Moves

This example shows how to prevent a loop in the VPLS network due to MAC moves between different physical interfaces.

When a MAC move is detected in the VPLS network, Junos OS allows the prevention of the loop in the network by disabling the interface using a base IFL or statistical approach algorithm.

Requirements

This example uses the following hardware and software components:

  • Four MX Series 5G Universal Routing Platforms

  • Junos OS Release 14.2 or later running on all devices

Before you begin:

  1. Configure the VPLS topology.

  2. Configure the VPLS routing instances.

  3. Enable VPLS MAC move action on a VPLS instance.

  4. Configure the routing and signaling protocols.

Overview

Starting with Junos OS Release 14.2, the loop creation in the VPLS network due to frequent MAC moves between different physical interfaces can be prevented by identifying and disabling such interfaces using the base IFL approach or statistical approach algorithm.

The base IFL approach algorithm is the primary approach. Base interface information is maintained for every MAC in the routing instance. If the MAC stays at the interface it was first learned for 300 seconds, then the interface-MAC association is considered to be stable, and this interface is considered as the base interface of the MAC. If the MAC move happens frequently between the local interface and the LSI interface while the base interface of the MAC is an LSI, then the local interface is considered to be looped and has to be disabled.

The statistical approach algorithm is the secondary approach used to disable the looped interface. If the MAC has not been learned for over 300 seconds at an interface, then it does not have a base interface and hence the statistical approach is used. If the MAC that has no base interface information( Base Learning interface is null) starts moving then the statistics of such MAC moves between different interfaces is learned. If the statistics show MAC moves from LSI to local interface or from local interface to local interface then the local interface is considered to be looped and is disabled.

Topology

In the topology shown in Figure 1, a loop was detected on Device PE1 in the VPLS network.

Figure 1: Example Loop Prevention Due to MAC Move in VPLS NetworkExample Loop Prevention Due to MAC Move in VPLS Network

Configuration

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.

This example uses the global-mac-move command, which replaced the vpls-mac-move command starting with Junos OS Release 17.4R1.

PE0

PE1

PE2

PE3

Configuring Device PE1

Step-by-Step Procedure

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

To configure Device PE1:

Note:

Repeat this procedure for Routers PE0, PE2, and PE3 after modifying the appropriate interface names, addresses, and any other parameters for the router.

  1. Configure the interfaces.

  2. Configure the routing options.

  3. Configure the MPLS protocol on the interface.

  4. Configure the OSPF protocol.

  5. Configure the LDP protocols on the interfaces.

  6. Configure the threshold time and the threshold count to detect MAC moves.

  7. Configure VPLS MAC move parameters like cooloff time, statistical approach wait time, interface recovery time, and virtual MAC.

  8. Enable MAC move action on the interface for the VPLS instance vpls_1.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show routing-options, and show routing-instances 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.

Verification

Verify that the configuration is working properly.

Verifying the MAC Move in a VPLS Network

Purpose

Verify that the MAC move is observed in a VPLS network.

Action

From operational mode, run the show vpls mac-move-action command for Device PE1.

Meaning

The output shows Instance name, Local interface and Algorithm used indicating that VPLS MAC Move is observed in a VPLS network.

Verifying the MAC Move in a VPLS Instance

Purpose

Verify that the MAC move is observed in a VPLS instance.

Action

From operational mode, run the show vpls mac-move-action instance instance-name command for Device PE1.

Meaning

The output shows Local interface, and Algorithm used indicating that VPLS MAC move has been observed in a VPLS instance.

Verifying the MAC Move Buffer in a VPLS Network

Purpose

Verify the MAC move buffer to monitor the MAC moves that are occurring in the VPLS network.

Action

From operational mode, run the show l2-learning mac-move-buffer command for Device PE1.

Verifying the VPLS MAC Table for the Base IFL Approach Algorithm

Purpose

Verify the base learning interfaces for the MAC addresses. .

Action

From operational mode, run the show vpls mac-table extensive command to obtain extensive information of VPLS MAC table.

Meaning

The output of the command show vpls mac-table extensive shows the base learning interface of the MAC address.

Verifying That the Interface Is Disabled

Purpose

Verify that the base learning interface of the MAC address is disabled.

Action

From operational mode, run the show interfaces interface-name command for Device PE1.

Meaning

The flag link-layer-down in the output indicates that the interface is disabled.

Verifying the VPLS MAC Table for the Statistical Approach Algorithm

Purpose

Verify the VPLS MAC table for the statistical approach algorithm.

Action

From operational mode, run the show vpls mac-table extensive command for Device PE1.

Meaning

The Base learning interface is null which indicates that the statistical approach is in use.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
14.2
Starting in Junos OS 14.2, you can configure the router to prevent a loop in a VPLS network.