Tip
This is the documentation for the 24.06 version. Looking for the documentation of the latest version? Have a look here.
Viewing Status Information¶
Status information can be viewed using the show
command from either basic or
configuration mode.
For a full list of possible show
commands, enter show ?
:
tnsr# show ?
acl Access Control Lists
acl-based-forwarding ACL Based Forwarding (ABF)
bfd Bidirectional Forwarding Detection
cli State of per-session CLI options
clock Show the current system date and time
configuration Config DB configuration state
dataplane Dataplane
documentation Documentation URLs
gre GRE tunnels
history-config Show history configuration
host Host information
interface Interface details
ip Internet protocol
ipsec IPsec
kea Kea/DHCP
ldap LDAP
macip MACIP Access Control Lists
map MAP-E/MAP-T
nacm NACM data
nat Network Address Translation
neighbor Neighbors (ARP/NDP)
ntp NTP
packet-counters Packet statistic and error counters
prometheus
radius Radius
route Show routing information
running-configuration Running DB CLI configuration state
span SPAN mirrors
sysctl Sysctl parameters
system System information
trace Packet trace
tunnel VPN Tunnel
unbound Unbound DNS
version Show version of system components
vxlan VXLAN tunnels
wireguard Wireguard
Example:
tnsr# show version
Version: tnsr-v21.03-2
Build timestamp: Thu Mar 4 10:24:34 2021 CST
The behavior of each show
command is covered in relevant sections of the
documentation.
Output Modifiers¶
show
commands support a limited set of output modifiers which are invoked by
adding a pipe character (|
) after the command followed by one of the
supported modifiers and its arguments. These include:
| match <pattern>
| exclude <pattern>
| tail <num>
| count
Warning
When using output modifiers there must be a space before and
after the pipe character (|
). For example, a | b
is valid, but
a|b
is invalid.
Match¶
The | match <pattern>
modifier filters the output to lines matching the
given pattern. The pattern supports some regular expression conventions such as
using .
to match any single character, .*
to match any string, and |
between multiple patters to match any of the given patterns.
Tip
Some pattern components may need a leading backslash, such as \.
to match
a literal period character. The \
must be typed twice as the first press
escapes the second.
Example:
tnsr# show route table default | match 10\.30\.
10.30.0.1/24 via LAN weight 1 preference 0
10.30.0.1/32 via 10.30.0.1 local LAN weight 1 preference 0
10.30.1.1/24 via DMZ weight 1 preference 0
10.30.1.1/32 via 10.30.1.1 local DMZ weight 1 preference 0
Exclude¶
The | exclude <pattern>
modifier filters the output such that it excludes
lines matching the given pattern.
Example:
tnsr# show route table default | exclude 10\.30\.
Route Table default AF: ipv4 ID: 0
-----------------------------------------
0.0.0.0/0 via 203.0.113.1 WAN weight 1 preference 0
10.15.30.2/24 via FIBER weight 1 preference 0
10.15.30.2/32 via 10.15.30.2 local FIBER weight 1 preference 0
203.0.113.30/24 via WAN weight 1 preference 0
203.0.113.30/32 via 203.0.113.30 local WAN weight 1 preference 0
Tail¶
The | tail <num>
modifier filters the output so only the last <num>
lines of the output are returned.
Example:
tnsr# show route table default | tail 2
203.0.113.30/24 via WAN weight 1 preference 0
203.0.113.30/32 via 203.0.113.30 local WAN weight 1 preference 0
Count¶
The | count
modifier does not print any of the output, instead it prints a
count indicating the number of lines in the output.
Example:
tnsr# show route table default | count
12
Note
The count also includes any leading or trailing blank lines in the output.