cisco.nxos.nxos_nve_interface module – NVE interface resource module.
Note
This module is part of the cisco.nxos collection (version 14.0.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 cisco.nxos.
To use it in a playbook, specify: cisco.nxos.nxos_nve_interface.
New in cisco.nxos 13.1.0
Synopsis
This module provides declarative management of Network Virtualization Endpoint (NVE) overlay interface that terminates VXLAN tunnels.
Note
This module has a corresponding action plugin.
Aliases: nve_interface
Parameters
Parameter |
Comments |
|---|---|
A List of NVE interface options. |
|
Enable/disable virtual RMAC advertisement Choices:
|
|
Interface description |
|
Administrative state of the interface. Set the value to Choices:
|
|
Enable/disable global bgp ingress replication Choices:
|
|
Global multicast group. On NX-OS 10.6(4) a group with mode |
|
Multicast address |
|
VNI type. Choices:
|
|
Enable/disable global ARP suppression Choices:
|
|
Enable/disable host reachability with bgp Choices:
|
|
Multisite border gateway source interface |
|
Source loopback interface hold-down-time in seconds |
|
Source loopback interface name |
|
Configure Virtual Network Identifier membership |
|
Associate L3VNI with VRF Choices:
|
|
Enable/disable bgp ingress replication for L2VNI Mutually exclusive with mcast_group. Choices:
|
|
Multicast group used for BUM traffic of this VNI ( Mutually exclusive with ingress_replication_bgp. With state |
|
Multicast group address. |
|
Optional second multicast group address accepted by Accepted by the CLI of NX-OS 10.6(4) on N9K-C93180YC-FX without an error but not applied there, so it is not covered by the integration tests. |
|
Enable/disable multisite ingress replication for L2VNI Choices:
|
|
Enable/disable ARP suppression for L2VNI Mutually exclusive with suppress_arp_disable when both are true. Choices:
|
|
Disable/enable the global setting for ARP suppression for L2VNI Mutually exclusive with suppress_arp when both are true. Choices:
|
|
Virtual Network Identifier ID Valid range is 1-16777214. |
|
This option is used only with state parsed. The value of this option should be the output received from the NX-OS device by executing the command show running-config | section “^interface nve1”. The state parsed reads the configuration from |
|
The state of the configuration after module completion. States With state With state Choices:
|
Notes
Note
Tested against NXOS 10.3(7)
Tested against NX-OS 10.6(4) on N9K-C93180YC-FX
Unsupported for Cisco MDS
suppress_arpneeds the ARP-Ether ACL TCAM region (hardware access-list tcam region arp-ether) to be carved, which requires a reload. Devices without it reject the command.Only the
interface nve1interface is managed.Within a VNI,
suppress-arpandsuppress-arp disableare alternatives, as aremcast-groupandingress-replication protocol bgp. The module fails if both options of such a pair are true (or, for mcast_group, set) in the task.cisco.nxos.nxos_vxlan_vtep and cisco.nxos.nxos_vxlan_vtep_vni manage an overlapping part of the same
interface nve1configuration. Prefer this module for whole-interface, declarative management (includingreplaced,overriddenandgathered). Do not manage the same NVE settings with both this module and the older modules in one play.
Examples
# Using merged
# Before state:
# -------------
# switch# show running-config | section "^interface nve1"
# switch#
- name: Merge the provided NVE configuration with the existing running configuration.
cisco.nxos.nxos_nve_interface:
config:
enabled: true
description: vxlan vtep
advertise_virtual_rmac: true
host_reachability_bgp: true
source_interface_name: loopback1
source_interface_hold_time: 60
global_multicast_group:
address: 233.252.0.20
mode: L2
vnis:
- associate_vrf: true
vni_id: 11111
- associate_vrf: false
vni_id: 22222
- suppress_arp: true
vni_id: 33333
- vni_id: 44444
mcast_group:
address: 233.252.0.10
state: merged
# Task output:
# ------------
# before: {}
#
# commands:
# - interface nve1
# - description vxlan vtep
# - host-reachability protocol bgp
# - advertise virtual-rmac
# - source-interface loopback1
# - source-interface hold-down-time 60
# - member vni 11111 associate-vrf
# - member vni 22222
# - member vni 33333
# - suppress-arp
# - member vni 44444
# - mcast-group 233.252.0.10
# - no shutdown
# - global mcast-group 233.252.0.20 L2
#
# after:
# enabled: true
# description: vxlan vtep
# advertise_virtual_rmac: true
# host_reachability_bgp: true
# source_interface_name: loopback1
# source_interface_hold_time: 60
# global_multicast_group:
# address: 233.252.0.20
# mode: L2
# vnis:
# - associate_vrf: true
# vni_id: 11111
# - vni_id: 22222
# - suppress_arp: true
# vni_id: 33333
# - vni_id: 44444
# mcast_group:
# address: 233.252.0.10
#
# After state:
# ------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# description vxlan vtep
# host-reachability protocol bgp
# advertise virtual-rmac
# source-interface loopback1
# source-interface hold-down-time 60
# global mcast-group 233.252.0.20 L2
# member vni 11111 associate-vrf
# member vni 22222
# member vni 33333
# suppress-arp
# member vni 44444
# mcast-group 233.252.0.10
# Using gathered
# Existing config:
# ---------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# description vxlan vtep
# host-reachability protocol bgp
# advertise virtual-rmac
# source-interface loopback1
# source-interface hold-down-time 60
# global mcast-group 233.252.0.20 L2
# member vni 11111 associate-vrf
# member vni 22222
# member vni 33333
# suppress-arp
- name: Gather NVE interface facts using gathered
cisco.nxos.nxos_nve_interface:
state: gathered
# Task output:
# ------------
# gathered:
# enabled: true
# description: vxlan vtep
# advertise_virtual_rmac: true
# host_reachability_bgp: true
# source_interface_name: loopback1
# source_interface_hold_time: 60
# global_multicast_group:
# address: 233.252.0.20
# mode: L2
# vnis:
# - associate_vrf: true
# vni_id: 11111
# - vni_id: 22222
# - suppress_arp: true
# vni_id: 33333
# Using overridden
# Before state:
# -------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# description vxlan vtep
# host-reachability protocol bgp
# advertise virtual-rmac
# source-interface loopback1
# source-interface hold-down-time 60
# global mcast-group 233.252.0.20 L2
# member vni 11111 associate-vrf
# member vni 22222
# member vni 33333
# suppress-arp
- name: Override NVE interface configuration with provided configuration.
cisco.nxos.nxos_nve_interface:
config:
enabled: true
advertise_virtual_rmac: true
host_reachability_bgp: true
source_interface_name: loopback1
global_multicast_group:
address: 233.252.0.30
mode: L2
vnis:
- associate_vrf: false
ingress_replication_bgp: true
suppress_arp: true
vni_id: 11111
- associate_vrf: true
vni_id: 22222
- associate_vrf: true
vni_id: 33333
state: overridden
# Task output:
# ------------
# before:
# enabled: true
# description: vxlan vtep
# advertise_virtual_rmac: true
# host_reachability_bgp: true
# source_interface_name: loopback1
# source_interface_hold_time: 60
# global_multicast_group:
# address: 233.252.0.20
# mode: L2
# vnis:
# - associate_vrf: true
# vni_id: 11111
# - vni_id: 22222
# - suppress_arp: true
# vni_id: 33333
#
# commands:
# - interface nve1
# - no description vxlan vtep
# - no source-interface hold-down-time 60
# - no member vni 11111 associate-vrf
# - member vni 11111
# - suppress-arp
# - ingress-replication protocol bgp
# - no member vni 22222
# - member vni 22222 associate-vrf
# - no member vni 33333
# - member vni 33333 associate-vrf
# - global mcast-group 233.252.0.30 L2
#
# after:
# enabled: true
# advertise_virtual_rmac: true
# host_reachability_bgp: true
# source_interface_name: loopback1
# global_multicast_group:
# address: 233.252.0.30
# mode: L2
# vnis:
# - ingress_replication_bgp: true
# suppress_arp: true
# vni_id: 11111
# - associate_vrf: true
# vni_id: 22222
# - associate_vrf: true
# vni_id: 33333
#
# After state:
# ------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# host-reachability protocol bgp
# advertise virtual-rmac
# source-interface loopback1
# global mcast-group 233.252.0.40 L2
# member vni 11111
# suppress-arp
# ingress-replication protocol bgp
# member vni 22222 associate-vrf
# member vni 33333 associate-vrf
# Using replaced
# Before state:
# -------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# host-reachability protocol bgp
# advertise virtual-rmac
# source-interface loopback1
# global mcast-group 233.252.0.40 L2
# member vni 11111
# suppress-arp
# ingress-replication protocol bgp
# member vni 22222 associate-vrf
# member vni 33333 associate-vrf
- name: Replace NVE interface configuration with provided configuration.
cisco.nxos.nxos_nve_interface:
config:
description: vxlan vtep
host_reachability_bgp: true
source_interface_name: loopback1
state: replaced
# Task output:
# ------------
# before:
# enabled: true
# advertise_virtual_rmac: true
# host_reachability_bgp: true
# source_interface_name: loopback1
# global_multicast_group:
# address: 233.252.0.40
# mode: L2
# vnis:
# - ingress_replication_bgp: true
# suppress_arp: true
# vni_id: 11111
# - associate_vrf: true
# vni_id: 22222
# - associate_vrf: true
# vni_id: 33333
#
# commands:
# - interface nve1
# - description vxlan vtep
# - no advertise virtual-rmac
# - no member vni 11111
# - no member vni 22222 associate-vrf
# - no member vni 33333 associate-vrf
# - shutdown
# - no global mcast-group L2
#
# after:
# enabled: false
# description: vxlan vtep
# host_reachability_bgp: true
# source_interface_name: loopback1
#
# After state:
# ------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# shutdown
# description vxlan vtep
# host-reachability protocol bgp
# source-interface loopback1
# Using deleted
# Before state:
# -------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# shutdown
# description vxlan vtep
# host-reachability protocol bgp
# source-interface loopback1
- name: Delete the whole NVE interface.
cisco.nxos.nxos_nve_interface:
state: deleted
# Task output:
# ------------
# before:
# description: vxlan vtep
# host_reachability_bgp: true
# source_interface_name: loopback1
#
# commands:
# - no interface nve1
#
# after: {}
#
# After state:
# ------------
# switch# show running-config | section "^interface nve1"
# switch#
# Using deleted with a config to remove only the listed VNIs
# Before state:
# -------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# host-reachability protocol bgp
# source-interface loopback1
# member vni 11111
# member vni 22222 associate-vrf
# member vni 33333
- name: Delete only the listed VNIs.
cisco.nxos.nxos_nve_interface:
config:
vnis:
- vni_id: 11111
- vni_id: 22222
state: deleted
# Task output:
# ------------
# commands:
# - interface nve1
# - no member vni 11111
# - no member vni 22222 associate-vrf
#
# After state:
# ------------
# switch# show running-config | section "^interface nve1"
# interface nve1
# no shutdown
# host-reachability protocol bgp
# source-interface loopback1
# member vni 33333
# Using rendered
- name: Render platform specific configuration lines (without connecting to the device)
cisco.nxos.nxos_nve_interface:
config:
enabled: true
description: vxlan vtep
advertise_virtual_rmac: true
host_reachability_bgp: true
source_interface_name: loopback1
global_multicast_group:
address: 233.252.0.20
mode: L2
vnis:
- suppress_arp: true
vni_id: 11111
- suppress_arp_disable: true
vni_id: 22222
state: rendered
# Task output:
# ------------
# rendered:
# - interface nve1
# - description vxlan vtep
# - host-reachability protocol bgp
# - advertise virtual-rmac
# - source-interface loopback1
# - member vni 11111
# - suppress-arp
# - member vni 22222
# - suppress-arp disable
# - no shutdown
# - global mcast-group 233.252.0.20 L2
# Using parsed
# parsed.cfg
# ----------
# interface nve1
# no shutdown
# description vxlan vtep
# host-reachability protocol bgp
# source-interface loopback1
# global mcast-group 233.252.0.20 L2
# member vni 22222
# member vni 33333
- name: Parse externally provided NVE interface config
cisco.nxos.nxos_nve_interface:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task output:
# ------------
# parsed:
# description: vxlan vtep
# enabled: true
# global_multicast_group:
# address: 233.252.0.20
# mode: L2
# host_reachability_bgp: true
# source_interface_name: loopback1
# vnis:
# - vni_id: 22222
# - vni_id: 33333
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The configuration as structured data after module completion. Returned: when changed Sample: |
|
The configuration as structured data prior to module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |