Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

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

date_range 23-Nov-23

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.
    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set threshold-time seconds
    user@host# set threshold-count seconds
    

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

    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set threshold-time 30
    user@host# set threshold-count 4
    
    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.
    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set cooloff-time seconds
    
  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.
    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set statistical-approach-wait-time seconds
    
  4. (Optional) Configure the interface recovery time to ensure that the disabled interface gets enabled on completion of the interface recovery time duration.
    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set interface-recovery-time seconds
    
  5. (Optional) Configure the virtual MAC address to ignore the MAC moves as this leads to the assumption of loop creation.
    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@host# set virtual-mac mac-address
    
  6. Configure the VPLS routing instance of an interface.
    content_copy zoom_out_map
    [edit routing-instances instance-name]
    user@host# set instance-type vpls
    user@host# set interface interface
    
  7. Enable MAC move action on the interface for the VPLS instance, and configure the VPLS neighbor.
    content_copy zoom_out_map
    [edit routing-instances instance-name]
    user@host# set protocols vpls enable-mac-move-action
    user@host# set protocols vpls no-tunnel-services
    user@host# set protocols vpls vpls-id vpls-id
    user@host# set protocols vpls neighbor IP-address
    

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

content_copy zoom_out_map
set interfaces xe-0/0/0 unit 0 family inet address 198.51.100.8/24
set interfaces xe-0/0/0 unit 0 family mpls
set interfaces xe-0/2/0 unit 0 family inet address 198.51.100.6/24
set interfaces xe-0/2/0 unit 0 family mpls
set interfaces xe-0/3/0 vlan-tagging
set interfaces xe-0/3/0 encapsulation vlan-vpls
set interfaces xe-0/3/0 unit 600 encapsulation vlan-vpls
set interfaces xe-0/3/0 unit 600 vlan-id 600
set interfaces ge-2/0/3 unit 0 family inet address 198.51.100.1/24
set interfaces ge-2/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.0.2.1/24
set routing-options router-id 192.0.2.1
set routing-options autonomous-system 701
set protocols mpls interface fxp0.0 disable
set protocols mpls interface ge-2/0/3.0
set protocols mpls interface xe-0/2/0.0
set protocols mpls interface xe-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface ge-2/0/3.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-2/0/3.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-0/0/0.0 metric 10
set protocols ldp interface xe-0/0/0.0
set protocols ldp interface xe-0/2/0.0
set protocols ldp interface ge-2/0/3.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set protocols l2-learning global-mac-move threshold-time 30
set protocols l2-learning global-mac-move threshold-count 4
set protocols l2-learning global-mac-move cooloff-time 10
set protocols l2-learning global-mac-move statistical-approach-wait-time 10
set protocols l2-learning global-mac-move interface-recovery-time 5
set protocols l2-learning global-mac-move virtual-mac 00:00:5e:00:01:00/40
set routing-instances vpls_1 instance-type vpls
set routing-instances vpls_1 interface xe-0/3/0.600
set routing-instances vpls_1 protocols vpls no-tunnel-services
set routing-instances vpls_1 protocols vpls vpls-id 100
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.2
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.3
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.4

PE1

