Skip to content

Layer 2 Leaf-Spine Lab

Lab Topology

Note

The manually entered commands that are part of this lab are equivalent to L2LS_s1-leaf4_complete.

Preparing The Lab

  1. Log into the LabAccess jumpserver:

    1. Type l2ls at the Main Menu prompt.

      Info

      Did you know the l2ls script is composed of Python code that uses the CloudVision Portal REST API to automate the provisioning of CVP Configlets? The configlets that are configured via the REST API are L2LS_s1-spine1, L2LS_s1-spine2, L2LS_s1-leaf1, L2LS_s1-leaf2, L2LS_s1-leaf3, and L2LS_s1-leaf4.

    2. The script will pre-configure the topology with the exception of s1-Leaf4. The main task is to configure this device.

Lab Tasks

Note

Arista EOS utilizes an Industry-Standard CLI. When entering configuration commands, be sure to first type configure to enter configuration mode.

Pre-Deployment Verification

  1. On s1-leaf3, verify EOS MLAG operational details. Since configuration is not complete yet, it will not be up.

    Note

    Full commands will be typed for reference in lab steps, but commands in EOS can be shortened or tab-completed at the user's discretion.

    Command

    show mlag
    

    Expected Output

    s1-leaf3#show mlag
    MLAG Configuration:
    domain-id                          :                MLAG
    local-interface                    :            Vlan4094
    peer-address                       :        10.255.255.2
    peer-link                          :       Port-Channel1
    peer-config                        :
    
    MLAG Status:
    state                              :            Inactive
    negotiation status                 :          Connecting
    peer-link status                   :      Lowerlayerdown
    local-int status                   :      Lowerlayerdown
    system-id                          :   00:00:00:00:00:00
    dual-primary detection             :            Disabled
    dual-primary interface errdisabled :               False
    
    MLAG Ports:
    Disabled                           :                   2
    Configured                         :                   0
    Inactive                           :                   0
    Active-partial                     :                   0
    Active-full                        :                   0
    

    Command

    show mlag interfaces
    

    Expected Output

    s1-leaf3#show mlag interfaces
                                                                      local/remote
    mlag   desc                                state   local   remote        status
    ----- -------------------------------- ---------- ------- -------- ------------
    5    MLAG Downlink - s1-host2         disabled     Po5        -          up/-
    34   MLAG Uplink - s1-spine1 and s1   disabled    Po34        -          up/-
    

