From 67b342a2c59035a5282f92e3b3d77f698dc8887c Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 2 Jun 2022 09:20:37 -0400 Subject: T4446: use a unified neighbor display script --- op-mode-definitions/ipv6-route.xml.in | 30 ++++++++++++++++++++++++------ op-mode-definitions/show-arp.xml.in | 4 ++-- op-mode-definitions/show-ip.xml.in | 24 ++++++++++++++++++++++-- op-mode-definitions/show-ipv6.xml.in | 2 +- 4 files changed, 49 insertions(+), 11 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/ipv6-route.xml.in b/op-mode-definitions/ipv6-route.xml.in index 5f20444d4..4f8792f9f 100644 --- a/op-mode-definitions/ipv6-route.xml.in +++ b/op-mode-definitions/ipv6-route.xml.in @@ -7,7 +7,7 @@ - Show IPv6 routing information + Show IPv6 networking information @@ -16,14 +16,32 @@ netstat -gn6 - - + - Show IPv6 Neighbor Discovery (ND) information + Show IPv6 neighbor (NDP) table ${vyos_op_scripts_dir}/show_neigh.py --family inet6 - - + + + + Show IPv6 neighbor table for specified interface + + + + + ${vyos_op_scripts_dir}/show_neigh.py --family inet6 --interface "$5" + + + + Show IPv6 neighbors with specified state + + reachable stale failed permanent + + + ${vyos_op_scripts_dir}/show_neigh.py --family inet6 --state "$5" + + + diff --git a/op-mode-definitions/show-arp.xml.in b/op-mode-definitions/show-arp.xml.in index 12e7d3aa2..58cc6e45e 100644 --- a/op-mode-definitions/show-arp.xml.in +++ b/op-mode-definitions/show-arp.xml.in @@ -6,7 +6,7 @@ Show Address Resolution Protocol (ARP) information - /usr/sbin/arp -e -n + ${vyos_op_scripts_dir}/show_neigh.py --family inet @@ -15,7 +15,7 @@ - /usr/sbin/arp -e -n -i "$4" + ${vyos_op_scripts_dir}/show_neigh.py --family inet --interface "$4" diff --git a/op-mode-definitions/show-ip.xml.in b/op-mode-definitions/show-ip.xml.in index 91564440d..d342ac192 100644 --- a/op-mode-definitions/show-ip.xml.in +++ b/op-mode-definitions/show-ip.xml.in @@ -4,14 +4,34 @@ - Show IPv4 routing information + Show IPv4 networking information - Show IPv4 Neighbor Discovery (ND) information + Show IPv4 neighbor (ARP) table ${vyos_op_scripts_dir}/show_neigh.py --family inet + + + + Show IPv4 neighbor table for specified interface + + + + + ${vyos_op_scripts_dir}/show_neigh.py --family inet --interface "$5" + + + + Show IPv4 neighbors with specified state + + reachable stale failed permanent + + + ${vyos_op_scripts_dir}/show_neigh.py --family inet --state "$5" + + diff --git a/op-mode-definitions/show-ipv6.xml.in b/op-mode-definitions/show-ipv6.xml.in index a59c8df0c..66bc2485a 100644 --- a/op-mode-definitions/show-ipv6.xml.in +++ b/op-mode-definitions/show-ipv6.xml.in @@ -4,7 +4,7 @@ - Show IPv6 routing information + Show IPv6 networking information -- cgit v1.2.3