Strange network problems on OS X

14

8

The strange problems I am having occurred 3 times now with a little over 1 month in between. Suddenly I am losing the ability to do some network related activities, but not all.

When it happens, these still work:

  • Resolve domain names using eg ping / dig
  • Skype
  • Fantastical (with google calendar sync)
  • SSH connections are not disconnected, but I can not create new ones
  • I can ping, and get responses back

However, these do not work:

  • All browsers (Chrome, Firefox, Safari), won't display pages.
  • Connected web-pages that uses web-sockets or SSE are losing connections (both over http and https).
  • Curl won't grab pages.
  • Adium disconnects and won't reconnect.
  • Sonos (inside my LAN) won't work anymore.
  • Evernote stops syncing.

The output of curl trying to grab a page is showing Can't assign requested address

{ ~ }$ curl google.com
curl: (7) Failed to connect to 84.208.42.35: Can't assign requested address 

My ifconfig looks just like it should.

netstat -an doesn’t contain an overwhelming number of entries:

1 CLOSE_WAIT
1 SYN_SENT
2 CLOSED
2 FIN_WAIT_2
13 FIN_WAIT_1
16 LISTEN
212 LAST_ACK
446 ESTABLISHED

I am on a MacBook Pro early 2011 model running OS X 10.9.1 connecting over wireless. This is the only device on the network with this problem. The only thing that helps is restarting the Mac. There are really not much to see in the logs either (as I've spotted at least), only services having sudden problems connecting.

Has anyone else been having problems like this? What is the best way to troubleshoot this the next time it happens?

xeor

Posted 2014-01-15T19:48:43.113

Reputation: 336

3

what you're describing seems to be this issue perhaps; i would file a bug report with Apple.

– l'L'l – 2014-01-15T23:20:29.960

@xeor, I guess you've already updated the firmware of network devices but please confirm the version of firmware. Also, you can compare current good condition and bad condition by taking logs using Wi-Fi explore.app@appstore and wireshark. – Juza – 2014-02-23T07:22:24.860

A. Install and start arpwatch and set it to log to a file. – Sherwood Botsford – 2014-02-28T04:45:44.877

B. run netstat -nr before and during a problem session. – Sherwood Botsford – 2014-02-28T04:46:44.430

C. Has your router been pawned? – Sherwood Botsford – 2014-02-28T04:47:12.837

I would definitely follow xeor's advice here. Check up and read up on the firmware for your wifi router or AP. The latest firmware can sometimes break things -- sometimes it is necessary to roll back. This reminds me of Bonjour issues I had a long time ago. – nod – 2014-03-21T22:00:42.030

Check to see if your IP address is changing, e.g. via DHCP update. Also, you might try disconnecting all networks and reconnecting them. My guess would be that the cause is software acting like an invisible HTTP proxy on the computer failing in a creative way, but that's pure speculation. – Slartibartfast – 2014-03-26T05:25:38.217

Do you use DHCP (maybe even 2 servers)? Can you find ip-conflicts? Do you have proxies configured? – bbaassssiiee – 2014-03-26T19:53:36.940

This maybe a DNS issue. Try navigating to 74.125.225.238 (Google's IP Address) to confirm. If the page loads, this is a DNS issue. Try it and let us know. – 10100111001 – 2014-04-06T01:14:04.603

Answers

11

As l'L'l stated, this problem does seem to be described here:
https://discussions.apple.com/thread/5551686?start=45&tstart=0

A temporary solution would be to open terminal and type:

sudo ifconfig en0 down
sudo route flush
sudo ifconfig en0 up

replace en0 with whatever port you are using to connect to the internet. This command essentially resets your connection without having to reboot your computer.

Blaine

Posted 2014-01-15T19:48:43.113

Reputation: 1 477

3

The ifconfig + route flush solution by @blaine prompted me to look in netstat -nr and sure enough I had a static host route to the gateway, with a high usage count (5th column in the netstat -nr output.)

When this happens again, you might want to check if you have a route for the address prefix that you are trying to connect to, and if it exhibits the same issue. For me, I didn't have to bring down the interface; just doing a route delete <dest> <gateway> (and adding it again if necessary) worked.

Wil Tan

Posted 2014-01-15T19:48:43.113

Reputation: 141