Skip to content

Commit 3ae2cdf

Browse files
Praveen Chaudharylguohan
Praveen Chaudhary
authored andcommitted
[show/main.py]: New Sonic CLI Command "show ndp" to show IPV6 Neighbours (#261)
1.) Added "show ndp" to show ipv6 neighbours. This calls "/bin/ip -6 neigh show" Signed-off-by: [email protected]
1 parent 3db4275 commit 3ae2cdf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

show/main.py

+15
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,21 @@ def arp(ipaddress, verbose):
169169

170170
run_command(cmd, display_cmd=verbose)
171171

172+
#
173+
# 'ndp' command ("show ndp")
174+
#
175+
176+
@cli.command()
177+
@click.argument('ip6address', required=False)
178+
@click.option('--verbose', is_flag=True, help="Enable verbose output")
179+
def ndp(ip6address):
180+
"""Show IPv6 Neighbour table"""
181+
cmd = "/bin/ip -6 neigh show"
182+
183+
if ip6address is not None:
184+
cmd += ' {}'.format(ip6address)
185+
186+
run_command(cmd, display_cmd=verbose)
172187

173188
#
174189
# 'interfaces' group ("show interfaces ...")

0 commit comments

Comments
 (0)