Let me preface this by saying that I am relatively new to networking so please forgive my ignorance and correct any errors in my thinking, gaps in my knowledge, or incorrect assumptions.
I'm experimenting with setting static arp cache entries on Linux and using tcpdump/Wireshark to monitor the traffic and have noticed something strange. Normally, when I create an entry for a given IP address and then ping that IP, I don't see any outgoing ARP requests, which I expect is because the MAC address is being determined from my local cache.
However this is not true for the IP address of the gateway. Specifically, when I create an ARP entry for the IP address of the gateway/router, and then join the network, I see outgoing arp requests from my machine inquiring about the MAC address of the gateway. It's like my ARP cache is being ignored/bypassed. Why is this? Or am I not understanding something?
The command I have used to create ARP entries is:
sudo arp -s 10.0.0.2 00:0c:29:c0:94:bf
I have also tried
sudo ip n replace dev wlan0 to 10.0.0.2 lladdrr 00:0c:29:c0:94:bf
UPDATE: I am also seeing this behavior on OSX. The command I am using there to create new arp entries is:
sudo arp -S 10.0.0.2 00:0c:29:c0:94:bf ifscope en0
ip neigh
?