Pcornel
Networking · IP Fundamentals › Client IP Verification

macOS

Cheat sheet · https://pcornel.dk/topic.php?topic=576

Back to the Topic

Answer

On macOS, verify client addressing with ifconfig or networksetup -getinfo "Wi-Fi", netstat -rn for the default route and scutil --dns for resolvers, then ping the gateway.

First checks

  • ifconfig en0 — address
  • netstat -rn | grep default — default gateway
  • scutil --dns — DNS resolvers
  • networksetup -getinfo Wi-Fi — service config

Commands

traceroute
Discover path hops toward a destination by eliciting TTL-expiry responses.
dig
Issue DNS queries and display response sections, flags, timing and selected resolver behavior.
arp -a
Display the ARP cache on Windows.
ping
Send ICMP echo requests from Windows.
ifconfig
Display or configure network interfaces on macOS.
networksetup -getinfo <service>
Display IP settings of a macOS network service.
route -n get default
Display the default route on macOS.
sudo ipconfig set en0 DHCP
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Verify in this order

address → gateway → ARP → remote IP → DNS

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=576

Confirmation

Confirm action

Continue?