# nxos_lacp_interfaces – Manage Link Aggregation Control Protocol (LACP) attributes of interfaces on Cisco NX-OS devices

New in version 2.9.

- Synopsis
- Parameters
- Notes
- Examples
- Return Values
- Status

## Synopsis

- This module manages Link Aggregation Control Protocol (LACP) attributes of NX-OS Interfaces.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
config list / elements=dictionary |  | A dictionary of LACP interfaces options.
| convergence dictionary |  | This dict contains configurable options related to convergence. Applicable only for Port-channel.

graceful
boolean

Choices:
- no
- yes

port-channel lacp graceful convergence. Disable this only with lacp ports connected to Non-Nexus peer. Disabling this with Nexus peer can lead to port suspension.

vpc
boolean

Choices:
- no
- yes

Enable lacp convergence for vPC port channels.

| links dictionary |  | This dict contains configurable options related to max and min port-channel links. Applicable only for Port-channel.
|  | max integer |  | Port-channel max bundle.
|  | min integer |  | Port-channel min links.

mode
string

Choices:
- delay

LACP mode. Applicable only for Port-channel.

| name string / required |  | Name of the interface.
| port_priority integer |  | LACP port priority for the interface. Range 1-65535. Applicable only for Ethernet.

rate
string

Choices:
- fast
- normal

Rate at which PDUs are sent by LACP. Applicable only for Ethernet. At fast rate LACP is transmitted once every 1 second. At normal rate LACP is transmitted every 30 seconds after the link is bundled.

suspend_individual
boolean

Choices:
- no
- yes

port-channel lacp state. Disabling this will cause lacp to put the port to individual state and not suspend the port in case it does not get LACP BPDU from the peer ports in the port-channel.

state
string

Choices:
- merged ←
- replaced
- overridden
- deleted

The state of the configuration after module completion.

## Notes

Note

- Tested against NXOS 7.3.(0)D1(1) on VIRL

## Examples

    # Using merged

    # Before state:
    # -------------
    #

    - name: Merge provided configuration with device configuration.
      nxos_lacp_interfaces:
        config:
          - name: Ethernet1/3
            port_priority: 5
            rate: fast
        state: merged

    # After state:
    # ------------
    #
    # interface Ethernet1/3
    # lacp port-priority 5
    # lacp rate fast

    # Using replaced

    # Before state:
    # -------------
    #
    # interface Ethernet1/3
    #   lacp port-priority 5
    # interface port-channel11
    #   lacp mode delay

    - name: Replace device lacp interfaces configuration with the given configuration.
      nxos_lacp_interfaces:
        config:
          - name: port-channel11
            links:
              min: 4
        state: replaced

    # After state:
    # ------------
    #
    # interface Ethernet1/3
    #   lacp port-priority 5
    # interface port-channel11
    #   lacp min-links 4

    # Using overridden

    # Before state:
    # -------------
    #
    # interface Ethernet1/3
    #   lacp port-priority 5
    # interface port-channel11
    #   lacp mode delay

    - name: Override device configuration of all LACP interfaces attributes of given interfaces on device with provided configuration.
      nxos_lacp_interfaces:
        config:
          - name: port-channel11
            links:
              min: 4
        state: overridden

    # After state:
    # ------------
    #
    # interface port-channel11
    # lacp min-links 4

    # Using deleted

    # Before state:
    # -------------
    #
    # interface Ethernet1/3
    #   lacp port-priority 5
    # interface port-channel11
    #   lacp mode delay

    - name: Delete LACP interfaces configurations.
      nxos_lacp_interfaces:
        state: deleted

    # After state:
    # ------------
    #

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
after list | when changed | The configuration as structured data after module completion. Sample: The configuration returned will always be in the same format of the parameters above.
before list | always | The configuration as structured data prior to module invocation. Sample: The configuration returned will always be in the same format of the parameters above.
commands list | always | The set of commands pushed to the remote device. Sample: ['interface port-channel10', 'lacp min-links 5', 'lacp mode delay']

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Network Team. [network]

### Red Hat Support

More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.

### Authors

- Trishna Guha (@trishnaguha)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.