Configure the MLAG domain

  1. On s1-leaf4, configure the layer 2 VLANs for host connectivity.

    Commands

    vlan 112
       name Host_Network_112
    !
    vlan 134
       name Host_Network_134
    
  2. Configure the layer 2 VLANs MLAG communication between the peer switches.

    Note

    Arista best practices leverage a trunk group to limit layer 2 forwarding of the MLAG peering VLAN to only the peer-link, which we will see later. This is because we also recommend disabling STP operation on the MLAG peering VLAN to ensure MLAG adjacency can form immediately as EOS comes up without waiting for the STP learning process to complete.

    Commands

    vlan 4094
       trunk group MLAGPEER
    !
    no spanning-tree vlan-id 4094
    
  3. Configure the MLAG Peer-link Port-Channel on s1-leaf4 to connect to s1-leaf3.

    Note

    Here, the trunk group applied to the MLAG peering VLAN is applied to the peer-link to ensure the MLAG VLAN is only forwarded on this link. Note we also can do interface ranges and groups when applying similar configurations as shown. Member interfaces of a port-channel will inherit all configuration of the parent so there is no need to apply things like switchport commands to the individual interfaces.

    Commands

    interface Port-Channel1
       description MLAG Peer-link - s1-leaf3
       switchport mode trunk
       switchport trunk group MLAGPEER
    !
    interface Ethernet1,6
       description MLAG Peer-link - s1-leaf3
       channel-group 1 mode active
    
  4. Verify Port-Channel and L2 forwarding status.

    Note

    In EOS, any command can be run from any CLI mode. Here we can run show commands directly from interface configuration mode.

    Command

    show interfaces status
    

    Expected Output

    s1-leaf4(config-if-Et1,6)#show interfaces status
    Port       Name                      Status       Vlan     Duplex Speed Type               Flags Encapsulation
    Et1        MLAG Peer-link - s1-leaf3 connected    in Po1   full   1G     EbraTestPhyPort
    Et2                                  connected    1        full   1G     EbraTestPhyPort
    Et3                                  connected    1        full   1G     EbraTestPhyPort
    Et4                                  connected    1        full   1G     EbraTestPhyPort
    Et6        MLAG Peer-link - s1-leaf3 connected    in Po1   full   1G     EbraTestPhyPort
    Ma0                                  connected    routed   a-full a-1G   10/100/1000
    Po1        MLAG Peer-link - s1-leaf3 connected    trunk    full   2G     N/A
    

    Command

    show port-channel dense
    

    Expected Output

    s1-leaf4(config-if-Et1,6)#show port-channel dense
    
                      Flags
    -------------------------- ----------------------------- -------------------------
       a - LACP Active            p - LACP Passive           * - static fallback
       F - Fallback enabled       f - Fallback configured    ^ - individual fallback
       U - In Use                 D - Down
       + - In-Sync                - - Out-of-Sync            i - incompatible with agg
       P - bundled in Po          s - suspended              G - Aggregable
       I - Individual             S - ShortTimeout           w - wait for agg
      E - Inactive. The number of configured port channels exceeds the config limit
       M - Exceeds maximum weight
    
    Number of channels in use: 1
    Number of aggregators: 1
    
       Port-Channel       Protocol    Ports
    ------------------ -------------- ------------------
       Po1(U)             LACP(a)     Et1(PG+) Et6(PG+)
    

    Command

    show interfaces trunk
    

    Expected Output

    s1-leaf4(config-if-Et1,6)#show interfaces trunk
    Port            Mode            Status          Native vlan
    Po1             trunk           trunking        1
    
    Port            Vlans allowed
    Po1             All
    
    Port            Vlans allowed and active in management domain
    Po1             1,112,134,4094
    
    Port            Vlans in spanning tree forwarding state
    Po1             1,112,134,4094
    
  5. Configure the MLAG Layer 3 peering network.

    Note

    The MLAG VLAN and peering network are used only for communication between the peer switches. As such, the IP network that is used does not need to be unique or routeable (though it can be if customers choose). In the lab, we reuse 10.255.255.252/30 on all MLAG pairs.

    Commands

    interface Vlan4094
       description MLAG Peer Network
       ip address 10.255.255.2/30
    
  6. Verify layer 3 connectivity between the peer switches on the MLAG VLAN.

    Command

    ping 10.255.255.1
    

    Expected Output

    s1-leaf4(config-if-Vl4094)#ping 10.255.255.1
    PING 10.255.255.253 (10.255.255.1) 72(100) bytes of data.
    80 bytes from 10.255.255.1: icmp_seq=1 ttl=64 time=7.33 ms
    80 bytes from 10.255.255.1: icmp_seq=2 ttl=64 time=6.82 ms
    80 bytes from 10.255.255.1: icmp_seq=3 ttl=64 time=5.65 ms
    80 bytes from 10.255.255.1: icmp_seq=4 ttl=64 time=7.16 ms
    80 bytes from 10.255.255.1: icmp_seq=5 ttl=64 time=7.53 ms
    
    --- 10.255.255.1 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 29ms
    rtt min/avg/max/mdev = 5.659/6.903/7.530/0.663 ms, ipg/ewma 7.281/7.135 ms
    
  7. Define the MLAG Domain parameters to establish the peering.

    Note

    Similar to the peering network, the MLAG domain-id can be re-used across pairs as it is a locally significant value. The other values describe the connectivity between the peer switches.

    Commands

    mlag configuration
       domain-id MLAG
       local-interface Vlan4094
       peer-address 10.255.255.1
       peer-link Port-Channel1
    
  8. Verify the MLAG relationship between s1-leaf3 and s1-leaf4.

    Command

    show mlag
    

    Expected Output

    s1-leaf4(config-mlag)#show mlag
    MLAG Configuration:
    domain-id                          :                MLAG
    local-interface                    :            Vlan4094
    peer-address                       :        10.255.255.1
    peer-link                          :       Port-Channel1
    peer-config                        :          consistent
    
    MLAG Status:
    state                              :              Active
    negotiation status                 :           Connected
    peer-link status                   :                  Up
    local-int status                   :                  Up
    system-id                          :   02:1c:73:c0:c6:14
    dual-primary detection             :            Disabled
    dual-primary interface errdisabled :               False
    
    MLAG Ports:
    Disabled                           :                   0
    Configured                         :                   0
    Inactive                           :                   0
    Active-partial                     :                   0
    Active-full                        :                   0
    

