cisco.ios.ios_vxlan_vtep module – Resource module to configure VXLAN VTEP interface.
Note
This module is part of the cisco.ios collection (version 5.3.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.ios
.
To use it in a playbook, specify: cisco.ios.ios_vxlan_vtep
.
New in cisco.ios 5.3.0
Synopsis
This module provides declarative management of VXLAN VTEP interface on Cisco IOS network devices.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
A dictionary of VXLAN VTEP interface option |
|
Host reachability using EVPN protocol Choices:
|
|
VXLAN VTEP interface |
|
Configure VNI member |
|
Configure VNI information |
|
Associates L2VNI with the VXLAN VTEP interface |
|
Replication type for the L2VNI |
|
Configure multicast group for VNI(s) |
|
IPv4 multicast group |
|
IPv6 multicast group |
|
Replication type Choices:
|
|
VNI number |
|
Associates L3VNI with the VXLAN VTEP interface |
|
VNI number |
|
VRF name of the L3VNI |
|
Source interface for the VXLAN VTEP interface |
|
This option is used only with state parsed. The value of this option should be the output received from the IOS device by executing the command show running-config | section ^interface nve. The state parsed reads the configuration from |
|
The state the configuration should be left in Choices:
|
Notes
Note
Tested against Cisco IOS device with Version 17.13.01 on Cat9k on CML.
This module works with connection
network_cli
. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
Examples
# Using state merged
# Before state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback1
# host-reachability protocol bgp
# member vni 10101 mcast-group 225.0.0.101
# member vni 10102 ingress-replication
# member vni 50901 vrf green
# member vni 10201 mcast-group 225.0.0.101
# member vni 10202 ingress-replication
# member vni 50902 vrf blue
# - name: Merge the provided configuration with the device configuration
# cisco.ios.ios_vxlan_vtep:
# config:
# - interface: nve1
# source_interface: loopback2
# member:
# vni:
# l2vni:
# - vni: 10101
# replication:
# type: ingress
# - vni: 10201
# replication:
# type: static
# mcast_group:
# ipv4: 225.0.0.101
# ipv6: FF0E:225::101
# l3vni:
# - vni: 50901
# vrf: blue
# state: merged
# Commands Fired:
# ---------------
# "commands": [
# "interface nve1",
# "source-interface loopback2",
# "no member vni 10101 mcast-group 225.0.0.101",
# "member vni 10101 ingress-replication",
# "no member vni 10201 mcast-group 225.0.0.101",
# "member vni 10201 mcast-group 225.0.0.101 FF0E:225::101",
# "no member vni 50901 vrf green",
# "no member vni 50902 vrf blue",
# "member vni 50901 vrf blue"
# ],
# After state:
# ------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10102 ingress-replication
# member vni 10202 ingress-replication
# member vni 10101 ingress-replication
# member vni 10201 mcast-group 225.0.0.101 FF0E:225::101
# member vni 50901 vrf blue
# Using state replaced
# Before state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10102 ingress-replication
# member vni 10202 ingress-replication
# member vni 10101 ingress-replication
# member vni 10201 mcast-group 225.0.0.101 FF0E:225::101
# member vni 50901 vrf blue
# - name: Replaces the device configuration with the provided configuration
# cisco.ios.ios_vxlan_vtep:
# config:
# - interface: nve1
# source_interface: Loopback2
# member:
# vni:
# l2vni:
# - vni: 10101
# replication:
# type: static
# mcast_group:
# ipv6: FF0E:225::101
# - vni: 10201
# replication:
# type: static
# mcast_group:
# ipv6: FF0E:225::102
# state: replaced
# Commands Fired:
# ---------------
# "commands": [
# "interface nve1",
# "no member vni 10101 ingress-replication",
# "member vni 10101 mcast-group FF0E:225::101",
# "no member vni 10201 mcast-group 225.0.0.101 FF0E:225::101",
# "member vni 10201 mcast-group FF0E:225::102",
# "no member vni 10102 ingress-replication",
# "no member vni 10202 ingress-replication",
# "no member vni 50901 vrf blue"
# ],
# After state:
# ------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10101 mcast-group FF0E:225::101
# member vni 10201 mcast-group FF0E:225::102
# Using state Deleted
# Before state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10101 mcast-group FF0E:225::101
# member vni 10201 mcast-group FF0E:225::102
# - name: "Delete VXLAN VTEP interface"
# cisco.ios.ios_vxlan_vtep:
# config:
# - interface: nve1
# state: deleted
# Commands Fired:
# ---------------
# "commands": [
# "interface nve1",
# "no source-interface Loopback2",
# "no host-reachability protocol bgp",
# "no member vni 10101 mcast-group FF0E:225::101",
# "no member vni 10201 mcast-group FF0E:225::102"
# ],
# After state:
# -------------
# interface nve1
# no ip address
# Using state Deleted with member VNIs
# Before state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10101 mcast-group FF0E:225::101
# member vni 10102 mcast-group 225.0.0.101
# member vni 10201 mcast-group 225.0.0.101 FF0E:225::101
# - name: "Delete VXLAN VTEP interface with member VNIs"
# cisco.ios.ios_vxlan_vtep:
# config:
# - interface: nve1
# source_interface: Loopback2
# member:
# vni:
# l2vni:
# - vni: 10101
# - vni: 10102
# state: deleted
# Commands Fired:
# ---------------
# "commands": [
# "interface nve1",
# "no member vni 10101 mcast-group FF0E:225::101",
# "no member vni 10102 mcast-group 225.0.0.101"
# ],
# After state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10201 mcast-group 225.0.0.101 FF0E:225::101
# Using state Deleted with no config
# Before state:
# -------------
# interface nve1
# no ip address
# source-interface Loopback2
# host-reachability protocol bgp
# member vni 10101 mcast-group FF0E:225::101
# member vni 10201 mcast-group FF0E:225::102
# - name: "Delete VXLAN VTEP interface with no config"
# cisco.ios.ios_vxlan_vtep:
# state: deleted
# Commands Fired:
# ---------------
# "commands": [
# "interface nve1",
# "no source-interface Loopback2",
# "no host-reachability protocol bgp",
# "no member vni 10101 mcast-group FF0E:225::101",
# "no member vni 10201 mcast-group FF0E:225::102"
# ],
# After state:
# -------------
# interface nve1
# no ip address
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration after module execution. Returned: when changed Sample: |
|
The configuration prior to the module execution. Returned: when state is Sample: |
|
The set of commands pushed to the remote device. Returned: when state is Sample: |