ios_lacp_interfaces – Управление протоколом агрегирования каналов связи (LACP) на интерфейсах устройств Cisco IOS
Новое в версии 2.9.
Обзор
- Этот модуль предоставляет декларативное управление LACP на сетевых устройствах Cisco IOS lacp_interfaces.
Параметры
| Параметр | Варианты/Значения по умолчанию | Комментарии | |
|---|---|---|---|
| config
список / элементы=словарь
|
Словарь опций LACP lacp_interfaces |
||
| fast_switchover
логическое значение
|
|
Поддержка быстрой смены каналов LACP на этом порту. |
|
| max_bundle
целое число
|
Максимальное количество портов для объединения в этом канале LACP.
Обратитесь к документации производителя для получения допустимых значений портов. |
||
| name
строка / обязательно
|
Имя интерфейса для настройки LACP. |
||
| port_priority
целое число
|
Приоритет LACP на этом интерфейсе.
Обратитесь к документации производителя для получения допустимых значений портов. |
||
| state
строка
|
|
Состояние конфигурации после завершения работы модуля |
|
Примечания
Примечание
- Тестировалось на Cisco IOSv версии 15.2 на VIRL.
- Этот модуль работает с подключением
network_cli, см. IOS Platform Options.
Примеры
# Using merged
#
# Before state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# interface GigabitEthernet0/2
# shutdown
# interface GigabitEthernet0/3
# shutdown
- name: Merge provided configuration with device configuration
ios_lacp_interfaces:
config:
- name: GigabitEthernet0/1
port_priority: 10
- name: GigabitEthernet0/2
port_priority: 20
- name: GigabitEthernet0/3
port_priority: 30
- name: Port-channel10
fast_switchover: True
max_bundle: 5
state: merged
# After state:
# ------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp fast-switchover
# lacp max-bundle 5
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
# Using overridden
#
# Before state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp fast-switchover
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
- name: Override device configuration of all lacp_interfaces with provided configuration
ios_lacp_interfaces:
config:
- name: GigabitEthernet0/1
port_priority: 20
- name: Port-channel10
max_bundle: 2
state: overridden
# After state:
# ------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp max-bundle 2
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/2
# shutdown
# interface GigabitEthernet0/3
# shutdown
# Using replaced
#
# Before state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp max-bundle 5
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
- name: Replaces device configuration of listed lacp_interfaces with provided configuration
ios_lacp_interfaces:
config:
- name: GigabitEthernet0/3
port_priority: 40
- name: Port-channel10
fast_switchover: True
max_bundle: 2
state: replaced
# After state:
# ------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp fast-switchover
# lacp max-bundle 2
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 40
# Using Deleted
#
# Before state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# flowcontrol receive on
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
- name: "Delete LACP attributes of given interfaces (Note: This won't delete the interface itself)"
ios_lacp_interfaces:
config:
- name: GigabitEthernet0/1
state: deleted
# After state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
# Using Deleted without any config passed
# "(NOTE: This will delete all of configured LLDP module attributes)"
#
# Before state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# lacp fast-switchover
# interface Port-channel20
# lacp max-bundle 2
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# lacp port-priority 10
# interface GigabitEthernet0/2
# shutdown
# lacp port-priority 20
# interface GigabitEthernet0/3
# shutdown
# lacp port-priority 30
- name: "Delete LACP attributes for all configured interfaces (Note: This won't delete the interface itself)"
ios_lacp_interfaces:
state: deleted
# After state:
# -------------
#
# vios#show running-config | section ^interface
# interface Port-channel10
# interface Port-channel20
# interface Port-channel30
# interface GigabitEthernet0/1
# shutdown
# interface GigabitEthernet0/2
# shutdown
# interface GigabitEthernet0/3
# shutdown
Возвращаемые значения
Общие возвращаемые значения описаны здесь, а следующие являются полями, уникальными для этого модуля:
| Ключ | Возвращаемое значение | Описание |
|---|---|---|
| after
список
|
при изменении | Конфигурация в виде структурированных данных после завершения работы модуля. Пример:
Возвращаемая конфигурация всегда будет в том же формате, что и параметры выше. |
| before
список
|
всегда | Конфигурация в виде структурированных данных до вызова модуля. Пример:
Возвращаемая конфигурация всегда будет в том же формате, что и параметры выше. |
| commands
список
|
всегда | Набор команд, отправленных удаленному устройству. Пример:
['interface GigabitEthernet 0/1', 'lacp port-priority 30'] |
Статус
- Данный модуль не гарантирует обратной совместимости интерфейса. [превью]
- Этот модуль поддерживается командой Ansible Network Team. [сеть]
Поддержка Red Hat
Дополнительную информацию о поддержке данного модуля компанией Red Hat можно найти в статье из базы знаний Red Hat по этой ссылке.
Авторы
- Sumit Jaiswal (@justjais)
Подсказка
Если вы заметите какие-либо проблемы в этом руководстве, вы можете отредактировать этот документ, чтобы улучшить его.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/ios_lacp_interfaces_module.html