Subject: Re: Forcing an ARP flush from NetBSD box
To: Paul Hoffman <phoffman@proper.com>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 02/24/2000 00:35:45
At 04:02 PM 2/23/00 -0800, Paul Hoffman wrote:
>Thanks for the previous help, but I just realized this doesn't answer all 
>my problems. Specifically, the system is multi-homed (using 
>/etc/ifaliases). I would need to ping using each address as the source 
>address of each ping. But I don't see a way in 'ping' to do this. Am I 
>missing a ping option, or is there some other command I use to change the 
>source address for ping?
>

I just checked and, just as it does when I ifconfig the primary address of
the interface, when I do:

	ifconfig tlp0 alias 10.0.20.244

I see the following packet go out the tlp0 interface of my machine:

    00:26:46.202922 arp who-has 10.0.20.244 tell 10.0.20.244

This *should* be sufficient to get the proper arp entry in the other
machines on the network. In other words, since NetBSD is sending out a
self-referential arp request for every alias on every interface as it is
ifconfiged up, you shouldn't have to do anything - it should "Just Work"(tm).

Unfortunately I can't test if the other machines actually pay attention to
these arp packets, since I don't have enough machines (and definitely not
of the same types you'll have to deal with in your colo setting), but if
everyone plays by the rules it should work.

If you *really* feel the need to do pings too, you can force the source
address of the ping like this:

	ping -I 10.0.20.244 10.0.20.1

(This sets the source address of the ping packet to 10.0.20.244, and
destination to 10.0.20.1).