Networking
Executive Summary
This cheatsheet is a quick reference for IP addressing, routing, DNS, connectivity checks, and packet inspection.
Use it when troubleshooting network reachability, reviewing scan results, or validating basic connectivity during labs and assessments.
IP Addressing
| Range | Purpose |
|---|---|
10.0.0.0/8 |
Private IPv4 |
172.16.0.0/12 |
Private IPv4 |
192.168.0.0/16 |
Private IPv4 |
127.0.0.0/8 |
Loopback |
169.254.0.0/16 |
Link-local/APIPA |
224.0.0.0/4 |
Multicast |
0.0.0.0 |
Any address / default route |
255.255.255.255 |
Limited broadcast |
CIDR Quick Reference
| CIDR | Hosts | Subnet Mask |
|---|---|---|
/24 |
254 | 255.255.255.0 |
/25 |
126 | 255.255.255.128 |
/26 |
62 | 255.255.255.192 |
/27 |
30 | 255.255.255.224 |
/28 |
14 | 255.255.255.240 |
/29 |
6 | 255.255.255.248 |
/30 |
2 | 255.255.255.252 |
/32 |
1 | Single host |
Linux Network Commands
Show interfaces:
Show routes:
Show listening ports:
Show ARP/neighbor table:
Test connectivity:
Trace route:
Check DNS resolution:
Windows Network Commands
Show IP configuration:
Show routing table:
Show ARP table:
Show active connections:
Show DNS cache:
Test connectivity:
Trace route:
PowerShell port test:
DNS Commands
Query A record:
Query MX record:
Query TXT record:
Query name servers:
Reverse lookup:
Attempt zone transfer:
Netcat Connectivity Checks
Check TCP port:
Connect to service:
Listen on port:
Send text over TCP:
Tcpdump Quick Reference
Capture traffic on interface:
Capture host traffic:
Capture port traffic:
Capture to file:
Read capture file:
Useful Filters
| Filter | Purpose |
|---|---|
host TARGET_IP |
Traffic to or from host |
src TARGET_IP |
Source IP only |
dst TARGET_IP |
Destination IP only |
port 80 |
Traffic using port 80 |
tcp |
TCP traffic |
udp |
UDP traffic |
icmp |
ICMP traffic |
net 192.168.1.0/24 |
Traffic for subnet |
Troubleshooting Flow
| Step | Check |
|---|---|
| Interface | Does the host have an IP address? |
| Route | Is there a route to the destination? |
| DNS | Does the hostname resolve? |
| ICMP | Does ping work? |
| TCP/UDP | Is the target port reachable? |
| Firewall | Is traffic filtered or blocked? |
| Service | Is the service actually listening? |
Notes
- ICMP may be blocked even when services are reachable.
- DNS success does not guarantee the service is alive.
- A filtered port usually means traffic is being dropped.
- A refused connection usually means the host is reachable but the port is closed.
- Always check both local host routing and remote service availability.