content_copy zoom_out_map
set interfaces ge-0/0/3 unit 0 family inet address 198.51.100.2/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces xe-1/2/0 unit 0 family inet address 198.51.100.5/24
set interfaces xe-1/2/0 unit 0 family mpls
set interfaces xe-1/2/1 unit 0 family inet address 198.51.100.3/24
set interfaces xe-1/2/1 unit 0 family mpls
set interfaces xe-1/3/1 vlan-tagging
set interfaces xe-1/3/1 encapsulation vlan-vpls
set interfaces xe-1/3/1 unit 600 encapsulation vlan-vpls
set interfaces xe-1/3/1 unit 600 vlan-id 600
set interfaces lo0 unit 0 family inet address 192.0.2.2/24
set routing-options router-id 192.0.2.2
set routing-options autonomous-system 701
set protocols mpls interface fxp0.0 disable
set protocols mpls interface ge-0/0/3.0
set protocols mpls interface xe-1/2/1.0
set protocols mpls interface xe-1/2/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-1/2/1.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-1/2/1.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-1/2/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-1/2/0.0 metric 10
set protocols ldp interface ge-0/0/3.0
set protocols ldp interface xe-1/2/0.0
set protocols ldp interface xe-1/2/1.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set protocols l2-learning global-mac-move threshold-time 30
set protocols l2-learning global-mac-move threshold-count 4
set protocols l2-learning global-mac-move cooloff-time 10
set protocols l2-learning global-mac-move statistical-approach-wait-time 10
set protocols l2-learning global-mac-move interface-recovery-time 10
set protocols l2-learning global-mac-move virtual-mac 00:00:5e:00:01:00/40
set routing-instances vpls_1 instance-type vpls
set routing-instances vpls_1 interface xe-1/3/1.600
set routing-instances vpls_1 protocols vpls enable-mac-move-action
set routing-instances vpls_1 protocols vpls no-tunnel-services
set routing-instances vpls_1 protocols vpls vpls-id 100
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.1

PE2

content_copy zoom_out_map
set interfaces xe-4/0/0 unit 0 family inet address 198.51.100.10/24
set interfaces xe-4/0/0 unit 0 family mpls
set interfaces xe-4/1/0 unit 0 family inet address 198.51.100.4/24
set interfaces xe-4/1/0 unit 0 family mpls
set interfaces xe-4/2/0 unit 0 family inet address 198.51.100.7/24
set interfaces xe-4/2/0 unit 0 family mpls
set interfaces xe-4/3/0 vlan-tagging
set interfaces xe-4/3/0 encapsulation vlan-vpls
set interfaces xe-4/3/0 unit 600 encapsulation vlan-vpls
set interfaces xe-4/3/0 unit 600 vlan-id 600
set interfaces lo0 unit 0 family inet address 192.0.2.3/24
set routing-options router-id 192.0.2.3
set routing-options autonomous-system 701
set protocols mpls interface fxp0.0 disable
set protocols mpls interface xe-4/2/0.0
set protocols mpls interface xe-4/1/0.0
set protocols mpls interface xe-4/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface xe-4/2/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-4/2/0.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-4/1/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-4/1/0.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-4/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-4/0/0.0 metric 10
set protocols ldp interface xe-4/0/0.0
set protocols ldp interface xe-4/1/0.0
set protocols ldp interface xe-4/2/0.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set protocols l2-learning global-mac-move threshold-time 30
set protocols l2-learning global-mac-move threshold-count 4
set protocols l2-learning global-mac-move threshold-count 5
set protocols l2-learning global-mac-move cooloff-time 10
set protocols l2-learning global-mac-move statistical-approach-wait-time 10
set protocols l2-learning global-mac-move interface-recovery-time 10
set protocols l2-learning global-mac-move virtual-mac 00:00:5e:00:01:00/40
set routing-instances vpls_1 instance-type vpls
set routing-instances vpls_1 interface xe-4/3/0.600
set routing-instances vpls_1 protocols vpls enable-mac-move-action
set routing-instances vpls_1 protocols vpls no-tunnel-services
set routing-instances vpls_1 protocols vpls vpls-id 100
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.1

PE3

