dellemc / dellemc.enterprise_sonic / 2.4.0 / module / sonic_ip_neighbor Manage IP neighbor global configuration on SONiC. | "added in version" 2.1.0 of dellemc.enterprise_sonic" Authors: M. Zhang (@mingjunzhang2019)dellemc.enterprise_sonic.sonic_ip_neighbor (2.4.0) — module
Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0
collections: - name: dellemc.enterprise_sonic version: 2.4.0
This module provides configuration management of IP neighbor global for devices running SONiC.
# # 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
state: choices: - merged - replaced - overridden - deleted default: merged description: - The state of the configuration after module completion. type: str config: description: - Specifies IP neighbor global configurations. suboptions: ipv4_arp_timeout: description: - IPv4 ARP timeout. - The range is from 60 to 14400. type: int ipv4_drop_neighbor_aging_time: description: - IPv4 drop neighbor aging time. - The range is from 60 to 14400. type: int ipv6_drop_neighbor_aging_time: description: - IPv6 drop neighbor aging time. - The range is from 60 to 14400. type: int ipv6_nd_cache_expiry: description: - IPv6 ND cache expiry. - The range is from 60 to 14400. type: int num_local_neigh: description: - The number of reserved local neighbors. - The range is from 0 to 32000. type: int type: dict
after: description: The resulting configuration model invocation. returned: when changed sample: "The configuration returned will always be in the same format\n of the parameters\ \ above.\n" type: list after(generated): description: The generated configuration model invocation. returned: when C(check_mode) sample: "The configuration returned will always be in the same format\n of the parameters\ \ above.\n" type: list before: description: The configuration prior to the model invocation. returned: always sample: "The configuration returned will always be in the same format\n of the parameters\ \ above.\n" type: list commands: description: The set of commands pushed to the remote device. returned: always sample: - command 1 - command 2 - command 3 type: list