Enterprise SONiC Bootcamp Register Now

Sign Up

SONiC hands-on training - Module 4 - Lab 1 - MCLAG Configuration

You are a network engineer tasked with configuring MCLAG. You have a SERVER switch, which must be connected to two switches SW1 and SW2.
 
SW1 and SW2 must be in MCLAG. The interfaces Ethernet1 on SW1 and SW2 should be in LAG and in the trunk mode.
The
SERVER Ethernet 1 and Ethernet 2 interfaces should also be in LAG and in the trunk mode. 

tep 1: Create PortChannels on SW1 and SW2 Switches 

  • Log in to the switches (SW1, SW2, SERVER) using the default credentials, use the Klish CLI. Create a new PortChannels – PortChannel99 for Ethernet 8 and Ethernet 4 on SW1 and SW2 Switches. Assign the proper IP Address on both switches to that PortChannel which should be a trunk. Check if the PortChannels are up on both switches by “show portchannel summary” command. 
  • Step 2: Configure MCLAG on SW1 and SW2 Switches 

Configure MCLAG of both switches (SW1, SW2). Assign the proper PortChannel to the MCLAG domain. Assign correct source-ip, peer-ip, peer-link, mclag-system-mac on both switches. After that, check if the connection is up.  

  • Step 3: Configure PortChannel 1 on Ethernet0 on SW1 and SW2 Switches and make them trunk ports 

Configure PortChannel 1 on Ethernet0 on SW1 and SW2 Switches. Assign this PortChannel to proper MCLAG domain. Remember, these PortChannel must be in trunk mode that allows all VLANs. 

  • Step 4: Configure PortChannel on SERVER Switch. 

Create a PortChannel on SERVER Switch. Make them also the trunk ports. After that, check the configuration by command “show portchannel summary”. After that, check on all switches if the PortChannel 1 is UP. 

  • Step 5: Check if the MLAG Interface is UP on SW1 and SW2 

After you done all of the configuration of all switches, check if the PortChannel1 is UP on MCLAG switches. 

    • Default credentials: admin / YourPaSsWoRd 
    • Remember to allow all VLANs to be sent through trunk port 
    • Remember to turn enabled the interfaces that are in PortChannel. PortChannels must be enabled also. 
    • Created MCLAG on both switches must be in the same domain – for example 1 
    • Source-ip is the ip of the current link on current switch, so for this topology for SW1 will be 10.10.10.1/30, and for SW2 10.10.10.2/30 
    • Peer-ip is the ip of the neighbor switch that we want to be in MCLAG. 
    • The names of the virtual computers are different in remote access to those shown on the topology. Virtual computers and their counterparts in remote access are motioned below:
      • SW1 – mod4lab2-sw1
      • SW2 – mod4lab2-sw2
      • SERVER – mod4lab2-sw3

The purpose of the laboratory is to practice creating MCLAGs and PortChannels and how to use them in real environment. 

Step 1: Create PortChannels on SW1 and SW2 Switches 

SW1 

 1. sonic(config)# interface PortChannel 99 

 2. sonic(configifpo99)# ip address 10.10.10.1/30 

 3. sonic(configifpo99)# no shutdown 

 4. sonic(configifpo99)# exit 

 5. sonic(config)# interface range Ethernet 4,8 

 6. %Info: Configuring only existing interfaces in range 

 7. sonic(configifrangeeth**)# channelgroup 99 

 8. sonic(configifrangeeth**)# no shutdown 

 9. sonic(configifrangeeth**)# exit 

SW2 

 1. sonic(config)# interface PortChannel 99 

 2. sonic(configifpo99)# ip address 10.10.10.2/30 

 3. sonic(configifpo99)# no shutdown 

 4. sonic(configifpo99)# exit 

 5. sonic(config)# interface range Ethernet 4,8 

 6. %Info: Configuring only existing interfaces in range 

 7. sonic(configifrangeeth**)# channelgroup 99 

 8. sonic(configifrangeeth**)# no shutdown 

 9. sonic(configifrangeeth**)# exit 

Check if the PortChannel is UP 

10. sonic(config)# show portchannel summary 

11. Flags(operstatus):  D Down U Up (portchannel) P Up in portchannel (members) 

12. ————————————————————————————————————— 

13. Group               PortChannel                   Type                Protocol          Member Ports 

14. ————————————————————————————————————— 

15. 99                  PortChannel99  (U)            Eth                 LACP              Ethernet4(P) 

16.                                                                                         Ethernet8(P) 

 

 

Step 2: Configure MCLAG on SW1 and SW2 Switches 

SW1  

1. sonic(config)# mclag domain 1 

2. sonic(configmclagdomain1)# sourceip 10.10.10.1 

3. sonic(configmclagdomain1)# peerip 10.10.10.2 

4. sonic(configmclagdomain1)# peerlink PortChannel 99 

5. sonic(configmclagdomain1)# exit 

SW2 

1. sonic(config)# mclag domain 1 

2. sonic(configmclagdomain1)# sourceip 10.10.10.2 

3. sonic(configmclagdomain1)# peerip 10.10.10.1 

4. sonic(configmclagdomain1)# peerlink PortChannel 99 

5. sonic(configmclagdomain1)# exit 

 

Check if the MCLAG is UP 

