Delete ARP cache on Mac OS when moving from one Wifi network to the other
- by Puneet
I am facing wireless connectivity problems when I move from one Wifi network to the other. Here is how it happens:
I am at my friends place. I connect to his Wifi. His Wifi router ip address is 192.168.0.1. Everything is fine
I close my laptop, come back to my house, open my laptop and I connect to the Wifi Network at my place. Different ESSID, but the Wifi router address is the same 192.168.0.1. At this point I cant get to anything on the internet.
To debug I try to see if I can ping the router (192.168.0.1), I cant. I get a no route to host. Meanwhile airport tells me Im connected to Wifi.
I see the arp cache and I see a permanent entry for 192.168.0.1
? (192.168.0.1) at 5c:d9:98:65:73:6c on en1 permanent [ethernet]
This permanent bit looks problematic. I go ahead and delete the arp cache entry and all is fine with the world until I go back to my friends place where the same situation plays out.
Now my question is, why the hell is this happening? If there is no way around it, can I run a script on Wifi connect/disconnect to clear out the arp cache?
Im using Mac OS X
$uname -a
Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386