sam.rad

Q: WiFi loses connection intermittently and clearing arp fixes it

This has been asked before many times but none of the answers worked for me so far.


I have a MacBook Pro with El Capitan on it. Every once in a while, normally 5-10 minutes,

my connection drops and I no longer can browse internet. Like:

 

4 bytes from 8.8.8.8: icmp_seq=7646 ttl=53 time=13.091 ms

64 bytes from 8.8.8.8: icmp_seq=7647 ttl=53 time=17.035 ms

64 bytes from 8.8.8.8: icmp_seq=7648 ttl=53 time=13.716 ms

Request timeout for icmp_seq 7649

Request timeout for icmp_seq 7650

Request timeout for icmp_seq 7651

Request timeout for icmp_seq 7652

Request timeout for icmp_seq 7653

Request timeout for icmp_seq 7654

 

Turning off and back on the WiFi will fix the issue but I tried to narrow down the problem

and I discovered that deleting the route's IP from arp table will also fix the connectivity

immediately:

 

$ sudo arp -d 192.168.0.1

 

Request timeout for icmp_seq 7718

Request timeout for icmp_seq 7719

Request timeout for icmp_seq 7720

64 bytes from 8.8.8.8: icmp_seq=7721 ttl=53 time=10.947 ms

64 bytes from 8.8.8.8: icmp_seq=7722 ttl=53 time=11.966 ms

64 bytes from 8.8.8.8: icmp_seq=7723 ttl=53 time=12.576 ms

64 bytes from 8.8.8.8: icmp_seq=7724 ttl=53 time=11.058 ms

64 bytes from 8.8.8.8: icmp_seq=7725 ttl=53 time=15.173 ms

 

Disabling the arp unicast DID NOT have any effect either:

 

$ sudo sysctl -w net.link.ether.inet.arp_unicast_lim=0

 

Notes:

- I have two MacBooks Pro at home. The other one works without an issue.

- My phone and other devices also work with the same router without any issue.

- The problematic MacBook works with other WiFi networks without any issue.

 

What could be the problem?

MacBook Pro with Retina display, OS X El Capitan (10.11.3)

Posted on Feb 12, 2016 1:36 PM

Close

