/
Example for Configuring a Basic MLAG

Example for Configuring a Basic MLAG


Networking Requirements

In Figure 1, the SwitchB has dual-access to the network through SwitchA1 and SwitchA2 using LACP LAGs.

At first, the SwitchB accesses the network through SwitchA1. If SwitchA1 or the link between SwitchB and SwitchA1 fails, SwitchB cannot communicate with the network. To avoid service interruptions, we can configure MLAG on SwitchA1 and SwitchA2. When communication between the SwitchB and SwitchA1 fails, traffics from the SwitchB will be switched to SwitchA2 keeping communication with the network. When SwitchA1 or the link between SwitchB and SwitchA1 recovers, traffic from the SwitchB will be switched back to SwitchA1.

MLAG implements a backup link aggregation group between SwitchA1 and SwitchA2 to improve network reliability.

Figure 1 MLAG Topology


Procedure

SwitchA1

Step1         Configure an aggregation interface with LACP mode.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options lacp enable true

                   admin@SwitchA1# set interface aggregate-ethernet ae2 aggregated-ether-options lacp enable true

Step2         Enable MLAG on a LAG.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag disable false

                   By default, MLAG function is enabled.

Step3         Configure MLAG domain ID.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag domain-id 1

Step4         Add member interfaces to a LAG.

                   admin@SwitchA1# set interface gigabit-ethernet ge-1/1/1 ether-options 802.3ad ae1

                   admin@SwitchA1# set interface gigabit-ethernet te-1/1/49 ether-options 802.3ad ae2

                   admin@SwitchA1# set interface gigabit-ethernet te-1/1/50 ether-options 802.3ad ae2

Step5         Configure VLAN.

                   admin@SwitchA1# set vlans vlan-id 15

                   admin@SwitchA1# set vlans vlan-id 16

                   admin@SwitchA1# set vlans vlan-id 4094 l3-interface vlan4094

                   admin@SwitchA1# set interface aggregate-ethernet ae1 family ethernet-switching port-mode trunk

                   admin@SwitchA1# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 15

                   admin@SwitchA1# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 16

                   admin@SwitchA1# set interface aggregate-ethernet ae2 family ethernet-switching native-vlan-id 4094

                   admin@SwitchA1# set interface aggregate-ethernet ae2 family ethernet-switching port-mode trunk

                   admin@SwitchA1# set interface aggregate-ethernet ae2 family ethernet-switching vlan members 15

                   admin@SwitchA1# set interface aggregate-ethernet ae2 family ethernet-switching vlan members 16

Step6         Configure the L3 interface IP address.

                   admin@SwitchA1# set vlan-interface interface vlan4094 vif 4094 address 10.10.0.1 prefix-length 24

Step7         Configure the peer IP address and the peer-link for the MLAG peer.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag peer 10.10.0.2 peer-link ae2

Step8         Configure a static ARP entry for peer-link interface.

   admin@SwitchA1# set interface gigabit-ethernet ae2 static-ethernet-switching mac-address CC:37:AB:B6:9C:33 vlan 4094

   admin@SwitchA1# set protocols arp interface vlan4094 address 10.10.0.2 mac-address CC:37:AB:B6:9C:33

NOTE:

PICA8 recommends configuring a static ARP for peer-link interface to prevent ARP entry of the peer-link interface from being modified by ARP attack packets.

Step9         (Optional) Configure MLAG system priority.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag priority 2

Step10        (Optional) Configure hello interval timer.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag hello-interval 2

Step11      (Optional) Configure reload delay timer.

                   admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag reload-delay 300

Step12       Configure system ID for LACP negotiation.

                  admin@SwitchA1# set interface aggregate-ethernet ae1 aggregated-ether-options mlag system id 00:B0:BC:00:00:00

                  System ID configured on the MLAG peer devices should be consistent.

SwitchA2

The configuration on SwitchA2 is the same as SwitchA1.

Step1         Configure an aggregation interface with LACP mode.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options lacp enable true

                   admin@SwitchA2# set interface aggregate-ethernet ae2 aggregated-ether-options lacp enable true

Step2         Enable MLAG on a LAG.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag disable false

                   By default, MLAG funtion is enabled.

