dellemc.enterprise_sonic.sonic_lag_interfaces module – Manage link aggregation group (LAG) interface parameters
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
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_lag_interfaces
.
New in dellemc.enterprise_sonic 1.0.0
Synopsis
This module manages attributes of link aggregation group (LAG) interfaces of devices running Enterprise SONiC Distribution by Dell Technologies.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
A list of LAG configurations. |
|
Specifies Ethernet segment. |
|
The preference for Designated Forwarder election method. The range of df_preference value is from 1 to 65535. |
|
Specifies value of Ethernet Segment Identifier. Only “AUTO” is supported for auto_lacp and auto_system_mac. |
|
Specifies type of Ethernet Segment Identifier. esi_type and esi can not be deleted separately. If both esi and df_preference are not present, deleted state will delete whole ethernet segment. Choices:
|
|
The list of interfaces that are part of the group. |
|
The list of interfaces that are part of the group. |
|
The interface name. |
|
Specifies mode of the port-channel while creation. Choices:
|
|
ID of the LAG. |
|
The state that the configuration should be left in. Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode
.
Examples
# Using merged
#
# Before state:
# -------------
#
# interface Eth1/10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface PortChannel10
# no shutdown
#
- name: Merges provided configuration with device configuration
dellemc.enterprise_sonic.sonic_lag_interfaces:
config:
- name: PortChannel10
members:
interfaces:
- member: Eth1/10
ethernet_segment:
esi_type: auto_lacp
df_preference: 2222
- name: PortChannel12
members:
interfaces:
- member: Eth1/15
state: merged
#
# After state:
# ------------
#
# interface Eth1/10
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface Eth1/15
# channel-group 12
# mtu 9100
# speed 100000
# no shutdown
# !
# interface PortChannel10
# no shutdown
# !
# evpn ethernet-segment auto-lacp
# df-preference 2222
# !
# interface PortChannel12
# no shutdown
#
#
# Using replaced
#
# Before state:
# -------------
#
# interface Eth1/5
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface Eth1/7
# no channel-group
# mtu 9100
# speed 100000
# no shutdown
# !
# interface PortChannel10
# no shutdown
# !
# evpn ethernet-segment auto-lacp
# df-preference 2222
#
- name: Replace device configuration of specified LAG attributes
dellemc.enterprise_sonic.sonic_lag_interfaces:
config:
- name: PortChannel20
members:
interfaces:
- member: Eth1/6
ethernet_segment:
esi_type: auto_system_mac
df_preference: 6666
- name: PortChannel10
members:
interfaces:
- member: Eth1/7
ethernet_segment:
esi_type: auto_system_mac
df_preference: 3333
state: replaced
#
# After state:
# ------------
#
# interface Eth1/5
# mtu 9100
# speed 100000
# no shutdown
#
# interface Eth1/6
# channel-group 20
# mtu 9100
# speed 100000
# no shutdown
#
# interface Eth1/7
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
#
# interface PortChannel10
# no shutdown
# !
# evpn ethernet-segment auto-system-mac
# df-preference 3333
#
# interface PortChanne20
# no shutdown
# !
# evpn ethernet-segment auto-system-mac
# df-preference 6666
#
# Using overridden
#
# Before state:
# -------------
#
# interface Eth1/5
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
#
# interface Eth1/6
# no channel-group
# mtu 9100
# speed 100000
# no shutdown
#
# interface PortChannel10
# no shutdown
# !
# evpn ethernet-segment auto-system-mac
# df-preference 2222
#
- name: Override device configuration of all LAG attributes
dellemc.enterprise_sonic.sonic_lag_interfaces:
config:
- name: PortChannel20
members:
interfaces:
- member: Eth1/6
ethernet_segment:
esi_type: auto_lacp
df_preference: 3333
state: overridden
#
# After state:
# ------------
#
# interface Eth1/5
# mtu 9100
# speed 100000
# no shutdown
#
# interface Eth1/6
# channel-group 20
# mtu 9100
# speed 100000
# no shutdown
#
# interface PortChannel20
# no shutdown
# !
# evpn ethernet-segment auto-lacp
# df-preference 3333
#
# Using deleted
#
# Before state:
# -------------
# interface PortChannel 10
# no shutdown
# !
# evpn ethernet-segment auto-lacp
# df-preference 2222
# !
# interface PortChannel 12
# !
# interface Eth1/10
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface Eth1/15
# channel-group 12
# mtu 9100
# speed 100000
# no shutdown
#
- name: Deletes all LAGs and LAG attributes of all interfaces
dellemc.enterprise_sonic.sonic_lag_interfaces:
config:
state: deleted
#
# After state:
# -------------
#
# interface Eth1/10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface Eth1/15
# mtu 9100
# speed 100000
# no shutdown
#
# Using deleted
#
# Before state:
# -------------
# interface Eth1/10
# channel-group 10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface PortChannel10
# no shutdown
# !
# evpn ethernet-segment auto-lacp
# df-preference 2222
#
- name: Deletes some LAGs and LAG attributes.
sonic_lag_interfaces:
config:
- name: PortChannel10
members:
interfaces:
- member: Eth1/10
ethernet_segment:
esi_type: auto_lacp
state: deleted
#
# After state:
# -------------
#
# interface Eth1/10
# mtu 9100
# speed 100000
# no shutdown
# !
# interface PortChannel10
# no shutdown
# !
#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration module invocation. Returned: when changed Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |