dellemc.enterprise_sonic.sonic_ip_neighbor module – Manage IP neighbor global configuration on SONiC.
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
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 dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_ip_neighbor.
New in dellemc.enterprise_sonic 2.1.0
Synopsis
- This module provides configuration management of IP neighbor global for devices running SONiC. 
Parameters
| Parameter | Comments | 
|---|---|
| Specifies IP neighbor global configurations. | |
| IPv4 ARP timeout. The range is from 60 to 14400. | |
| IPv4 drop neighbor aging time. The range is from 60 to 14400. | |
| IPv6 drop neighbor aging time. The range is from 60 to 14400. | |
| IPv6 ND cache expiry. The range is from 60 to 14400. | |
| The number of reserved local neighbors. The range is from 0 to 32000. | |
| The state of the configuration after module completion. Choices: 
 | 
Notes
Note
- Supports - check_mode.
Examples
#
# 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
#!
#
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| The resulting configuration module invocation. Returned: when changed Sample:  | |
| The generated configuration module invocation. Returned: when  Sample:  | |
| The configuration prior to the module invocation. Returned: always Sample:  | |
| The set of commands pushed to the remote device. Returned: always Sample:  | 