Step3         Configure MLAG domain ID.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag domain-id 1

Step4         Add member interfaces to a LAG.

                   admin@SwitchA2# set interface gigabit-ethernet ge-1/1/2 ether-options 802.3ad ae1

                   admin@SwitchA2# set interface gigabit-ethernet te-1/1/49 ether-options 802.3ad ae2

                   admin@SwitchA2# set interface gigabit-ethernet te-1/1/50 ether-options 802.3ad ae2

Step5         Configure VLAN.

                   admin@SwitchA2# set vlans vlan-id 15

                   admin@SwitchA2# set vlans vlan-id 16

                   admin@SwitchA2# set vlans vlan-id 4094 l3-interface vlan4094

                   admin@SwitchA2# set interface aggregate-ethernet ae1 family ethernet-switching port-mode trunk

                   admin@SwitchA2# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 15

                   admin@SwitchA2# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 16

                   admin@SwitchA2# set interface aggregate-ethernet ae2 family ethernet-switching native-vlan-id 4094

                   admin@SwitchA2# set interface aggregate-ethernet ae2 family ethernet-switching port-mode trunk

                   admin@SwitchA2# set interface aggregate-ethernet ae2 family ethernet-switching vlan members 15

                   admin@SwitchA2# set interface aggregate-ethernet ae2 family ethernet-switching vlan members 16

Step6         Configure the L3 interface IP address.

                   admin@SwitchA2# set vlan-interface interface vlan4094 vif 4094 address 10.10.0.2 prefix-length 24

Step7         Configure the peer IP address and the peer-link for the MLAG peer.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag peer 10.10.0.1 peer-link ae2

Step8         Configure a static ARP entry for peer-link interface.

   admin@SwitchA2# set interface gigabit-ethernet ae2 static-ethernet-switching mac-address 00:18:23:30:E7:90 vlan 4094

   admin@SwitchA2# set protocols arp interface vlan4094 address 10.10.0.1 mac-address 00:18:23:30:E7:90

NOTE:

PICA8 recommends configuring a static ARP for peer-link interface to prevent ARP entry of the peer-link interface from being modified by ARP attack packets.

Step9         (Optional) Configure MLAG system priority.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag priority 3

Step10        (Optional) Configure hello interval timer.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag hello-interval 2

Step11      (Optional) Configure reload delay timer.

                   admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag reload-delay 300

Step12       Configure system ID for LACP negotiation.

                  admin@SwitchA2# set interface aggregate-ethernet ae1 aggregated-ether-options mlag system id 00:B0:BC:00:00:00

                  System ID configured on the MLAG peer device should be consistent.

SwitchB

Step1         Enable aggregation interface with LACP mode

                   admin@SwitchB# set interface aggregate-ethernet ae1 aggregated-ether-options lacp enable true

Step2         Add member interfaces to a LAG.

                   admin@SwitchB# set interface gigabit-ethernet ge-1/1/1 ether-options 802.3ad ae1

                   admin@SwitchB# set interface gigabit-ethernet ge-1/1/2 ether-options 802.3ad ae1

Step3         Configure VLAN.

                   admin@SwitchB# set vlans vlan-id 15

                   admin@SwitchB# set vlans vlan-id 16

                   admin@SwitchB# set interface aggregate-ethernet ae1 family ethernet-switching port-mode trunk

                   admin@SwitchB# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 15

                   admin@SwitchB# set interface aggregate-ethernet ae1 family ethernet-switching vlan members 16

Verify the Configuration

•  You can use the run show mlag configuration command on Switch A1 or SwitchA2 to view the information of an MLAG domain.

    admin@SwitchA1# run show mlag configuration

    Domain-id  Local-LAG  System-id           Priority     Peer               Peer-link  Hello-interval  

    ----------------------------------------------------------------------------------------------------------------------

    1                 ae1             60:eb:69:d2:9c:d7    3        10.10.0.1         ae2          4                     

•  You can use the run show mlag peer domain-id command to view the status of MLAG peerdevice of an MLAG domain.

    admin@SwitchA1# run show mlag peer 1

      Peer                  System-id              State            Link-status

    --------------------------------------------------------------------------------------------

     10.10.0.1           48:0f:cf:af:50:7f      FULL            UP