content_copy zoom_out_map
set interfaces xe-1/0/0 unit 0 family inet address 198.51.100.9/24
set interfaces xe-1/0/0 unit 0 family mpls
set interfaces xe-1/1/0 unit 0 family inet address 198.51.100.12/24
set interfaces xe-1/1/0 unit 0 family mpls
set interfaces xe-1/2/0 unit 0 family inet address 198.51.100.11/24
set interfaces xe-1/2/0 unit 0 family mpls
set interfaces xe-1/3/0 vlan-tagging
set interfaces xe-1/3/0 encapsulation vlan-vpls
set interfaces xe-1/3/0 unit 600 encapsulation vlan-vpls
set interfaces xe-1/3/0 unit 600 vlan-id 600
set interfaces xe-2/3/0 vlan-tagging
set interfaces xe-2/3/0 encapsulation vlan-vpls
set interfaces xe-2/3/0 unit 600 encapsulation vlan-vpls
set interfaces xe-2/3/0 unit 600 vlan-id 600
set interfaces lo0 unit 0 family inet address 192.0.2.4/24
set routing-options router-id 192.0.2.4
set routing-options autonomous-system 701
set protocols mpls interface fxp0.0 disable
set protocols mpls interface xe-1/2/0.0
set protocols mpls interface xe-1/0/0.0
set protocols mpls interface xe-1/1/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface xe-1/2/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-1/2/0.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-1/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-1/0/0.0 metric 10
set protocols ospf area 0.0.0.0 interface xe-1/1/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface xe-1/1/0.0 metric 10
set protocols ldp interface xe-1/0/0.0
set protocols ldp interface xe-1/1/0.0
set protocols ldp interface xe-1/2/0.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set protocols l2-learning global-mac-move threshold-time 30
set protocols l2-learning global-mac-move threshold-count 4
set protocols l2-learning global-mac-move cooloff-time 10
set protocols l2-learning global-mac-move statistical-approach-wait-time 10
set protocols l2-learning global-mac-move interface-recovery-time 10
set protocols l2-learning global-mac-move virtual-mac 00:00:52:00:01:00/40
set policy-options policy-statement pplb then load-balance per-packet
set routing-instances vpls_1 instance-type vpls
set routing-instances vpls_1 interface xe-1/3/0.600
set routing-instances vpls_1 interface xe-2/3/0.600
set routing-instances vpls_1 protocols vpls no-tunnel-services
set routing-instances vpls_1 protocols vpls vpls-id 100
set routing-instances vpls_1 protocols vpls neighbor 192.0.2.1

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.

    content_copy zoom_out_map
    [edit interfaces]
    user@PE1# set ge-0/0/3 unit 0 family inet address 198.51.100.2/24
    user@PE1# set ge-0/0/3 unit 0 family mpls
    user@PE1# set xe-1/2/0 unit 0 family inet address 198.51.100.5/24
    user@PE1# set xe-1/2/0 unit 0 family mpls
    user@PE1# set xe-1/2/1 unit 0 family inet address 198.51.100.3/24
    user@PE1# set xe-1/2/1 unit 0 family mpls
    user@PE1# set xe-1/3/1 vlan-tagging
    user@PE1# set xe-1/3/1 encapsulation vlan-vpls
    user@PE1# set xe-1/3/1 unit 600 encapsulation vlan-vpls
    user@PE1# set xe-1/3/1 unit 600 vlan-id 600
    user@PE1# set lo0 unit 0 family inet address 192.0.2.2/24
    
  2. Configure the routing options.

    content_copy zoom_out_map
    [edit routing-options]
    user@PE1# set router-id 192.0.2.2
    user@PE1# set autonomous-system 701
    
  3. Configure the MPLS protocol on the interface.

    content_copy zoom_out_map
    [edit protocols mpls]
    user@PE1# set interface fxp0.0 disable
    user@PE1# set interface ge-0/0/3.0
    user@PE1# set interface xe-1/2/1.0
    user@PE1# set interface xe-1/2/0.0
    
  4. Configure the OSPF protocol.

    content_copy zoom_out_map
    [edit protocols ospf]
    user@PE1# set area 0.0.0.0 interface lo0.0 passive
    user@PE1# set area 0.0.0.0 interface fxp0.0 disable
    user@PE1# set area 0.0.0.0 interface ge-0/0/3.0 interface-type p2p
    user@PE1# set area 0.0.0.0 interface ge-0/0/3.0 metric 10
    user@PE1# set area 0.0.0.0 interface xe-1/2/1.0 interface-type p2p
    user@PE1# set area 0.0.0.0 interface xe-1/2/1.0 metric 10
    user@PE1# set area 0.0.0.0 interface xe-1/2/0.0 interface-type p2p
    user@PE1# set area 0.0.0.0 interface xe-1/2/0.0 metric 10
    
  5. Configure the LDP protocols on the interfaces.

    content_copy zoom_out_map
    [edit protocols ldp]
    user@PE1# set interface ge-0/0/3.0
    user@PE1# set interface xe-1/2/0.0
    user@PE1# set interface xe-1/2/1.0
    user@PE1# set interface fxp0.0 disable
    user@PE1# set interface lo0.0
    
  6. Configure the threshold time and the threshold count to detect MAC moves.

    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@PE1# set threshold-time 30
    user@PE1# set threshold-count 4
    
  7. Configure VPLS MAC move parameters like cooloff time, statistical approach wait time, interface recovery time, and virtual MAC.

    content_copy zoom_out_map
    [edit protocols l2-learning global-mac-move]
    user@PE1# set cooloff-time 10
    user@PE1# set statistical-approach-wait-time 10
    user@PE1# set interface-recovery-time 10
    user@PE1# set virtual-mac 00:00:5e:00:01:00/40
    
  8. Enable MAC move action on the interface for the VPLS instance vpls_1.

    content_copy zoom_out_map
    [edit routing-instances vpls_1]
    user@PE1# set instance-type vpls
    user@PE1# set interface xe-1/3/1.600
    user@PE1# set protocols vpls enable-mac-move-action
    user@PE1# set protocols vpls no-tunnel-services
    user@PE1# set protocols vpls vpls-id 100
    user@PE1# set protocols vpls neighbor 192.0.2.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.

