Spec-Zone.ru › Ansible

Модуль dellemc.enterprise_sonic.sonic_mclag – Управление доменом агрегированных каналов связи между несколькими шасси (MCLAG) и его параметрами

Примечание

Этот модуль является частью коллекции dellemc.enterprise_sonic (версия 2.5.1).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не включена в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install dellemc.enterprise_sonic.

Для использования в playbook, укажите: dellemc.enterprise_sonic.sonic_mclag.

Новое в dellemc.enterprise_sonic 1.0.0

  • Краткое описание
  • Параметры
  • Примечания
  • Примеры
  • Возвращаемые значения

Краткое описание

  • Управление доменом агрегированных каналов связи между несколькими шасси (MCLAG) и его параметрами.

Примечание

Этот модуль имеет соответствующий плагин действия.

Параметры

Параметр

Комментарии

config

словарь

Словарь конфигураций домена mclag.

delay_restore

целое число

Время восстановления MCLAG в секундах.

domain_id

целое число / обязательно

Идентификатор домена mclag (домен MCLAG).

gateway_mac

строка

MAC-адрес шлюза для портов маршрутизатора через MCLAG.

Настроенный MAC-адрес шлюза может быть изменен только тогда, когда state=replaced или state=overridden.

keepalive

целое число

Интервал keepalive сеанса MCLAG в секундах.

members

словарь

Содержит словарь каналов портов для домена MCLAG.

portchannels

список / элементы=словарь

Содержит список каналов портов для конфигурирования в качестве интерфейса MCLAG.

lag

строка

Содержит идентификатор канала портов.

peer_address

строка

IPV4-адрес пира для соответствующего MCLAG.

peer_gateway

словарь

Содержит словарь VLAN для шлюза пира MCLAG.

vlans

список / элементы=словарь

Содержит список VLAN и диапазонов VLAN, для которых включена функция шлюза пира MCLAG.

vlan

строка

Содержит имя VLAN или диапазон VLAN.

Укажите один VLAN, например, Vlan10.

Укажите диапазон VLAN, например, Vlan10-20.

peer_link

строка

Пир-линк для соответствующего MCLAG.

session_timeout

целое число

Значение тайм-аута сеанса MCLAG в секундах.

session_vrf

строка

добавлено в dellemc.enterprise_sonic 2.5.0

VRF сеанса MCLAG.

Значение VRF сеанса может быть либо mgmt, либо нестандартным VRF.

source_address

строка

IPV4-адрес источника для соответствующего MCLAG.

system_mac

строка

MAC-адрес MCLAG.

unique_ip

словарь

Содержит словарь VLAN для уникального IP MCLAG.

vlans

список / элементы=словарь

Содержит список VLAN и диапазонов VLAN, для которых включен отдельный IP-адрес для поддержки протокола уровня 3 через MCLAG.

vlan

строка

Содержит имя VLAN или диапазон VLAN.

Укажите один VLAN, например, Vlan10.

Укажите диапазон VLAN, например, Vlan10-20.

state

строка

Состояние, в котором должна находиться конфигурация.

Варианты:

  • "merged" ← (по умолчанию)
  • "deleted"
  • "replaced"
  • "overridden"

Примечания

Примечание

  • Проверено на Enterprise SONiC Distribution от Dell Technologies.
  • Поддерживает check_mode.

Примеры

# 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'
      session_vrf: 'mgmt'
      keepalive: 1
      session_timeout: 3
      delay_restore: 240
      system_mac: '00:00:00:11:11:11'
      gateway_mac: '00:00:00:12:12:12'
      unique_ip:
        vlans:
          - vlan: Vlan4
          - vlan: Vlan21-25
      peer_gateway:
        vlans:
          - vlan: Vlan4
          - vlan: Vlan21-25
      members:
        portchannels:
          - 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
# Session Vrf          : mgmt
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 3 secs
# Delay Restore        : 240 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#


# 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
# Session Vrf          : mgmt
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 3 secs
# Delay Restore        : 240 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#

- 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
      session_vrf: VrfRed
      delay_restore: 360
      unique_ip:
        vlans:
          - vlan: Vlan5
          - vlan: Vlan26-28
      peer_gateway:
        vlans:
          - vlan: Vlan5
          - vlan: Vlan26-28
      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
# Session Vrf          : VrfRed
# Peer Link            : PortChannel1
# Keepalive Interval   : 10 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel12            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan5
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   10
# ==============
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan5
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   10
# ==============
# 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
# Session Vrf          : VrfRed
# Peer Link            : PortChannel1
# Keepalive Interval   : 10 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#

- 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
      session_vrf: VrfRed
      unique_ip:
        vlans:
          - vlan: Vlan22
          - vlan: Vlan24-25
      peer_gateway:
        vlans:
          - vlan: Vlan22
          - vlan: Vlan24-25
      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
