cisco.ios.ios_vxlan_vtep 模块 – 配置 VXLAN VTEP 接口的资源模块。
注意
此模块是 cisco.ios 集合 (版本 9.0.3) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install cisco.ios
。
要在 playbook 中使用它,请指定: cisco.ios.ios_vxlan_vtep
。
cisco.ios 5.3.0 中的新增功能
概要
此模块提供对 Cisco IOS 网络设备上 VXLAN VTEP 接口的声明式管理。
别名:vxlan_vtep
参数
参数 |
注释 |
---|---|
VXLAN VTEP 接口选项的字典 |
|
使用 EVPN 协议的主机可达性 选项
|
|
VXLAN VTEP 接口 |
|
配置 VNI 成员 |
|
配置 VNI 信息 |
|
将 L2VNI 与 VXLAN VTEP 接口关联 |
|
L2VNI 的复制类型 |
|
为 VNI(s) 配置多播组 |
|
IPv4 多播组 |
|
IPv6 多播组 |
|
复制类型 选项
|
|
VNI 编号 |
|
将 L3VNI 与 VXLAN VTEP 接口关联 |
|
VNI 编号 |
|
L3VNI 的 VRF 名称 |
|
VXLAN VTEP 接口的源接口 |
|
此选项仅与状态 *parsed* 一起使用。 此选项的值应为通过执行命令 **show running-config | section ^interface nve** 从 IOS 设备接收的输出。 状态 *parsed* 从 |
|
配置应保留到的状态 选项
|
备注
注意
在使用版本 17.13.01 的 Cisco IOS-XE 设备(Cat9k on CML)上进行了测试。
此模块与连接
network_cli
一起使用。请参阅 https://docs.ansible.org.cn/ansible/latest/network/user_guide/platform_ios.html
示例
# 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
返回值
常见的返回值已在此处记录 此处,以下是此模块特有的字段
键 |
描述 |
---|---|
模块执行后的最终配置。 返回:发生更改时 示例: |
|
模块执行之前的配置。 返回:当 *state* 为 示例: |
|
推送到远程设备的命令集。 返回:当 *state* 为 示例: |