NetCalc
Subnet maths, VLSM planning, range summarising and IPv6 conversions — plus the commands worth remembering on each platform. Everything runs on the server; nothing is sent anywhere else.
216.73.217.140
// this is the address of whatever last touched the request — your router's public address if you are behind NAT, or your provider's if they run carrier-grade NAT. It is not the address on your network card. For that, use the commands below.
VLSM PLAN
// 2-host requirements resolve to a /31 point-to-point link (RFC 3021), where both addresses are usable. Untick the box above for the /30 floor.
Windows
ipconfig is the one everyone knows; netsh and the PowerShell cmdlets do far more.
ipconfig /all
Every adapter, with MAC, DHCP server, lease times and DNS servers.
ipconfig /release && ipconfig /renew
Drop and re-request the DHCP lease.
ipconfig /flushdns
Clear the resolver cache. /displaydns shows it first.
netsh interface ip show config
Per-interface addressing, including whether it is static or DHCP.
netsh wlan show interfaces
Wi-Fi state: SSID, BSSID, signal, channel.
Get-NetIPAddress -AddressFamily IPv4
PowerShell equivalent of ipconfig, but as objects you can filter.
Get-NetIPConfiguration -Detailed
Address, gateway, DNS and adapter state in one view.
Test-NetConnection host -Port 443
Port reachability plus traceroute. Replaces telnet for "is the port open".
Resolve-DnsName example.com -Type ANY
DNS lookups without installing dig.
Get-NetRoute / route print
The routing table — which interface traffic will actually leave by.
Get-NetNeighbor / arp -a
ARP and NDP cache: who is on the local segment.
netstat -ano
Every socket with the owning PID. Pair with tasklist to name it.
Get-NetTCPConnection -State Listen
Just the listeners, as objects.
tracert / pathping host
Path to a host. pathping adds per-hop loss over time.
Linux
ifconfig, netstat, route and arp are deprecated — the iproute2 tools replaced them years ago and report things the old ones cannot.
ip addr show
Addresses per interface. The modern replacement for ifconfig.
ip -br -c addr
One tidy coloured line per interface. The one to memorise.
ip route get 1.1.1.1
Which route, interface and source address a packet would actually use.
ip neigh
ARP/NDP neighbour table. Replaces arp -a.
ss -tulpn
Listening TCP/UDP sockets with processes. Replaces netstat.
nmcli device show
NetworkManager view: addressing, DNS, connection profile.
resolvectl status
What systemd-resolved is actually using per link — often not what /etc/resolv.conf says.
dig +short example.com
DNS lookup. Add @8.8.8.8 to query a specific resolver.
mtr -rwzbc 100 host
Traceroute and ping combined, with per-hop loss. Better than either alone.
tcpdump -ni eth0 host 10.0.0.5
Capture on the wire. -w file.pcap to open it in Wireshark later.
ipcalc 10.0.0.0/22
Subnet maths at the shell, if you would rather not open this page.
nft list ruleset / iptables -L -n -v
Firewall rules and their hit counts.
ethtool eth0
Link speed, duplex and whether the cable is actually connected.
hostname -I
Just the addresses, space-separated. Handy in scripts.
curl -s ifconfig.me
Public address as the internet sees it, from a terminal.
macOS
BSD userland, so ifconfig and netstat are current here rather than deprecated — but the networksetup and scutil tools are the ones that understand macOS configuration.
ifconfig
All interfaces. en0 is usually Wi-Fi, en1 wired, on modern hardware.
ipconfig getifaddr en0
Just the address of one interface. Nothing else to parse.
networksetup -listallhardwareports
Maps friendly names to en0/en1 so you know which one to ask about.
networksetup -getinfo "Wi-Fi"
Address, mask, router and whether it came from DHCP.
scutil --dns
The real resolver configuration, per-scope. /etc/resolv.conf lies on macOS.
route -n get default
Default gateway and the interface it uses.
netstat -rn
Full routing table.
lsof -i -P -n
Which process owns which socket. The macOS answer to ss -tulpn.
arp -an
Neighbour cache for the local segment.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Flush DNS. Both halves are needed.
wdutil info
Wi-Fi diagnostics on Sonoma and later, replacing the old airport tool.
sudo tcpdump -ni en0
Packet capture, same syntax as Linux.
system_profiler SPNetworkDataType
Everything macOS knows about the network stack, verbosely.