dellemc.enterprise_sonic.sonic_ip_neighbor 模块 – 管理 SONiC 上的 IP 邻居全局配置。
注意
此模块是 dellemc.enterprise_sonic 集合 (版本 2.5.1) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.enterprise_sonic
。
要在 playbook 中使用它,请指定:dellemc.enterprise_sonic.sonic_ip_neighbor
。
dellemc.enterprise_sonic 2.1.0 中的新增功能
概要
此模块提供对运行 SONiC 的设备的 IP 邻居全局配置的配置管理。
参数
参数 |
注释 |
---|---|
指定 IP 邻居全局配置。 |
|
IPv4 ARP 超时。 范围是 60 到 14400。 |
|
IPv4 删除邻居老化时间。 范围是 60 到 14400。 |
|
IPv6 删除邻居老化时间。 范围是 60 到 14400。 |
|
IPv6 ND 缓存过期时间。 范围是 60 到 14400。 |
|
保留的本地邻居数量。 范围是 0 到 32000。 |
|
模块完成后的配置状态。 选项
|
备注
注意
支持
check_mode
。
示例
#
# Using merged
#
# Before state:
# -------------
#
#sonic# show running-configuration
#!
#ip arp timeout 180
#ip drop-neighbor aging-time 300
#ipv6 drop-neighbor aging-time 300
#ip reserve local-neigh 0
#ipv6 nd cache expire 180
#!
- name: Configure IP neighbor global
sonic_ip_neighbor:
config:
ipv4_arp_timeout: 1200
ipv4_drop_neighbor_aging_time: 600
ipv6_drop_neighbor_aging_time: 600
ipv6_nd_cache_expiry: 1200
num_local_neigh: 1000
state: merged
# After state:
# ------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
#
# Using deleted
#
# Before state:
# -------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
- name: Delete some IP neighbor configuration
sonic_ip_neighbor:
config:
ipv4_arp_timeout: 0
ipv4_drop_neighbor_aging_time: 0
state: deleted
# After state:
# ------------
#
#sonic# show running-configuration
#!
#ip arp timeout 180
#ip drop-neighbor aging-time 300
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
#
# Using deleted
#
# Before state:
# -------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
- name: Delete all IP neighbor configuration
sonic_ip_neighbor:
config: {}
state: deleted
# After state:
# ------------
#
#sonic# show running-configuration
#!
#ip arp timeout 180
#ip drop-neighbor aging-time 300
#ipv6 drop-neighbor aging-time 300
#ip reserve local-neigh 0
#ipv6 nd cache expire 180
#!
#
# Using replaced
#
# Before state:
# -------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 300
#ip reserve local-neigh 0
#ipv6 nd cache expire 180
#!
- name: Change some IP neighbor configuration
sonic_ip_neighbor:
config:
ipv6_drop_neighbor_aging_time: 600
ipv6_nd_cache_expiry: 1200
num_local_neigh: 1000
state: replaced
# After state:
# ------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
#
# Using overridden
#
# Before state:
# -------------
#
#sonic# show running-configuration
#!
#ip arp timeout 1200
#ip drop-neighbor aging-time 600
#ipv6 drop-neighbor aging-time 300
#ip reserve local-neigh 0
#ipv6 nd cache expire 180
#!
- name: Reset IP neighbor configuration, then configure some
sonic_ip_neighbor:
config:
ipv6_drop_neighbor_aging_time: 600
ipv6_nd_cache_expiry: 1200
num_local_neigh: 1000
state: overridden
# After state:
# ------------
#
#sonic# show running-configuration
#!
#ip arp timeout 180
#ip drop-neighbor aging-time 300
#ipv6 drop-neighbor aging-time 600
#ip reserve local-neigh 1000
#ipv6 nd cache expire 1200
#!
#
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段
键 |
描述 |
---|---|
模块调用后的最终配置。 返回:发生更改时 示例: |
|
生成的配置模块调用。 返回:当 示例: |
|
模块调用之前的配置。 返回:始终 示例: |
|
推送到远程设备的命令集。 返回:始终 示例: |