Configure the MLAG Interfaces

  1. Configure a Port-Channel and member interfaces on s1-leaf4 connecting to s1-spine1 and s1-spine2.

    Note

    What matters is that the mlag ID of the Port-Channel matches between the MLAG peers. The Port-Channel ID is only locally significant to the switch, but best practice is to match all mlag and Port-Channel IDs.

    Commands

    interface Port-Channel34
       description MLAG Uplink - s1-spine1 and s1-spine2
       switchport mode trunk
       mlag 34
    !
    interface Ethernet2
       description MLAG Uplink - s1-spine1
       channel-group 34 mode active
    !
    interface Ethernet3
       description MLAG Uplink - s1-spine2
       channel-group 34 mode active
    
  2. Verify the MLAG Port-Channel is negotiated between the peers and all interfaces are aggregated.

    Command

    show mlag | begin Ports
    

    Expected Output

    s1-leaf4(config-if-Et3)#show mlag | begin Ports
    MLAG Ports:
    Disabled                           :                   0
    Configured                         :                   0
    Inactive                           :                   0
    Active-partial                     :                   0
    Active-full                        :                   1
    

    Command

    show mlag interfaces
    

    Expected Output

    s1-leaf4(config-if-Et3)#show mlag interfaces
                                                                                               local/remote
       mlag       desc                                       state       local       remote          status
    ---------- ------------------------------------ ----------------- ----------- ------------ ------------
         34       MLAG Uplink - s1-spine1 and s1       active-full        Po34         Po34           up/up
    

    Command

    show port-channel dense
    

    Expected Output

    s1-leaf4(config-if-Et3)#show port-channel dense
    
                      Flags
    -------------------------- ----------------------------- -------------------------
       a - LACP Active            p - LACP Passive           * - static fallback
       F - Fallback enabled       f - Fallback configured    ^ - individual fallback
       U - In Use                 D - Down
       + - In-Sync                - - Out-of-Sync            i - incompatible with agg
       P - bundled in Po          s - suspended              G - Aggregable
       I - Individual             S - ShortTimeout           w - wait for agg
      E - Inactive. The number of configured port channels exceeds the config limit
       M - Exceeds maximum weight
    
    Number of channels in use: 2
    Number of aggregators: 2
    
       Port-Channel       Protocol    Ports
    ------------------ -------------- ----------------------------------
       Po1(U)             LACP(a)     Et1(PG+) Et6(PG+)
       Po34(U)            LACP(a)     Et2(PG+) Et3(PG+) PEt2(P) PEt3(P)
    
  3. Configure a Port-Channel and member interface on s1-leaf4 connecting to s1-host2.

    Commands

    interface Port-Channel5
       description MLAG Downlink - s1-host2
       switchport access vlan 112
       mlag 5
    !
    interface Ethernet4
       description MLAG Downlink - s1-host2
       channel-group 5 mode active
    
  4. Verify the host-facing MLAG Port-Channel is negotiated between the peers and all interfaces are aggregated.

    Command

    show mlag interfaces 5
    

    Expected Output

    s1-leaf4(config-if-Et4)#show mlag interfaces 5
                                                                                         local/remote
       mlag       desc                                 state       local       remote          status
    ---------- ------------------------------ ----------------- ----------- ------------ ------------
          5       MLAG Downlink - s1-host2       active-full         Po5          Po5           up/up
    

    Command

    show mlag port-channel 5
    

    Expected Output

    s1-leaf4(config-if-Et4)#show port-channel 5
    Port Channel Port-Channel5:
      Active Ports: Ethernet4 PeerEthernet4
    
  5. Validate connectivity from s1-host1 to s1-host2 by logging into s1-host1 through the menu (option 1 in ssh menu) or using screen.

    Command

    ping 10.111.112.202
    

    Expected Output

    s1-host1#ping 10.111.112.202
    PING 10.111.112.202 (10.111.112.202) 72(100) bytes of data.
    80 bytes from 10.111.112.202: icmp_seq=1 ttl=64 time=47.7 ms
    80 bytes from 10.111.112.202: icmp_seq=2 ttl=64 time=38.8 ms
    80 bytes from 10.111.112.202: icmp_seq=3 ttl=64 time=30.7 ms
    80 bytes from 10.111.112.202: icmp_seq=4 ttl=64 time=21.7 ms
    80 bytes from 10.111.112.202: icmp_seq=5 ttl=64 time=19.1 ms
    
    --- 10.111.112.202 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 41ms
    rtt min/avg/max/mdev = 19.128/31.636/47.743/10.637 ms, pipe 5, ipg/ewma 10.272/38.948 ms
    
  6. Verify layer 2 forwarding information on the spines.

    Command

    show mac address-table vlan 112
    

    Expected Output

    s1-spine1#show mac address-table vlan 112
              Mac Address Table
    ------------------------------------------------------------------
    
    Vlan    Mac Address       Type        Ports      Moves   Last Move
    ----    -----------       ----        -----      -----   ---------
     112    001c.73c0.c611    STATIC      Po1
     112    001c.73c0.c616    DYNAMIC     Po12       1       0:01:08 ago
     112    001c.73c0.c617    DYNAMIC     Po34       1       0:03:02 ago
    Total Mac Addresses for this criterion: 3
    
              Multicast Mac Address Table
    ------------------------------------------------------------------
    
    Vlan    Mac Address       Type        Ports
    ----    -----------       ----        -----
    Total Mac Addresses for this criterion: 0
    
  7. Verify MLAG peer roles and detailed state information on s1-leaf4.

    Note

    The show mlag detail output contains a wealth of information. Notice that while there is a primary and secondary role for the MLAG peers, it is not a configurable value. The peers automatically negotiate this between themselves. The MLAG primary device is responsible for all STP processing for both peers. The Reload delay value is also very important in upgrade and maintenance scenarios.

    Command

    show mlag detail
    

    Expected Output

    s1-leaf4#show mlag detail
    MLAG Configuration:
    domain-id                          :                MLAG
    local-interface                    :            Vlan4094
    peer-address                       :        10.255.255.1
    peer-link                          :       Port-Channel1
    peer-config                        :          consistent
    
    MLAG Status:
    state                              :              Active
    negotiation status                 :           Connected
    peer-link status                   :                  Up
    local-int status                   :                  Up
    system-id                          :   02:1c:73:c0:c6:14
    dual-primary detection             :            Disabled
    dual-primary interface errdisabled :               False
    
    MLAG Ports:
    Disabled                           :                   0
    Configured                         :                   0
    Inactive                           :                   0
    Active-partial                     :                   0
    Active-full                        :                   2
    
    MLAG Detailed Status:
    State                           :           secondary
    Peer State                      :             primary
    State changes                   :                   2
    Last state change time          :         0:42:12 ago
    Hardware ready                  :                True
    Failover                        :               False
    Failover Cause(s)               :             Unknown
    Last failover change time       :               never
    Secondary from failover         :               False
    Peer MAC address                :   00:1c:73:c0:c6:14
    Peer MAC routing supported      :               False
    Reload delay                    :         300 seconds
    Non-MLAG reload delay           :         300 seconds
    Ports errdisabled               :               False
    Lacp standby                    :               False
    Configured heartbeat interval   :             4000 ms
    Effective heartbeat interval    :             4000 ms
    Heartbeat timeout               :            60000 ms
    Last heartbeat timeout          :               never
    Heartbeat timeouts since reboot :                   0
    UDP heartbeat alive             :                True
    Heartbeats sent/received        :             633/635
    Peer monotonic clock offset     :    0.000013 seconds
    Agent should be running         :                True
    P2p mount state changes         :                   1
    Fast MAC redirection enabled    :               False
    
  8. Configure a VLAN on s1-leaf4 only to see how MLAG tracks consistency between the peer switches.

    Note

    It is critical that the MLAG peers be consistent to ensure proper forwarding and operation. The show mlag config-sanity command helps to track values that are not consistent. These values should be rectified in production environments unless guided otherwise by an Arista SE.

    Commands

    vlan 999
       name TEMP
    !
    show mlag config-sanity
    !
    no vlan 999
    

    Expected Output

    s1-leaf4(config)#vlan 999
    s1-leaf4(config-vlan-999)#name TEMP
    s1-leaf4(config-vlan-999)#show mlag config-sanity
    No per interface configuration inconsistencies found.
    
    Global configuration inconsistencies:
        Feature                   Attribute       Local value    Peer value
    -------------- --------------------------- ----------------- ----------
       bridging        admin-state vlan 999            active             -
       bridging       mac-learning vlan 999              True             -
    
    
    s1-leaf4(config-vlan-999)#no vlan 999
    s1-leaf4(config)#show mlag config-sanity
    No global configuration inconsistencies found.
    
    No per interface configuration inconsistencies found.
    
Success

Lab Complete!