# Session Vrf          : default
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:0
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan23
# ==============
# Total count :    3
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan23
# ==============
# Total count :    3
# ==============
# 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
# Session Vrf          : default
# Peer Link            : PortChannel1
# Keepalive Interval   : 10 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:1
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# ==============
# Total count :    1
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# ==============
# Total count :    1
# ==============
# sonic#

- name: Delete all device configuration
  dellemc.enterprise_sonic.sonic_mclag:
    config:
    state: deleted

# After state:
# ------------
#
# sonic# show mclag brief
# MCLAG Not Configured
# sonic# show mclag separate-ip-interfaces
# MCLAG separate IP interface not configured
# sonic# show mclag peer-gateway-interfaces
# MCLAG Peer Gateway interface not configured
# 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
# Session Vrf          : default
# Peer Link            : PortChannel1
# Keepalive Interval   : 10 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel12            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# ==============
# Total count :    1
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# ==============
# Total count :    1
# ==============
# sonic#

- 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
      peer_gateway:
        vlans:
      members:
        portchannels:
    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
# Session Vrf          : default
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 30 secs
# Delay Restore        : 360 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:0
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# ==============
# Total count :    1
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# MCLAG Peer Gateway interface not configured
# sonic#


# Using replaced
#
# 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
# Session Vrf          : VrfRed
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 3 secs
# Delay Restore        : 240 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel11            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#

- name: Replace device configuration with the provided configuration
  dellemc.enterprise_sonic.sonic_mclag:
    config:
      domain_id: 1
      unique_ip:
        vlans:
          - vlan: Vlan5
          - vlan: Vlan24-28
      session_vrf: VrfBlue
      peer_gateway:
        vlans:
          - vlan: Vlan5
          - vlan: Vlan24-28
      members:
        portchannels:
          - lag: PortChannel10
          - lag: PortChannel12
    state: replaced

# 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
# Session Vrf          : VrfBlue
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 3 secs
# Delay Restore        : 240 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel12            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan5
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   6
# ==============
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan5
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   6
# ==============
# sonic#


# Using overridden
#
# 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
# Session Vrf          : VrfBlue
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 3 secs
# Delay Restore        : 240 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel11            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan4
# Vlan21
# Vlan22
# Vlan23
# Vlan24
# Vlan25
# ==============
# Total count :    6
# ==============
# sonic#

- name: Override device configuration with the provided configuration
  dellemc.enterprise_sonic.sonic_mclag:
    config:
      domain_id: 1
      peer_address: 1.1.1.1
      source_address: 3.3.3.3
      peer_link: 'Portchannel1'
      session_vrf: VrfRed
      system_mac: '00:00:00:11:11:11'
      gateway_mac: '00:00:00:12:12:12'
      unique_ip:
        vlans:
          - vlan: Vlan24-28
      peer_gateway:
        vlans:
          - vlan: Vlan24-28
      members:
        portchannels:
          - lag: PortChannel10
          - lag: PortChannel12
    state: overridden

# 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
# Session Vrf          : VrfRed
# Peer Link            : PortChannel1
# Keepalive Interval   : 1 secs
# Session Timeout      : 30 secs
# Delay Restore        : 300 secs
# System Mac           : 20:04:0f:37:bd:c9
# Mclag System Mac     : 00:00:00:11:11:11
# Gateway Mac          : 00:00:00:12:12:12
#
#
# Number of MLAG Interfaces:2
#-----------------------------------------------------------
# MLAG Interface       Local/Remote Status
#-----------------------------------------------------------
# PortChannel10            down/down
# PortChannel12            down/down
#
# sonic# show mclag separate-ip-interfaces
# Interface Name
# ==============
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   5
# ==============
# sonic# show mclag peer-gateway-interfaces
# Interface Name
# ==============
# Vlan24
# Vlan25
# Vlan26
# Vlan27
# Vlan28
# ==============
# Total count :   5
# ==============
# sonic#

Значения возврата

Общие значения возврата документированы здесь, следующие являются полями, уникальными для этого модуля:

Ключ

Описание

after

список / элементы=строка

Вызов модуля конфигурации в результате.

Возвращается: при изменении

Пример: ["The configuration returned always in the same format as the parameters above.\n"]

before

список / элементы=строка

Конфигурация до вызова модуля.

Возвращается: всегда

Пример: ["The configuration returned always in the same format as the parameters above.\n"]

commands

список / элементы=строка

Набор команд, отправленных на удалённое устройство.

Возвращается: всегда

Пример: ["command 1", "command 2", "command 3"]

Авторы

  • Abirami N (@abirami-n)

Ссылки на сборку

  • Система отслеживания ошибок
  • Репозиторий (исходный код)

© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_mclag_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API