From owner-freebsd-net Tue Aug 28 8: 9:40 2001 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 5227037B406 for ; Tue, 28 Aug 2001 08:09:34 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f7SF8xK47918; Tue, 28 Aug 2001 18:08:59 +0300 (EEST) (envelope-from ru) Date: Tue, 28 Aug 2001 18:08:59 +0300 From: Ruslan Ermilov To: Joshua Goodall Cc: freebsd-net@FreeBSD.ORG Subject: Re: Gratuitous ARP Message-ID: <20010828180859.B39758@sunbay.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from joshua@roughtrade.net on Tue, Aug 28, 2001 at 01:47:20PM +0100 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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