Posted on September 29, 2014 2:06 pm
 |  Asked by Victor
 |  8264 views
Tags:
RESOLVED
0
0
Print Friendly, PDF & Email

Hi,

How does the Arista switches decide which switch will be the primary switch of the MLAG domain? Also, is there anyway to change which one is primary and which one is secondary within the MLAG domain? Thank you

Marked as spam
2
Posted by Andrei Dvornic
Answered on September 29, 2014 2:13 pm

Hi Victor,

MLAG is an active-active technology and there is not concept of a primary and a secondary device. You can read more about it here: https://eos.arista.com/mlag-basic-configuration/. Did I misunderstand your questions by any chance?

Hi Andrei,

Well what I mean is when configure MLAG on a switch pair and perform a ”show mlag detail” I see that one is primary and the second switch is secondary. See below. How are the switches choosing which one is secondary and which one is primary. Because from the perspective of the end host it sees the MAC address of the primary MLAG switch.

Arista1:

Arista1#sh mlag det
MLAG Configuration:
domain-id : MLAG-1
local-interface : Vlan4094
peer-address : 10.0.0.2
peer-link : Port-Channel100

MLAG Status:
state : Active
negotiation status : Connected
peer-link status : Up
local-int status : Up
system-id : 02:0c:29:92:5c:be

MLAG Ports:
Disabled : 0
Configured : 0
Inactive : 0
Active-partial : 0
Active-full : 1

MLAG Detailed Status:
State : secondary
State changes : 4
Last state change time : 0:56:06 ago
Hardware ready : True
Failover : False
Last failover change time : never
Secondary from failover : False
primary-priority : 32767
Peer primary-priority : 32767
Peer MAC address : 00:0c:29:92:5c:be
Reload delay : 300 seconds
Non-MLAG reload delay : 300 seconds
Ports errdisabled : False
Lacp standby : False
Heartbeat interval : 2000 ms
Heartbeat timeout : 30000 ms
Last heartbeat timeout : 0:57:21 ago
Heartbeat timeouts since reboot : 1
Peer monotonic clock offset : -2389.892733 seconds
Agent should be running : True
P2p mount state changes : 4

Arista2:

Arista2#sh mlag det
MLAG Configuration:
domain-id : MLAG-1
local-interface : Vlan4094
peer-address : 10.0.0.1
peer-link : Port-Channel100

MLAG Status:
state : Active
negotiation status : Connected
peer-link status : Up
local-int status : Up
system-id : 02:0c:29:92:5c:be

MLAG Ports:
Disabled : 0
Configured : 0
Inactive : 0
Active-partial : 0
Active-full : 1

MLAG Detailed Status:
State : primary
State changes : 2
Last state change time : 0:00:25 ago
Hardware ready : True
Failover : False
Last failover change time : never
Secondary from failover : False
primary-priority : 32767
Peer primary-priority : 32767
Peer MAC address : 00:0c:29:ce:f6:26
Reload delay : 300 seconds
Non-MLAG reload delay : 300 seconds
Peer ports errdisabled : False
Lacp standby : False
Heartbeat interval : 2000 ms
Heartbeat timeout : 30000 ms
Last heartbeat timeout : never
Heartbeat timeouts since reboot : 0
Peer monotonic clock offset : 687.802089 seconds
Agent should be running : True
P2p mount state changes : 1

(Victor at September 29, 2014 3:38 pm)
2
Posted by Mark Berly
Answered on September 30, 2014 8:44 pm

Victor – The primary MLAG peer is selected based on the lowest MAC address of the two peers, this address is selected and the most significant bit of the address is flipped making a link local multicast address, based on your output:

The system ID for the primary is: 00:0c:29:92:5c:be

The system ID for the secondary is:  00:0c:29:ce:f6:26

The system address is: 02:0c:29:92:5c:be (NOTE: this is the primary’s address with the MSB flipped)

The two systems share this system ID to communicate with neighbors (e.g. LACP, BPDUs) so the neighbors believe they are talking to the same switch. The switches use a sync of their state that is passed over the peer link to communicate any changes to the state of the protocols.

The end host will only see the system ID, not the MAC address of the switch, unless you are referring to routing and the ARP table in this case the ARP entry will point to the MAC address of the default gateway, not the MLAG system ID.

Thank you that was a good explanation.

(Victor at October 1, 2014 3:09 pm)
0
Posted by Tien Dat Tran
Answered on December 25, 2017 9:16 am

Hi,

I’m confusing with the system-id.

Why the system-id is: 02:0c:29:92:5c:be ?

As my knowledge the system-id is mac of primary device but i’m not sure this.

Could you help me explain it ?

Thank You.

Hi Tien,

As mentioned by Mark, the System ID is used by the MLAG Peers to communicate with neighbors such that they appear to be a single logical switch in the network (at Layer 2). That said, when the MLAG is formed for the first time, the lowest MAC address among the 2 peers is taken and the MSB bit is flipped. In this case, 00:0c:29:92:5c:be (lower MAC) becomes 02:0c:29:92:5c:be (since this is will become a unique MAC) that can be used as the System ID by the MLAG peers.

Regards

Mitu

(Mitu Mitu at December 26, 2017 7:00 am)

Post your Answer

You must be logged in to post an answer.