Cheat Sheets

JPNAS.NET / Cheat Sheets

📡 Networking

Commands for finding network problems on Windows and Linux, step by step from the IP address to the service – plus the address ranges and port numbers I look up most often.

Open in the interactive Cheat Sheets

My address

ipconfig /allWindows: IP address, gateway, DNS servers and MAC address of every adapter.
ip a ip routeLinux: addresses / routes, including the default gateway.
ipconfig /release ipconfig /renewWindows: give back the address and ask the DHCP server for a new one.
nmcli device showLinux with NetworkManager: everything about the connections.

Is it reachable?

ping 192.168.1.1Does the router answer?
ping 1.1.1.1Does the Internet answer – by IP address, without DNS?
ping -c 4 jpnas.netLinux: only 4 pings (otherwise it runs until Ctrl+C).
tracert 1.1.1.1 traceroute 1.1.1.1Windows / Linux: every router on the way.
mtr 1.1.1.1 pathping 1.1.1.1Linux / Windows: route and packet loss on every hop.

DNS

nslookup jpnas.netWhich IP address does this name have?
nslookup jpnas.net 1.1.1.1Ask a specific DNS server – to compare with your own.
dig +short jpnas.net dig MX jpnas.netLinux: only the address / the mail servers of a domain.
ipconfig /flushdnsWindows: clear the DNS cache.
resolvectl status resolvectl flush-cachesLinux with systemd: DNS settings / clear the cache.

Ports and connections

Test-NetConnection jpnas.net -Port 443PowerShell: is this port reachable?
nc -zv jpnas.net 443Linux: the same with netcat.
ss -tulpnLinux: which programs listen on which ports.
netstat -ano | findstr LISTENINGWindows: listening ports with process IDs.
curl -I https://jpnas.net/Ask a web server only for the headers – status code, server, redirects.

Speed and Wi-Fi

iperf3 -sStart an iperf3 server on one computer.
iperf3 -c 192.168.1.10Measure the speed to it from another one (add -R for the other direction).
netsh wlan show interfacesWindows: Wi-Fi signal, channel, speed and band.
nmcli dev wifiLinux: Wi-Fi networks around you with signal and channel.

Addresses to remember

10.0.0.0/8 172.16.0.0/12 192.168.0.0/16Private address ranges – used at home and in companies, not on the Internet.
169.254.x.xThe computer gave itself an address because no DHCP server answered.
127.0.0.1 ::1Localhost – this computer itself (IPv4 / IPv6).
/24 = 255.255.255.0A typical home network: 254 usable addresses.
1.1.1.1 9.9.9.9 8.8.8.8Public DNS servers of Cloudflare, Quad9 and Google – good for testing.

Ports to remember

22SSH
53DNS
80 443HTTP / HTTPS
25 587 993Mail: server-to-server / sending from a mail program / IMAP
3389Windows Remote Desktop – never open it to the Internet
1883 8883MQTT / MQTT over TLS
51820WireGuard (UDP)