content_copy zoom_out_map
user@PE1# show interfaces
ge-0/0/3 {
    unit 0 {
        family inet {
            address 198.51.100.2/24;
        }
        family mpls;
    }
}
xe-1/2/0 {
    unit 0 {
        family inet {
            address 198.51.100.5/24;
        }
        family mpls;
    }
}
xe-1/2/1 {
    unit 0 {
        family inet {
            address 198.51.100.3/24;
        }
        family mpls;
    }
}
xe-1/3/1 {
    vlan-tagging;
    encapsulation vlan-vpls;
    unit 600 {
        encapsulation vlan-vpls;
        vlan-id 600;
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.0.2.2/24;
        }
    }
}
content_copy zoom_out_map
user@PE1# show protocols
mpls {
    interface fxp0.0 {
        disable;
    }
    interface ge-0/0/3.0;
    interface xe-1/2/1.0;
    interface xe-1/2/0.0;
}
ospf {
    area 0.0.0.0 {
        interface lo0.0 {
            passive;
        }
        interface fxp0.0 {
            disable;
        }
        interface ge-0/0/3.0 {
            interface-type p2p;
            metric 10;
        }
        interface xe-1/2/1.0 {
            interface-type p2p;
            metric 10;
        }
        interface xe-1/2/0.0 {
            interface-type p2p;
            metric 10;
        }
    }
}
ldp {
    interface ge-0/0/3.0;
    interface xe-1/2/0.0;
    interface xe-1/2/1.0;
    interface fxp0.0 {
        disable;
    }
    interface lo0.0;
}
l2-learning {
    global-mac-move {
        threshold-time 30;
        threshold-count 4;
    }
    global-mac-move {
        cooloff-time 10;
        statistical-approach-wait-time 10;
        interface-recovery-time 10;
        virtual-mac 00:00:5e:00:01:00/40;
    }
}
content_copy zoom_out_map
user@PE1# show routing-instances
vpls_1 {
    instance-type vpls;
    interface xe-1/3/1.600;
    protocols {
        vpls {
            enable-mac-move-action;
            no-tunnel-services;
            vpls-id 100;
            neighbor 192.0.2.1;
        }
    }
}

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.

content_copy zoom_out_map
user@PE1> show vpls mac-move-action
Instance: vpls_1
   Local interface: xe-1/3/1.600, Index: 341
     Algorithm used : Base IFL
     Time rec       : 02:30:35
     Recovery timer : Yes
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.

