Show IP, Router and DNS for a Network Service

Use networksetup -getinfo to print the full current configuration (IP, subnet, router, DNS) of Wi-Fi or Ethernet.

macOSnetworknetworksetupipLow risk
Run `networksetup -getinfo "Wi-Fi"` to see the IP address, subnet mask, router and DNS servers for that service.

01Command

Command
$ networksetup -getinfo "Wi-Fi"

02What it does

This one command summarizes what normally takes several System Settings panes: whether the service uses DHCP or a manual address, the current IP, subnet mask, router and configured DNS. It's the quickest sanity check when a Mac "has Wi-Fi but no internet" — you immediately see if there's no IP or a wrong router. Use the service name exactly as shown by `networksetup -listallnetworkservices`.

03Risk

RiskLow risk
RequirementsUse the exact service name from `networksetup -listallnetworkservices` (e.g. "Wi-Fi", "Ethernet").

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Network