Subject: Re: Forcing an ARP flush from NetBSD box
To: Wolfgang Rupprecht <wolfgang@wsrcc.com>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 02/19/2000 13:06:01
At 11:10 PM 2/18/00 -0800, Wolfgang Rupprecht wrote:
>
>lainestump@rcn.com (Laine Stump) writes:
>> Actually, now that you mention it, I recalled noticing that when I boot a
>> machine, it sends out an ARP request for its own IP:
>> 01:45:16.464695 0:40:5:a3:a0:26 ff:ff:ff:ff:ff:ff 
>>                 0806 60: arp who-has 10.0.20.129 tell 10.0.20.129
>> That should accomplish the same thing, shouldn't it? If so, the "program"
>> you're looking for is something already done by a machine when it boots
>> anyway.
>
>Yup. You managed to capture what is called "a gratuitous arp".  Did
>you see that on a netbsd machine???  I just rebooted a -current
>machine and failed to see such an arp.

Interesting. To verify, I tried it last night on my laptop disk , which has
mid-December -current, and saw the self-ARP as soon as the interface was
ifconfig'ed up.

>>  It is done exactly for the
>reason you say, to let other machines know that one just appeared on
>the scene and to flush any stale state out of other machines' arp
>cache.  

It appears to do that and nothing more, at least when the remote is a
NetBSD machine - if the other machine has no arp entry, the request is
ignored, but if it has one, it is replaced. And that makes perfect sense
(since we're only worried if there's an incorrect entry, not if there isn't
any at all).