OpenWrt Forum Archive

Topic: clearing arp cache

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How do I clear the arp cache? It doesn't seem as if there is an arp utility. Arping doesn't seem to have that ability either.

The problem is I'm roaming between two identically configured AP's and I'm using static IP's. The two AP's are running stock firmware with wpa enabled and identical ssids. They are not within range of eachother. The client in this case is a linksys wrt54g running openwrt in client mode. When I get in range of the second IP, (and I'm out of range of the first), WPA correctly authenticates and associates with the new bssid. I'm assuming this is all happening at layer 2. Then when I try and ping the AP #2, I don't get any replies. If however I reboot the client, everything works perfectly. When I was using dhcp the roaming worked, but I can't afford the overhead of dhcp so I switched to static IP's. When I did this, all of the sudden the roaming stopped working. This makes me believe the arp cache is not being updated. I just had this thought now and haven't had a chance to reproduce the results and check the arp cache. I'll do that now and post the results. Knowing how to clear the arp cache would be useful in any case. Thanks for any help.

Update:

Tested my hypothesis and the arp cache is indeed the problem. I have installed ip and I will be trying this:  ip neigh flush dev eth1. (eth1 being my wireless interface.)

The method above doesn't seem to do anything - the results from cat /proc/net/arp are the same before and after executing the command. What did work is dowing `ifdown eth1` then `ifup eth1` - but that took a second or two to work, and ideally I need something faster than that.

(Last edited by seanf on 22 Jul 2005, 02:31)

Deleteing entries in the arp table is done via:

Under *nix OS:

# arp -d hostname

Under Windows OS:

C:\> arp -d *

OpenWRT doesn't seem to have an arp utility. arp just seems to be the same as cat /proc/net/arp.

The discussion might have continued from here.