Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2001 18:08:59 +0300
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        Joshua Goodall <joshua@roughtrade.net>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Gratuitous ARP
Message-ID:  <20010828180859.B39758@sunbay.com>
In-Reply-To: <Pine.LNX.4.33.0108281343220.23691-100000@elm.phenome.org>; from joshua@roughtrade.net on Tue, Aug 28, 2001 at 01:47:20PM %2B0100
References:  <Pine.LNX.4.33.0108281343220.23691-100000@elm.phenome.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 28, 2001 at 01:47:20PM +0100, Joshua Goodall wrote:
> 
> Easy question time, but I can't find it documented. How can I reliably
> (and non-destructively) trigger the sending of a single gratuitous ARP
> reply for some local IP/MAC address?
> 
Under "local", do you mean the IP assigned to one of the local host's
interfaces?  If so, that could be done with ifconfig(8), though a bit
tricky.

For example, let assume that 192.168.0.1 is the address assigned to the
if0 interface with the standard Class C netmask of 255.255.255.0.  Then,
if you run `ifconfig if0 192.168.0.1', that will cause the gratuitous
ARP to be sent out, but that will delete and re-add the 192.168.0.1
address to the if0 interface blowing up any routes that used this
address, probably the `default' route.

The magic here is to use the `netmask' and `alias' keywords.  That is,
`ifconfig if0 192.168.0.1 netmask 255.255.255.0 alias' will achieve the
desired effect.  You can omit the address part (192.168.0.1) and the
`alias' keyword, if the 192.168.0.1 is the only address bound to the
if0 interface, like this: `ifconfig if0 netmask 255.255.255.0'.


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010828180859.B39758>