Skip to content
URIAH CLEMMER
$ ./netcalc

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.

YOUR ADDRESS // as this server sees you

216.73.217.140

VERSION IPv4
SCOPE Public unicast
PTR NAME 140.217.73.216.in-addr.arpa

// 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.

SUBNET CALCULATOR // IPv4 and IPv6
RANGE → CIDR // the fewest blocks that cover it exactly
IPv6 TOOLS // text forms and interface identifiers
COMMANDS // what to type, per platform

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.
APPLICATIONS // worth installing
TOOL
Angry IP Scanner WIN / LINUX / MACOS Sweeps a range and reports what answered. Fast, free, portable. The first thing to reach for on an unfamiliar LAN.
Nmap WIN / LINUX / MACOS Host discovery, port scanning, service and OS fingerprinting. nmap -sn 10.0.0.0/24 for a ping sweep. Zenmap is the GUI.
Wireshark WIN / LINUX / MACOS Packet capture and protocol analysis. tshark is the CLI; termshark gives you the TUI over an SSH session.
Advanced IP Scanner WINDOWS LAN sweep with shares, RDP and remote shutdown. More Windows-aware than Angry IP, less portable.
Fing IOS / ANDROID / DESKTOP Device discovery from a phone. Useful when the problem is "what is that thing on my Wi-Fi".
iperf3 WIN / LINUX / MACOS Measures actual throughput between two hosts. The answer to "is it the network or the application".
mtr LINUX / MACOS (WINMTR ON WINDOWS) Continuous traceroute with per-hop loss. Shows which hop is losing packets, not just that something is.
netcat / socat WIN / LINUX / MACOS Raw TCP and UDP by hand. nc -vz host 443 to test a port; socat for anything more involved.
arp-scan / netdiscover LINUX Layer-2 discovery via ARP. Finds hosts that ignore ping, because they cannot ignore ARP.
ipcalc / sipcalc LINUX / MACOS Subnet maths at the command line. sipcalc handles IPv6 properly; plain ipcalc is IPv4-focused.
whois WIN / LINUX / MACOS Who an address or block is registered to. Points at the RIR record, the ASN and an abuse contact.
bgp.he.net / bgp.tools WEB How a prefix is announced and by whom. For when the question is not "is it up" but "whose is it and where does it route".
RIPEstat / ARIN Whois-RWS WEB / API Authoritative registry data with history. Better than a scraped whois when you need to cite something.
INSERT COIN Found a bug in the maths? →