Use this on a macOS client to read addressing with ifconfig or networksetup -getinfo, the default route with netstat -rn, resolvers with scutil --dns, and then ping the gateway.
macOS
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.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ifconfigPrimary Commands
Configuration and operational commands for this Topic.
ifconfigReferenceDisplay or configure network interfaces on macOS.
macOS · mixednetworksetup -getinfo <service>ReferenceDisplay IP settings of a macOS network service.
macOS · mixedroute -n get defaultReferenceDisplay the default route on macOS.
macOS · mixedarp -aReferenceDisplay the ARP cache on Windows.
Windows / PowerShell · mixedpingTroubleshootSend ICMP echo requests from Windows.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Windows / PowerShell · mixedtracerouteTroubleshootDiscover path hops toward a destination by eliciting TTL-expiry responses.
Use when: Primary lookup intent: troubleshoot. Use traceroute when the lookup goal is to discover path hops toward a destination by eliciting TTL-expiry responses. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: troubleshoot. Safety class: read_only. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. traceroute is documented as an operational lookup primitive under Network Troubleshooting. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
digTroubleshootIssue DNS queries and display response sections, flags, timing and selected resolver behavior.
Use when: Primary lookup intent: troubleshoot. Use dig when the lookup goal is to issue DNS queries and display response sections, flags, timing and selected resolver behavior. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: troubleshoot. Safety class: read_only. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. dig is documented as an operational lookup primitive under DNS. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Reading
/etc/resolv.confon macOS — usescutil --dnsinstead. - Forgetting that VPN clients add their own resolvers and routes.
ifconfig en0— addressnetstat -rn | grep default— default gatewayscutil --dns— DNS resolversnetworksetup -getinfo Wi-Fi— service config
ReferenceHow it works1 section · depth on demand
What to read
On macOS, ipconfig getifaddr en0 gives the address, netstat -rn the routing table (look for default), and scutil --dns the resolvers actually in use, including VPN-specific ones. A 169.254.x.x address means DHCP failed.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Verifying IP on macOS
On a Mac, IP settings are in System Settings. Apple's guide shows the path: System Settings > Network, select the connection, click Details, then TCP/IP; there, Configure IPv4 can be set to Using DHCP (automatic) or Manually (enter the address, subnet mask and router given by the administrator), DNS servers are added under DNS, and Configure IPv6 offers a manual option.
Where to look (Apple)
| Setting | Location |
|---|---|
| IPv4 method, address, mask, router | Network > connection > Details > TCP/IP |
| DNS servers | Details > DNS |
| IPv6 configuration | Details > TCP/IP > Configure IPv6 |
Terminal commands
| Task | Command |
|---|---|
| Interfaces and addresses | ifconfig en0, ipconfig getifaddr en0 |
| DHCP lease details | ipconfig getpacket en0 |
| Routes | netstat -rn -f inet, route get <dst> |
| DNS configuration | scutil --dns |
| Name lookup | dscacheutil -q host -a name <name>, dig |
| Network services | networksetup -listallnetworkservices |
| Renew DHCP | sudo ipconfig set en0 DHCP |
mac$ ipconfig getifaddr en0
10.110.0.71
mac$ ipconfig getpacket en0 | grep -E "yiaddr|router|domain_name_server|lease_time"
yiaddr = 10.110.0.71
router (ip_mult): {10.110.0.1}
domain_name_server (ip_mult): {10.20.0.53, 10.20.0.54}
lease_time (uint32): 0x7080
mac$ route get 10.30.0.15 | grep -E "gateway|interface"
gateway: 10.110.0.1
interface: en0
mac$ scutil --dns | grep nameserver | head -2
nameserver[0] : 10.20.0.53
nameserver[1] : 10.20.0.54
mac$ sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Common findings
| Observation | Meaning |
|---|---|
| Self-assigned IP (169.254.x.x) | No DHCP answer |
| Wi-Fi with "Private Wi-Fi address" | MAC randomisation; may affect MAC-based policies |
VPN-pushed DNS first in scutil --dns | Split DNS from a VPN profile |
| Correct IP, failing names | Resolver order or VPN DNS settings |
Network service order (System Settings > Network, "Set Service Order") decides which interface is used first when both Wi-Fi and Ethernet are connected.
Documented example, not captured output.
Quick reference
macOS combines BSD tools with its own configuration framework. Interfaces are named en0, en1 and so on, DHCP lease details are available through ipconfig getpacket, and DNS resolution is managed per interface and per domain, which is why scutil --dns is the reliable view when VPN clients add their own resolvers.
macOS client verification:
ifconfig en0 | grep -E 'inet |inet6 '
ipconfig getifaddr en0; ipconfig getpacket en0 # DHCP lease details
netstat -rn -f inet | head
scutil --dns | head -30
networksetup -getinfo Wi-Fi
route -n get 8.8.8.8
sudo killall -HUP mDNSResponder # flush DNS cache
macOS uses per-interface and per-domain resolvers (VPN split DNS shows as additional resolvers in scutil --dns).
ReferenceConfiguration & state1 section · depth on demand
Commands
ifconfig en0 # address (or: ipconfig getifaddr en0)
networksetup -getinfo "Wi-Fi" # address, mask, router, DHCP or manual
netstat -rn -f inet | grep default # default gateway
scutil --dns | grep nameserver # DNS servers in use
ping -c 3 <gateway> ; dscacheutil -q host -a name example.com
macOS caches DNS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. VPN clients and profiles can add their own DNS resolvers per domain (shown by scutil --dns).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Fundamentals → Client IP Verification → macOS. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%