Q: WiFi loses connection intermittently and clearing arp fixes it

  • All replies
  • Helpful answers

  • by NullrouteN,Helpful

    NullrouteN NullrouteN May 1, 2016 11:35 AM in response to sam.rad
    Level 1 (9 points)
    May 1, 2016 11:35 AM in response to sam.rad

    Yes, clear arp fixes it. Very familiar with this one.

     

    I've had this problem for 2+ years, on 2-3 MacBooks, and on Mavericks, Yosemite, and El Capitan.   I've googled it every 1-2 months for years.  I have captured packets, and tested several access-points... The best fix, so far... is clearing arp, and I've automated it for now:

     

    in terminal: 

    while true; do sudo arp -da; sleep 2; done

     

    while the window is open, every 2 seconds, my arp table gets dumped... and if I lose connectivity... the maximum outage is 1-2 seconds.

     

    I notice that in some locations, I don't have the problem.... its as if my laptop reacts poorly to certain other clients on the same WLAN.  This issue drives me nuts, and I can't imagine how this has gone un-fixed for years.  If I don't manually fix it, I end up down for 30-120 seconds every few minutes.

  • by ZenInc,

    ZenInc ZenInc May 5, 2016 6:33 AM in response to NullrouteN
    Level 1 (4 points)
    Mac OS X
    May 5, 2016 6:33 AM in response to NullrouteN

    running "while true; do sudo arp -da; sleep 30; done" in a terminal window and just keeping that going has totally fixed this issue for me.

     

    Here's my question. Is there a way to take that exact command, turn it into a script, have it run when the machine starts, and just run continuously in the background? I do stuff like this on my Windows machine all the time, but don't know how to do it on a Mac.

  • by futzle,

    futzle futzle May 23, 2016 10:34 PM in response to sam.rad
    Level 1 (4 points)
    Mac OS X
    May 23, 2016 10:34 PM in response to sam.rad

    I've had this same issue on two successive MacBooks (Retina 12", 2015 and 2016).  It only happens on one Wi-Fi network (my work), with some remote hosts on the local subnet (all Windows), with these MacBooks.  Swapping out the Wi-Fi access point, or swapping out the network switch that the access point and Windows hosts are connected to, has no effect.

     

    Clearing the ARP table immediately rectifies the dropout, for a while.  Also, putting the Wi-Fi interface (en0 on the MacBook) into monitor mode also rectifies it, permanently, until I stop the command:

    sudo tcpdump -Ini en0 > /dev/null

     

    Packet tracing with Wireshark on the MacBook shows that it is not even seeing some ARP requests from the LAN, which I can see (from another computer monitoring the Wi-Fi channel) are being sent.  That might serve to explain why it is not sending ARP replies and dropping off the network.

  • by lexicandy,

    lexicandy lexicandy May 24, 2016 5:19 AM in response to NullrouteN
    Level 1 (4 points)
    May 24, 2016 5:19 AM in response to NullrouteN

    Hallelujah. After almost a year of not being able to fix this, the above genuinely solves the problem. Thanks!

  • by Luis Sequeira1,

    Luis Sequeira1 Luis Sequeira1 May 24, 2016 5:49 AM in response to lexicandy
    Level 6 (11,889 points)
    May 24, 2016 5:49 AM in response to lexicandy

    lexicandy wrote:

     

    Hallelujah. After almost a year of not being able to fix this, the above genuinely solves the problem. Thanks!

     

    To be completely clear, this is a workaround.

    It does not solve the problem, and indeed there is no indication of what that problem might actually be.

    Clearly something goes wrong in the affected machines - most likely, caused by interference from some installed software.

    It is like restarting a machine after it crashes - it works, but gives no indication of what the cause of the crash was, and will not prevent from happening in the future.

     

    The real question is: what is different in one machine where the problem manifests itself, from a machine that does not have the problem? Only by analyzing the installed software (apps, extensions, login items, etc) can one begin to discern where the cause may be.

  • by Jason Harder,

    Jason Harder Jason Harder May 25, 2016 1:38 AM in response to sam.rad
    Level 1 (19 points)
    May 25, 2016 1:38 AM in response to sam.rad

    This is very interesting. I'm experiencing similar problems on two MBPs since … hm … 10.10 – and it seems to be more severe when both MBPs are on the same WiFi. I have to look into your proposed workaround.

     

    May it be possible that this problem is linked to AirDrop technology?

  • by chrisfromSitten,

    chrisfromSitten chrisfromSitten Jul 19, 2016 9:00 AM in response to sam.rad
    Level 1 (4 points)
    Mac OS X
    Jul 19, 2016 9:00 AM in response to sam.rad

    Same problem here on my Wifi at home. Just to share my initial troubleshooting :

    - I have 2 MBP (13'' 2015, 15'' 2013) experiencing the issue, running latest El Capitan 10.11.5

    - with a Windows 10 laptop running pings in parallel of the MBPs, I never see the issue on the PC, which seems to indicate it's really a Mac OS issue in conjunction with a network equipment (I only see this issue at home).

    - arp -ad does clear the issue

    - I feel that when I load my home router, the probability of the issue happening is higher.

    - I tried to change DNS to Google's, tried to change MTU size, tried to disaple ipv6 stuffs, nothing helps.

     

    What's weird is that it seems the DNS service goes wild, because I can access IPs directly but can't resolve hostnames. (or maybe it's just DNS that requires ARP to respond - i'm not an expert enough)

     

    I saw a post on internet talking about arp incompatibility between Cisco routers and Mac OS, but my home-entry router is Technicolor. What's true is that i have 2 Wifi running OpenWRT, maybe they are flooding my network with incomplete/faulty/inconsistent arp requests.. (??)

     

    Very annoying indeed, even though there's this arp -ad workaround.

  • by fantom_man,

    fantom_man fantom_man Aug 6, 2016 11:07 PM in response to sam.rad
    Level 1 (4 points)
    Mac OS X
    Aug 6, 2016 11:07 PM in response to sam.rad

    Exact same issue on Mac OS El Capitan v. 10.11.6

     

    My workaround used to be renewing the dhcp lease from the network settings and that would fix it too which is pretty much clearing up the arp cache as well, but now I am using the "arp -da" workaround from terminal and it is much easier. Thank you for sharing!

     

    However, it would be nice to get the issue resolved permanently.. Any luck any body?

  • by mkc007,

    mkc007 mkc007 Aug 26, 2016 1:25 PM in response to fantom_man
    Level 1 (4 points)
    Aug 26, 2016 1:25 PM in response to fantom_man

    I have the exact same issue and I am surprised to see that many of us are noticing this. I am always disabling wifi and enabling it. But this script definitely helps.

  • by fantom_man,

    fantom_man fantom_man Aug 27, 2016 8:56 AM in response to sam.rad
    Level 1 (4 points)
    Mac OS X
    Aug 27, 2016 8:56 AM in response to sam.rad

    I have finally come to a resolution to this issue and thought of sharing here for all of you who are experiencing the same intermittent connectivity issue with Wifi.

     

    Give it a shot on your MAC by following the steps below:

     

    - Go to "System Preferences" > "Network"

    - Select the Wifi Interface from the left pane.

    - Click on the "-" minus sign underneath to remove the wifi adapter.

    - Click on "Apply" and restart your computer.

    - Once rebooted, go back to Network settings and click on "+" sign to add new adapter.

    - Select WIFI from the Interface list and click on "Create".

    - Click "Apply" and at this point, WIFI should reconnect automatically.

    - Now, enjoy solid and reliable connection!

     

    I hope this will work for you and end the frustration...