Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

macOS

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

When to use this

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.

First 30 seconds

1. Verify macOS client IP config.

2. Self-assigned 169.254 means DHCP failed.

3. Check gateway and DNS.

4. Test ping and name resolution.

5. Renew DHCP via System Settings or ipconfig set en0 DHCP.

Operational verification

address → gateway → ARP → remote IP → DNS

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · macOS · Windows / PowerShell
Key commandifconfig
Scope / prerequisiteUse this on a macOS client to read addressing with ifconfig or networksetup -getinfo, the default route with netstat -r…
Troubleshoot · 3Reference · 4
What next?3 suggested next steps
Catalog command links7
Evidence0
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

tracerouteTroubleshoot
traceroute

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

Linux · data plane
digTroubleshoot
dig

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

Linux · control plane
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Reading /etc/resolv.conf on macOS — use scutil --dns instead.
  • Forgetting that VPN clients add their own resolvers and routes.
Command lookup Jump straight to Cisco syntax
Key checks
  • ifconfig en0 — address
  • netstat -rn | grep default — default gateway
  • scutil --dns — DNS resolvers
  • networksetup -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)

SettingLocation
IPv4 method, address, mask, routerNetwork > connection > Details > TCP/IP
DNS serversDetails > DNS
IPv6 configurationDetails > TCP/IP > Configure IPv6

Terminal commands

TaskCommand
Interfaces and addressesifconfig en0, ipconfig getifaddr en0
DHCP lease detailsipconfig getpacket en0
Routesnetstat -rn -f inet, route get <dst>
DNS configurationscutil --dns
Name lookupdscacheutil -q host -a name <name>, dig
Network servicesnetworksetup -listallnetworkservices
Renew DHCPsudo 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

ObservationMeaning
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 --dnsSplit DNS from a VPN profile
Correct IP, failing namesResolver 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Confirmation

Confirm action

Continue?