•  You can use the run show mlag internal command to view the status of MLAG interface state, and view the results of the consistency check.  

    admin@SwitchA1# run show mlag internal

    Domain-id  Local-LAG  Flood  MAC-sync  State      Config-Match              Role

    -----------------------------------------------------------------------------------------------------------------

    1                 ae1             false     true          FULL      CONFIG_MATCH       MASTER 


    admin@SwitchA2# run show mlag internal

    Domain-id  Local-LAG  Flood  MAC-sync  State      Config-Match              Role

    -----------------------------------------------------------------------------------------------------------------

    1                 ae1             false     true          FULL      CONFIG_MATCH       SLAVE

 •  You can run the run show mlag internal domain-id detail command on each peer-link device to view the details of the configuration items.

    admin@SwitchA1# run show mlag internal 1 detail

    Local-LAG: ae1

    Native VlanID: 1

    Mac Learning: true

    Untagged VlanID:

    Tagged VlanID: 15

 •  You can use the run show lacp internal command to view the config information of local LACP.

    admin@SwitchA1# run show lacp internal

    LACP System ID: 32768,48:0F:CF:AF:50:7F

    Aggregated interface: ae1

    Port Number   Priority   Admin Key   Oper Key   State   Receive State   Transmit State   Mux State

     --------------      --------      ---------          --------         -----    -------------          --------------        ------------------

     ge-1/1/1         32768      0x202            0x202        0x3D   Current             Slow Periodic    Collecting Distributing 

     Aggregated interface: ae2

     Port Number   Priority   Admin Key   Oper Key   State   Receive State   Transmit State   Mux State

      --------------      --------     ---------          --------         -----     -------------          --------------        -----------------

      te-1/1/49          32768      0x50          0x50        0x3D    Current              Slow Periodic    Collecting Distributing 

      te-1/1/50          32768      0x50          0x50        0x3D    Current              Slow Periodic    Collecting Distributing 

 •   You can use the run show lacp neighbor command to view the config information of LACP neighbor.

     admin@SwitchA1# run show lacp neighbor

     Aggregated interface: ae1

     Port Number   Partner System ID                Partner Port Num   Port Priority   Admin Key   Oper Key   State

     -----------          -----------------------                  ----------------            -------------       ---------          --------        -----

      ge-1/1/1         32768,08:9E:01:61:64:13       1                            32768            0x00             0x35      0x3D

      Aggregated interface: ae2

      Port Number   Partner System ID                    Partner Port Num   Port Priority   Admin Key   Oper Key   State

      --------------------------------------------------------------------------------------------------------------------------------------------------

       te-1/1/49           32768,70:72:CF:B7:60:A5 73       73                           32768           0x00              0x50      0x3D 

       te-1/1/50           32768,70:72:CF:B7:60:A5 73       74                           32768           0x00              0x50      0x3D 

  •  You can use the following commands on SwitchB to verify configuration:

    • run show lacp neighbor command to view the config information of LACP neighbor.

      Aggregated interface: ae1

        Port Number   Partner System ID                    Partner Port Num   Port Priority   Admin Key   Oper Key   State

            --------------------------------------------------------------------------------------------------------------------------------------------------

             ge-1/1/1      32768,48:0F:CF:AF:50:7F       1                           32768           0x00              0x202      0x3D 

             ge-1/1/2      32768,48:0F:CF:AF:50:7F       513                       32768           0x00              0x202      0x3D 

    • run show lacp internal command to view the config information of local LACP.
      LACP System ID: 32768,08:9E:01:61:64:13
      Aggregated interface: ae1

      Port Number   Priority   Admin Key   Oper Key   State   Receive State   Transmit State   Mux State

           --------------      --------      ---------          --------         -----    -------------          --------------        ------------------

       ge-1/1/1         32768      0x35            0x35          0x3D    Current             Slow Periodic    Collecting Distributing 

       ge-1/1/2         32768      0x35            0x35          0x3D    Current             Slow Periodic    Collecting Distributing 


Copyright © 2025 Pica8 Inc. All Rights Reserved.