dellemc.enterprise_sonic.sonic_mclag – Manage multi chassis link aggregation groups domain (MCLAG) and its parameters
Note
This plugin is part of the dellemc.enterprise_sonic collection (version 1.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_mclag
.
New in version 1.0.0: of dellemc.enterprise_sonic
Synopsis
Manage multi chassis link aggregation groups domain (MCLAG) and its parameters
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
Dict of mclag domain configurations. |
|
ID of the mclag domain (MCLAG domain). |
|
MCLAG session keepalive-interval in secs. |
|
Holds portchannels dictionary for an MCLAG domain. |
|
Holds a list of portchannels for configuring as an MCLAG interface. |
|
Holds a PortChannel ID. |
|
The IPV4 peer-ip for corresponding MCLAG. |
|
Peer-link for corresponding MCLAG. |
|
MCLAG session timeout value in secs. |
|
The IPV4 source-ip for corresponding MCLAG. |
|
Mac address of MCLAG. |
|
Holds Vlan dictionary for mclag unique ip. |
|
Holds list of VLANs for which a separate IP addresses is enabled for Layer 3 protocol support over MCLAG. |
|
Holds a VLAN ID. |
|
The state that the configuration should be left in. Choices:
|
Examples
# Using merged
#
# Before state:
# -------------
#
# sonic# show mclag brief
# MCLAG Not Configured
#
- name: Merge provided configuration with device configuration
dellemc.enterprise_sonic.sonic_mclag:
config:
domain_id: 1
peer_address: 1.1.1.1
source_address: 2.2.2.2
peer_link: 'Portchannel1'
keepalive: 1
session_timeout: 3
unique_ip:
vlans:
- vlan: Vlan4
members:
portchannles:
- lag: PortChannel10
state: merged
#
# After state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 2.2.2.2
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 1 secs
# Session Timeout : 3 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
#
# Using merged
#
# Before state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 2.2.2.2
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 1 secs
# Session Timeout : 3 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
#
- name: Merge device configuration with the provided configuration
dellemc.enterprise_sonic.sonic_mclag:
config:
domain_id: 1
source_address: 3.3.3.3
keepalive: 10
session_timeout: 30
unique_ip:
vlans:
- vlan: Vlan5
members:
portchannels:
- lag: PortChannel12
state: merged
#
# After state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 3.3.3.3
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 10 secs
# Session Timeout : 30 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
# PortChannel12 down/down
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# },
# "Vlan5": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
#
# Using deleted
#
# Before state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 3.3.3.3
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 10 secs
# Session Timeout : 30 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
- name: Delete device configuration based on the provided configuration
dellemc.enterprise_sonic.sonic_mclag:
config:
domain_id: 1
source_address: 3.3.3.3
keepalive: 10
members:
portchannels:
- lag: PortChannel10
state: deleted
#
# After state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address :
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 1 secs
# Session Timeout : 15 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:0
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
#
#
# Using deleted
#
# Before state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 3.3.3.3
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 10 secs
# Session Timeout : 30 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
- name: Delete all device configuration
dellemc.enterprise_sonic.sonic_mclag:
config:
state: deleted
#
# After state:
# ------------
#
# sonic# show mclag brief
# MCLAG Not Configured
#
# admin@sonic:~$ show runningconfiguration all | grep MCLAG_UNIQUE_IP
# admin@sonic:~$
#
#
# Using deleted
#
# Before state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address : 3.3.3.3
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 10 secs
# Session Timeout : 30 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface Local/Remote Status
#-----------------------------------------------------------
# PortChannel10 down/down
# PortChannel12 down/sown
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
- name: Delete device configuration based on the provided configuration
dellemc.enterprise_sonic.sonic_mclag:
config:
domain_id: 1
source_address: 3.3.3.3
keepalive: 10
members:
portchannels:
- lag: PortChannel10
state: deleted
#
# After state:
# ------------
#
# sonic# show mclag brief
#
# Domain ID : 1
# Role : standby
# Session Status : down
# Peer Link Status : down
# Source Address :
# Peer Address : 1.1.1.1
# Peer Link : PortChannel1
# Keepalive Interval : 1 secs
# Session Timeout : 15 secs
# System Mac : 20:04:0f:37:bd:c9
#
#
# Number of MLAG Interfaces:0
#
# admin@sonic:~$ show runningconfiguration all
# {
# ...
# "MCLAG_UNIQUE_IP": {
# "Vlan4": {
# "unique_ip": "enable"
# }
# },
# ...
# }
#
#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration model invocation. Returned: when changed Sample: “The configuration returned always in the same format\n of the parameters above.\n” |
|
The configuration prior to the model invocation. Returned: always Sample: “The configuration returned always in the same format\n of the parameters above.\n” |
|
The set of commands pushed to the remote device. Returned: always Sample: [“command 1”, “command 2”, “command 3”] |
Authors
Abirami N (@abirami-n)