I have a macbook pro 15", late 2013 with Catalina (10.15.4). It was working flawlessly until few hours ago, now internet won't work. I can't find any trace of hardware issue, the wifi card works fine and it connects to wifi networks. Unfortunately even with full signal internet doesn't work, even pinging from the terminal return the "unknown host" error. I don't have the ethernet adapter so I can't test it.

I tried different wifi networks, I tried forgetting the networking and connecting to it again, I have tried the wireless diagnostic, rebooting the laptop...no results so far...is there something else I can do?

EDIT: to add some context, I know that the wifi is working fine because two other computers and the phone have internet access via the same wifi network

EDIT: output of the command ipconfig getpacket en0 | grep "yiaddr\|router":

yiaddr =
router (ip_mult): {}

EDIT: result of the various pings:


PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time 1.891ms

it seems to work, same thing for ping

PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time 9.997ms

sadly, ping www.google.com still results in ping: cannot resolve www.google.com: Unknown host

  • Connecting to a network and having Internet access are different things, but not mutually exclusive. You can have network connectivity and no Internet, but you can’t have Internet without network. So, how did you determine WiFi is working properly? What’s your IP address and your default gateway? – Allan Jun 2 at 2:13
  • Try issuing this command ipconfig getpacket en0 | grep "yiaddr\|router" in Terminal. Post the output to your question. Change en0 to your specific adapter. – Allan Jun 2 at 2:20
  • Ok. First, when you make an edit, @ me in comments so I get notified. I just stumbled over this update by chance. Next, try pinging the router - ping If that works, try pinging Google’s DNS server - ping If that works, try ping www.google.com Post results – Allan Jun 2 at 8:49
  • @Allan I have updated the question! – ste Jun 2 at 11:32
  • It’s a DNS issue. The fact that your machine can get out of your network and reach one of Google’s servers by IP, means the Internet works. Using the ipconfig command from above change the grep portion to look like this grep “domain_name_server”. Post the output – Allan Jun 2 at 13:04

Thanks to Allan I found the answer. I had to change my dns with the following command:

networksetup -setdnsservers Wi-Fi

after that internet was back!

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .