Skip to main content

Appendix

This appendix contains a summary of common network commands, a CIDR cheat sheet, and a list of common port numbers.

Common Commands Summary

CommandDescription
pingTest reachability of a host
tracerouteTrace the path to a host
ip addr showDisplay IP addresses and network interfaces
ip route showDisplay the routing table
ss -tlList all listening TCP sockets
netstat -tulnList all listening ports
digQuery DNS servers
nslookupQuery DNS servers
nmapNetwork scanning and security auditing
curlTransfer data from or to a server
tcpdumpPacket analyzer
tsharkCommand-line version of Wireshark
iftopDisplay bandwidth usage
nloadMonitor network traffic
vnstatNetwork traffic monitor

CIDR Cheat Sheet

CIDRSubnet Mask# of Addresses
/32255.255.255.2551
/31255.255.255.2542
/30255.255.255.2524
/29255.255.255.2488
/28255.255.255.24016
/27255.255.255.22432
/26255.255.255.19264
/25255.255.255.128128
/24255.255.255.0256
/23255.255.254.0512
/22255.255.252.01,024
/21255.255.248.02,048
/20255.255.240.04,096
/16255.255.0.065,536
/8255.0.0.016,777,216

Common Port Numbers

PortProtocolService
20TCPFTP (Data)
21TCPFTP (Control)
22TCPSSH
23TCPTelnet
25TCPSMTP
53TCP/UDPDNS
67/68UDPDHCP
80TCPHTTP
110TCPPOP3
123UDPNTP
143TCPIMAP
161/162UDPSNMP
443TCPHTTPS
3306TCPMySQL/MariaDB
5432TCPPostgreSQL
27017TCPMongoDB
1433TCPMSSQL