content_copy zoom_out_map
user@PE1> show vpls mac-move-action instance vpls_1

		 Instance: vpls_1
   	 Local interface: xe-1/3/1.600, Index: 341
     Algorithm used : Base IFL         
     Time rec       : 02:29:35            
     Recovery timer : Yes     
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.

content_copy zoom_out_map
user@PE1> show l2-learning mac-move-buffer

MAC                  Time              Bridge
Address              Rec.              Domain
00:10:00:01:00:09    03:26:00          __vpls_1__     
00:10:00:01:00:05    03:26:00          __vpls_1__     
00:10:00:01:00:03    03:26:00          __vpls_1__     
00:10:00:01:00:05    03:26:00          __vpls_1__     
00:10:00:01:00:08    03:26:00          __vpls_1__     
00:10:00:01:00:01    03:26:00          __vpls_1__     
00:10:00:01:00:03    03:26:00          __vpls_1__     
00:10:00:01:00:01    03:26:00          __vpls_1__     
00:10:00:01:00:00    03:26:00          __vpls_1__     
00:10:00:01:00:01    03:26:01          __vpls_1__     
00:10:00:01:00:06    03:26:01          __vpls_1__     
00:10:00:01:00:02    03:26:01          __vpls_1__     
00:10:00:01:00:08    03:26:01          __vpls_1__     
00:10:00:01:00:00    03:26:01          __vpls_1__     
00:10:00:01:00:01    03:26:01          __vpls_1__     
00:10:00:01:00:09    03:26:01          __vpls_1__     

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.

content_copy zoom_out_map
user@PE1> show vpls mac-table extensive

MAC address: 00:10:00:01:00:00
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: lsi.1049165  
   Base learning interface: lsi.1049165  
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 0                            Sequence number: 1     
   Learning mask: 0x00000001        

MAC address: 00:10:00:01:00:01
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: lsi.1049165  
   Base learning interface: lsi.1049165  
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 0                            Sequence number: 1     
   Learning mask: 0x00000001        

MAC address: 00:10:00:01:00:02
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: lsi.1049165  
   Base learning interface: lsi.1049165  
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 0                            Sequence number: 1     
   Learning mask: 0x00000001        

MAC address: 00:10:00:01:00:03
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: lsi.1049165  
   Base learning interface: lsi.1049165  
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 0                            Sequence number: 1     
   Learning mask: 0x00000001        
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.

content_copy zoom_out_map
user@PE1> show interfaces xe-1/3/1.600

Logical interface xe-1/3/1.600 (Index 341) (SNMP ifIndex 2864)
 Flags: Up Link-Layer-Down SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.600 ]  Encapsulation: VLAN-VPLS
Input packets : 2234018970
Output packets: 2234728895
Protocol vpls, MTU: 1518
Flags: Is-Primary
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.

content_copy zoom_out_map
user@PE1> show vpls mac-table extensive

MAC address: 00:10:00:01:00:00
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: xe-1/3/1.600 
   Base learning interface: NULL         
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 3                            Sequence number: 442   
   Learning mask: 0x00000002        

MAC address: 00:10:00:01:00:01
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: xe-1/3/1.600 
   Base learning interface: NULL         
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 3                            Sequence number: 442   
   Learning mask: 0x00000003        

MAC address: 00:10:00:01:00:02
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: xe-1/3/1.600 
   Base learning interface: NULL         
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 3                            Sequence number: 442   
   Learning mask: 0x00000002        

MAC address: 00:10:00:01:00:03
  Routing instance: vpls_1
   Bridging domain: __vpls_1__, VLAN : NA
   Learning interface: xe-1/3/1.600 
   Base learning interface: NULL         
   Layer 2 flags: in_hash,in_ifd,in_ifl,in_vlan,in_rtt,kernel,in_ifbd
   Epoch: 3                            Sequence number: 442   
   Learning mask: 0x00000002        
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.
footer-navigation