About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
Wi-Fi connected means the laptop joined the wireless network. It does not mean DHCP delivered a usable router or a usable DNS server. RFC 2131 says DHCP "provides configuration parameters to Internet hosts" and that servers "allocate network addresses and deliver configuration parameters to dynamically configured hosts." Test the router and the DNS server separately before you restart anything.
Apple describes the same split: the Mac "must first be connected to a Wi-Fi network, and that network must allow your Mac to connect to the internet."
What the two settings do
RFC 2132 section 3.5, the router option, "specifies a list of IP addresses for routers on the client's subnet. Routers SHOULD be listed in order of preference." The code is 3. That first address is the gateway for anything not on the local subnet. Without it, the laptop can stay associated and still have no internet.
Section 3.8, the domain name server option, "specifies a list of Domain Name System (STD 13, RFC 1035 [8]) name servers available to the client." The code is 6. A working gateway with a silent DNS server opens no site by name. A working DNS server that is not on the local link still needs the gateway.
RFC 3927 describes how a host "may automatically configure an interface with an IPv4 address in the 169.254/16 prefix". An address in that prefix is a different fault. The case here is an associated client whose router, DNS, or both are unusable.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| Router (option 3) missing or unreachable | Off-subnet addresses do not answer | scutil -r reports Not Reachable |
| DNS (option 6) does not answer | Names fail | dig exit code 9, "No reply from server" |
| The Mac is not using the office DNS servers | Public and internal names disagree | scutil --dns |
| VPN or security software | The failure started with that install | Apple: it "could be affecting access to the internet" |
Prove the cause before changing anything
Save the output in a dated note before any later change.
1. Read DNS.
scutil --dns
The manual says --dns "reports the current DNS configuration." The first listed resolver(5) configuration "is considered to be the "default" configuration." Later ones are supplemental. The server addresses in the report are what the Mac will query. They should be the office servers from DHCP option 6.
2. Ask one of those servers.
dig @192.0.2.53 example.com
Replace 192.0.2.53 with an address from the report. @server is "the name or IP address of the name server to query." Use the address so the test does not need DNS to find DNS. Exit code 9 means "No reply from server". Exit code 0 means "DNS response received, including NXDOMAIN status", so read the reply.
3. Test the gateway. Get the router address from the administrator (option 3). Then:
scutil -r 192.0.2.1
Replace 192.0.2.1 with that router. -r checks reachability. "Not Reachable" means it "cannot be reached using the current network configuration." A result described as traffic that "will not go through a gateway but is routed directly" means the address is on-link. Not Reachable, while Wi-Fi still shows connected, means the association and the gateway are different faults.
4. Dig again with no @server. The dig manual says that with no server argument, "dig consults /etc/resolv.conf". Compare those servers with the ones in scutil --dns. If step 2 works and plain dig example.com fails, the servers in /etc/resolv.conf are not the server you just proved.
Fix
Renew DHCP
This section applies when the router or DNS address is missing or is not the office value, and DHCP is supposed to provide both.
To save the current settings first, and to show the exact lease you are about to replace, run these two commands. scutil --dns writes the DNS report to a file, and -getinfo prints "the IP address, subnet mask, router, and hardware address" of the service, according to SS64's networksetup reference.
scutil --dns > dns-before.txt
networksetup -getinfo "<Wi-Fi service name>" > network-before.txt
Disruptive step: the next step renews the Wi-Fi lease, and the Mac may receive a different address. Apple's Wi-Fi page says that if the lease expired and the address is already in use by another device, "your Mac is assigned a new address."
Apple menu, System Settings, Network, the Wi-Fi service, Details, TCP/IP, Renew DHCP Lease, OK.
To undo it: a renewed lease cannot be put back, and the saved files only show what it was. If network-before.txt shows a manual address (set by an administrator), set it again with the command below, using the saved figures. If it shows DHCP, nothing needs restoring.
networksetup -setmanual "<Wi-Fi service name>" <saved ip> <saved mask> <saved router>
Replace a manual address with DHCP
-listallnetworkservices "Displays a list of all the network services on the computer’s hardware ports." An asterisk means disabled. Use the Wi-Fi service name from the list, in quotes, in every command in this section.
networksetup -listallnetworkservices
To save the current settings first, run the command below. It writes to a different file from the renew section, so the earlier save is not overwritten. SS64's networksetup reference says -getinfo displays "the IP address, subnet mask, router, and hardware address" for the service.
networksetup -getinfo "<Wi-Fi service name>" > network-before-dhcp.txt
Risk: the next command switches the Wi-Fi service to DHCP and drops a manual IP address, mask and router. The Apple guide says -setdhcp "Sets the TCP/IP configuration for the specified network service to use DHCP".
networksetup -setdhcp "<Wi-Fi service name>"
To undo it: set the manual values saved in network-before-dhcp.txt again.
networksetup -setmanual "<Wi-Fi service name>" <saved ip> <saved mask> <saved router>
Replace the DNS server list
To save the current list first, run the command below. SS64's networksetup reference says -getdnsservers displays "DNS info" for the service.
networksetup -getdnsservers "<Wi-Fi service name>" > dns-list-before.txt
Risk: the next command replaces the DNS server list of the Wi-Fi service. A wrong list breaks every name lookup on that service.
networksetup -setdnsservers "<Wi-Fi service name>" <dns server 1> <dns server 2>
To undo it: run the same command with the addresses saved in dns-list-before.txt. If that file shows no servers were set, type empty in place of the server names, which clears the list.
Restarting the office router
You already have the router address from step 3 of the checks above. Apple says it can help to "simply restart the router" if you manage it.
Disruptive step: the next step restarts that office router. Every device on it drops until it finishes starting. Do not change its DHCP pool or firmware. Renewing one laptop does not repair a router that scutil -r reports as Not Reachable.
Restart the router, then wait until it finishes starting.
To back out: turn the router back on if it stays off.
Confirm the fix
scutil -ron the router is no longer Not Reachable.digat the office DNS address returns a normal answer, not NXDOMAIN, and not code 9.scutil --dnslists those servers in the default configuration.- A website opens. An internal name that still fails may be a search-domain problem or a missing record on the DNS server; Apple's pages do not say which.
What to watch afterwards
- A manual DNS list overrides option 6 until you clear it with
empty. - A renewed lease can come with a different address, so sessions bound to the old address may need to be opened again.
- A 169.254 address is a different fault from this one; RFC 3927 describes it as a link-local address.
Read next
Related articles you may want next.
- TroubleshootingDHCP scope full: clients get 169.254 addresses. Find what took the leasesNew devices get a 169.254 address while older ones keep working. Check the scope's usage, find declined (BAD_ADDRESS) leases and unexcluded static addresses, and fix the range, lease time or failover split on a Windows DHCP server.Read article
- TroubleshootingMac shows a 169.254 address: there is no usable DHCP leaseA Mac has a 169.254 address and no office connectivity. That prefix is IPv4 link-local from RFC 3927. Renew DHCP, and put a manual address back only from values you saved.Read article
- TroubleshootingMac on Wi-Fi cannot resolve an internal office hostnameA Mac on Wi-Fi cannot resolve an internal name. Read scutil --dns, compare the short name with the full name, and set the search domain only after you save the current DNS report.Read article
Risks and limits
scutilandnetworksetupare the Mac commands. RFC 2132's option 3 and option 6 are the same facts on any DHCP client.- The scutil manual page is dated 23 January 2008. The flags here are the ones it documents.
- dig's code 0 includes NXDOMAIN. Read the status line.
- Restarting a shared router is an office-wide outage.
Sources
- RFC 2131: Dynamic Host Configuration Protocol — IETF, March 1997, accessed 22 November 2026
- RFC 2132: DHCP Options and BOOTP Vendor Extensions — IETF, March 1997, accessed 22 November 2026
- scutil(8) — Apple, source file at tag configd-963.50.8, man page date 23 January 2008, accessed 22 November 2026
- About networksetup in Remote Desktop — Apple, no date shown, accessed 22 November 2026
- If your Mac isn't connecting to the internet over Wi-Fi — Apple, published 10 March 2025, accessed 22 November 2026
- Renew your IP address from the DHCP server on Mac — Apple, no date shown, accessed 22 November 2026
- RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses — IETF, May 2005, accessed 22 November 2026
- networksetup command reference — SS64, no date shown, accessed 22 November 2026
- BIND 9 manual pages: dig — ISC, version 9.20.9, no date shown, accessed 22 November 2026
This article was originally published on .