There are two ways of configuring LAG:
LACP configuration:
interface Ethernet42 channel-group 10 mode active # can be "active" or "passive"
Verification:
show port-channel dense
How does switch know that all links are connected to the same device on other end? It uses system-id to identify the switch (looks like a MAC address).
Operation:
Conditions:
no spanning-tree vlan 4094 ! vlan 4094 # VLAN ID 4094 is recommended name VLAN4094 trunk group m1peer # Prevents this VLAN to be added to normal trunk ports ! interface Vlan4094 ip address 10.0.0.1/30 ! interface Port-Channel100 switchport trunk allowed vlan 233,4094 switchport mode trunk switchport trunk group m1peer ! mlag configuration domain-id mlagDomain heartbeat-interval 2500 local-interface Vlan4094 # Peer-link peer-address 10.0.0.2 peer-link Po100 reload-delay 150 ! interface Port-Channel1 switchport access vlan 10 mlag 1 # Port-channel number on the peer switch ! interface Ethernet1 switchport access vlan 10 channel-group 1 mode active !
#show mlag MLAG Configuration: domain-id : MLAG1 local-interface : Vlan4094 peer-address : 10.0.0.130 peer-link : Port-Channel10 hb-peer-address : 0.0.0.0 peer-config : inconsistent # config is wrong! MLAG Status: state : Active negotiation status : Connected peer-link status : Up local-int status : Up system-id : 2a:99:3a:8e:e8:cd dual-primary detection : Disabled dual-primary interface errdisabled : False MLAG Ports: Disabled : 0 Configured : 0 Inactive : 0 Active-partial : 0 Active-full : 2
See what's wrong with the configuration:
#show mlag config-sanity No global configuration inconsistencies found. Interface configuration inconsistencies: Feature Attribute Interfaces Local value Peer value -------------- ------------------------------- ---------------- ----------------- ---------- bridging trunk-allowed vlan mlag23 Po23 168-172 82,168-172 bridging trunk-allowed vlan mlag24 Po24 168-172 82,168-172
#show mlag interfaces
VARP is an Arista's flavour of FHRP, where both switches in MLAG are active.
! ip virtual-router mac-address aaaa.bbbb.cccc ! interface Vlan100 ip address 10.0.0.252/24 ip virtual-router address 10.0.0.254 !
Same idea as VARP, but does not require a unique SVI IP on each switch.
! ip virtual-router mac-address aaaa.bbbb.cccc ! interface Vlan100 ip address virtual 10.0.0.254/24 !