SW1 

 1. sonic(config)# show mclag brief 

 2.  

 3. Domain ID            : 1 

 4. Role                 : standby 

 5. Session Status       : up <- this should be up, if there’s a down you need to check again your configuration 

 6. Peer Link Status     : up <- this should be up, if there’s a down you need to check again your configuration 

 7. Source Address       : 10.10.10.1 

 8. Peer Address         : 10.10.10.2 

 9. Peer Link            : PortChannel99 

10. Keepalive Interval   : 1 secs 

11. Session Timeout      : 30 secs 

12. Delay Restore        : 300 secs 

13. System Mac           : 0c:a8:4c:00:00:0a 

14. Mclag System Mac     : 

15.  

16.  

17. Number of MLAG Interfaces:0 

SW2 

 1. sonic(config)# show mclag brief 

 2.  

 3. Domain ID            : 1 

 4. Role                 : standby 

 5. Session Status       : up <- this should be up, if there’s a down you need to check again your configuration 

 6. Peer Link Status     : up <- this should be up, if there’s a down you need to check again your configuration 

 7. Source Address       : 10.10.10.2 

 8. Peer Address         : 10.10.10.1 

 9. Peer Link            : PortChannel99 

10. Keepalive Interval   : 1 secs 

11. Session Timeout      : 30 secs 

12. Delay Restore        : 300 secs 

13. System Mac           : 0c:a8:4c:00:00:0a 

14. Mclag System Mac     : 

15.  

16.  

17. Number of MLAG Interfaces:0 

 
 

 

Step 3: Configure PortChannel 1 on Ethernet0 on SW1 and SW2 Switches and make them trunk ports 

SW1 and SW2 

 1. sonic(config)# interface PortChannel 1 

 2. sonic(configifpo1)# no shutdown 

 3. sonic(configifpo1)# switchport trunk allowed vlan all 

 4. sonic(configifpo1)# mclag 1 

 5. sonic(configifpo1)# exit 

 6. sonic(config)# interface Ethernet1 

 7. sonic(configifEthernet1)# no shutdown 

 8. sonic(configifEthernet1)# channelgroup 1 

 9. sonic(configifEthernet1)# exit 

 

Step 4: Configure PortChannel on SERVER Switch. 

SERVER 

 1. sonic(config)# interface PortChannel 1 

 2. sonic(configifpo1)# no shutdown 

 3. sonic(configifpo1)# switchport trunk allowed vlan all 

 4. sonic(configifpo1)# exit 

 5. sonic(config)# interface range Ethernet 1,2 

 6. %Info: Configuring only existing interfaces in range 

 7. sonic(configifrangeeth**)# no shutdown 

 8. sonic(configifrangeeth**)# channelgroup 1 

 9. sonic(configifrangeeth**)# exit 

 

Check if the PortChannel is UP. 

SERVER 

1. sonic(config)# show portchannel summary 

2. Flags(operstatus):  D Down U Up (portchannel) P Up in portchannel (members) 

3. —————————————————————————————————————- 

4. Group               PortChannel                   Type                Protocol          Member Ports 

5. —————————————————————————————————————- 

6. 1                   PortChannel1   (U)            Eth                 LACP              Ethernet1(P) 

7.                                                                                         Ethernet2(P) 

 

SW1 and SW2 

1. sonic(config)# show portchannel summary 

2. Flags(operstatus):  D Down U Up (portchannel) P Up in portchannel (members) 

3. —————————————————————————————————————- 

4. Group               PortChannel                   Type                Protocol          Member Ports 

5. —————————————————————————————————————- 

6. 1                   PortChannel1   (U)            Eth                 LACP              Ethernet1(P) 

7. 99                  PortChannel99  (U)            Eth                 LACP              Ethernet4(P) 

8.                                                                                         Ethernet8(P) 

 

 

 

 

Step 5: Check if the MLAG Interface is UP on SW1 and SW2 

SW1 

 1. sonic(config)# show mclag brief 

 2.  

 3. Domain ID            : 1 

 4. Role                 : active 

 5. Session Status       : up 

 6. Peer Link Status     : up 

 7. Source Address       : 10.10.10.1 

 8. Peer Address         : 10.10.10.2 

 9. Peer Link            : PortChannel99 

10. Keepalive Interval   : 1 secs 

11. Session Timeout      : 30 secs 

12. Delay Restore        : 300 secs 

13. System Mac           : 0c:a8:4c:00:00:0a 

14. Mclag System Mac     : 

15.  

16.  

17. Number of MLAG Interfaces:1 

18. ———————————————————– 

19. MLAG Interface       Local/Remote Status 

20. ———————————————————– 

21. PortChannel1             up/up 

 

SW2 

1. sonic(config)# show mclag brief 

 2.  

 3. Domain ID            : 1 

 4. Role                 : active 

 5. Session Status       : up 

 6. Peer Link Status     : up 

 7. Source Address       : 10.10.10.2 

 8. Peer Address         : 10.10.10.1 

 9. Peer Link            : PortChannel99 

10. Keepalive Interval   : 1 secs 

11. Session Timeout      : 30 secs 

12. Delay Restore        : 300 secs 

13. System Mac           : 0c:a8:4c:00:00:0a 

14. Mclag System Mac     : 

15.  

16.  

17. Number of MLAG Interfaces:1 

18. ———————————————————– 

19. MLAG Interface       Local/Remote Status 

20. ———————————————————– 

21. PortChannel1             up/up