Appendices

BQuick Reference Cards

On this page
  1. Subnetting cheat sheet
  2. Private and special IPv4 addresses
  3. Common port numbers
  4. Which key for which job
  5. Troubleshooting order
  6. Everyday commands

Subnetting cheat sheet

PrefixMaskBlock sizeUsable hosts
/8255.0.0.0-16,777,214
/16255.255.0.0-65,534
/23255.255.254.02 (third octet)510
/24255.255.255.01 (third octet)254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

Formulas: usable hosts = 2^h − 2 · subnets = 2^s · block size = 256 − mask octet. Powers of two: 1, 2, 4, 8, 16, 32, 64, 128, 256.

Practise with the subnet calculator and the VLSM planner.

Private and special IPv4 addresses

RangeUse
10.0.0.0/8Private (RFC 1918)
172.16.0.0/12Private (172.16.0.0 to 172.31.255.255)
192.168.0.0/16Private
127.0.0.0/8Loopback (127.0.0.1)
169.254.0.0/16APIPA: DHCP failed
224.0.0.0/4Multicast

Common port numbers

PortServicePortService
20/21FTP143IMAP
22SSH, SFTP, SCP161SNMP (UDP)
23Telnet (insecure)389 / 636LDAP / LDAPS
25 / 587SMTP443HTTPS
53DNS (UDP, TCP)445SMB
67/68DHCP (UDP)3306MySQL
80HTTP3389RDP
110POP351820WireGuard (UDP)

Which key for which job

TaskKey used
Encrypt for secrecyreceiver's public key
Decryptreceiver's private key
Signsender's private key
Verify a signaturesender's public key

Troubleshooting order

1ping 127.0.0.1→2ipconfig /all→3ping gateway→4ping 8.8.8.8→5ping a name→6tracert

Everyday commands

TaskWindowsLinux
IP settingsipconfig /allip a, ip route
Reachabilitypingping
Pathtracerttraceroute, mtr
DNS lookupnslookupdig, nslookup
Listening portsnetstat -anoss -tulpn
ARP tablearp -aip neigh
Port testTest-NetConnection host -Port 443nc -zv host 443
ServicesGet-Servicesystemctl status name
LogsEvent Viewerjournalctl -xe, /var/log