Skip to content

Add ip_neighbor model #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions models/enterprise_sonic/ip_neighbor/deleted_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd dad enable
# ipv6 nd managed-config-flag
# ipv6 nd adv-interval-option
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000
# ipv6 nd ra-lifetime 4500
# ipv6 nd dnssl abc.com 1000

- name: Delete some IP neighbor configuration
sonic_ip_neighbor:
config:
ipv4_arp_timeout: 1200
ipv4_drop_neighbor_aging_time: 600
intf_ipv6_neighbors:
- interface: Ethernet20
adv_interval_option: true
dad: enable
dnssl:
- name: abc.com
lifetime: 4500
state: deleted

# After state:
# ------------
#
# sonic# show running-configuration
# !
# ipv6 drop-neighbor aging-time 600
# ip reserve local-neigh 1000
# ipv6 nd cache expire 1200
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd managed-config-flag
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000
28 changes: 28 additions & 0 deletions models/enterprise_sonic/ip_neighbor/deleted_example_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Using deleted
#
# Before state:
# -------------
#
# sonic# show running-configuration
# !
# ipv6 drop-neighbor aging-time 600
# ip reserve local-neigh 1000
# ipv6 nd cache expire 1200
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd managed-config-flag
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000

- name: Delete all IP neighbor configuration
sonic_ip_neighbor:
config: {}
state: deleted

# After state:
# ------------
#
# sonic# show running-configuration
# (No IP neighbor configuration present)
53 changes: 53 additions & 0 deletions models/enterprise_sonic/ip_neighbor/merged_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Using merged
#
# Before state:
# -------------
#
# sonic# show running-configuration
# (No IP neighbor configuration present)

- name: Merge IP neighbor configuration
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
intf_ipv6_neighbors:
- interface: Ethernet20
adv_interval_option: true
dad: enable
dnssl:
- name: abc.com
valid_lifetime: 1000
lifetime: 4500
managed_config: true
min_ra_interval_msec: 12000
mtu: 725
neighbors:
- ip: 1::1
link_layer_address: A1:B4:C5:C1:DD:3E
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
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd dad enable
# ipv6 nd managed-config-flag
# ipv6 nd adv-interval-option
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000
# ipv6 nd ra-lifetime 4500
# ipv6 nd dnssl abc.com 1000
53 changes: 53 additions & 0 deletions models/enterprise_sonic/ip_neighbor/overridden_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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: Override IP neighbor configuration
sonic_ip_neighbor:
config:
ipv4_arp_timeout: 1300
ipv4_drop_neighbor_aging_time: 700
intf_ipv6_neighbors:
- interface: Ethernet20
adv_interval_option: true
dad: enable
dnssl:
- name: abc.com
valid_lifetime: 1000
lifetime: 4500
managed_config: true
min_ra_interval_msec: 12000
mtu: 725
neighbors:
- ip: 1::1
link_layer_address: A1:B4:C5:C1:DD:3E
state: overridden

# After state:
# ------------
#
# sonic# show running-configuration
# !
# ip arp timeout 1300
# ip drop-neighbor aging-time 700
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd dad enable
# ipv6 nd managed-config-flag
# ipv6 nd adv-interval-option
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000
# ipv6 nd ra-lifetime 4500
# ipv6 nd dnssl abc.com 1000
46 changes: 46 additions & 0 deletions models/enterprise_sonic/ip_neighbor/replaced_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Using replaced
#
# 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
# !
# !
# interface Ethernet20
# ipv6 neighbor 1::1 A1:B4:C5:C1:DD:3E
# ipv6 nd dad enable
# ipv6 nd managed-config-flag
# ipv6 nd adv-interval-option
# ipv6 nd mtu 725
# ipv6 nd min ra-interval msec 12000
# ipv6 nd ra-lifetime 4500
# ipv6 nd dnssl abc.com 1000

- name: Replace some IP neighbor configuration
sonic_ip_neighbor:
config:
intf_ipv6_neighbors:
- interface: Ethernet20
lifetime: 6000
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
# !
# !
# interface Ethernet20
# ipv6 nd ra-lifetime 6000
Loading