Network Command Reference
These are the commands I actually reach for, mostly kept here so I stop searching for the same ones over and over. Linux, Cisco IOS, and VyOS, organized by what I'm trying to figure out. Exact output (and whether a command exists at all) varies by OS and platform, so treat this as a starting point.
Jump to
Linux: interfaces and addresses
ip -brief address ip address show ip -s link show ip link show dev eth0 ip neigh show ethtool eth0 ethtool -S eth0
Linux: routing
ip route show ip -6 route show ip route get 203.0.113.25 ip -6 route get 2001:db8::25 ip rule show ip route show table all
Can I reach it, and which way does it go?
ping 192.0.2.1 ping -6 2001:db8::1 traceroute 203.0.113.25 traceroute6 2001:db8::25 tracepath 203.0.113.25 mtr -rwzbc 100 203.0.113.25 curl -v https://example.com/ nc -vz example.com 443
DNS
dig example.com dig example.com A dig example.com AAAA dig example.com MX dig @1.1.1.1 example.com dig +trace example.com host example.com resolvectl status resolvectl query example.com
What's listening, and who's connected?
ss -lntup ss -ntp ss -s lsof -i :443 curl -I https://example.com/ openssl s_client -connect example.com:443 -servername example.com
Packet capture
tcpdump -D tcpdump -ni eth0 tcpdump -ni eth0 host 192.0.2.25 tcpdump -ni eth0 port 53 tcpdump -ni eth0 'tcp port 443 and host 203.0.113.10' tcpdump -ni eth0 -s 0 -w capture.pcap
Quick decoder: -n skips DNS lookups (faster, and doesn't add DNS traffic to your capture), -i picks the interface, -s 0 grabs whole packets, and -w saves a file you can open in Wireshark later.
Cisco IOS: switching
show interfaces status show interfaces counters errors show interfaces trunk show vlan brief show mac address-table show mac address-table interface GigabitEthernet1/0/10 show spanning-tree show spanning-tree interface GigabitEthernet1/0/10 detail show etherchannel summary show cdp neighbors detail show lldp neighbors detail
Cisco IOS: routing and everything else
show ip interface brief show ipv6 interface brief show ip route show ipv6 route show ip route 203.0.113.25 show ip cef 203.0.113.25 detail show arp show ipv6 neighbors show ip ospf neighbor show ip bgp summary show ip bgp neighbors show access-lists show logging show processes cpu sorted show memory statistics
VyOS
show interfaces show interfaces ethernet eth0 physical show ip route show ipv6 route show arp show ipv6 neighbors show protocols ospf neighbor show protocols bgp summary show log monitor traffic interface eth0 compare show configuration commands
Save the evidence first
One habit worth building: copy the output somewhere before you clear counters, restart a service, or change a config. The broken state is sometimes the only clue you'll get about what actually went wrong, and once it's gone, it's gone.
Last Modified: October 12, 2026, 11:41 am
