From owner-freebsd-questions@FreeBSD.ORG Wed Oct 19 11:29:16 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45D2416A41F for ; Wed, 19 Oct 2005 11:29:16 +0000 (GMT) (envelope-from bhepple@freeshell.org) Received: from mail23.syd.optusnet.com.au (mail23.syd.optusnet.com.au [211.29.133.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91C2D43D45 for ; Wed, 19 Oct 2005 11:29:15 +0000 (GMT) (envelope-from bhepple@freeshell.org) Received: from raita.finder.com.au (c210-49-134-123.rochd1.qld.optusnet.com.au [210.49.134.123]) by mail23.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j9JBTBJM006541 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 19 Oct 2005 21:29:12 +1000 Received: from raita.finder.com.au (localhost.localdomain [127.0.0.1]) by raita.finder.com.au (8.13.4/8.13.4) with SMTP id j9JBTCBV021419 for ; Wed, 19 Oct 2005 21:29:12 +1000 Date: Wed, 19 Oct 2005 21:29:11 +1000 From: Bob Hepple To: freebsd-questions@freebsd.org Message-Id: <20051019212911.657cc7e1.bhepple@freeshell.org> In-Reply-To: <4355B4E6.3060902@mrburak.net> References: <20051015092747.008bf142.bhepple@freeshell.org> <43507EB9.306@cs.tu-berlin.de> <20051015161054.37d56e8b.bhepple@freeshell.org> <43532C17.6020807@mrburak.net> <20051018034758.7d76401e.bhepple@freeshell.org> <4355B4E6.3060902@mrburak.net> X-Mailer: Sylpheed version 2.0.1 (GTK+ 2.6.8; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: FreeBSD routing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 11:29:16 -0000 On Wed, 19 Oct 2005 12:52:22 +1000 Richard Burakowski wrote: > Bob Hepple wrote: > > >Well, it has to be taught ... eg with a FreeBSD 2.214 I can do this: > >route delete default > >route add -net 192.168.254.0 -interface xl0 # !!! > >route add default 192.168.254.245 > >cp /etc/resolv.conf.home /etc/resolv.conf > > > > > well, my turn ... > > from the man page: > If the destination is directly reachable via an interface requiring no > intermediary system to act as a gateway, the -interface modifier should > be specified; the gateway given is the address of this host on the > common > network, indicating the interface to be used for transmission. > > what i've now come to understand hinges on the phrase "address of this > host on the common network, indicating the interface to be used for > transmission.". note this is not *the* interface. for ethernet, it's > the local interface and the destination's mac address. the format of > this address is partly described in link_addr(3). > > route add 192.168.2.214/32 -link -interface rl0:x:x:x:x:x:x > > if you want the kernel to use arp to find the mac address, you > specifically have to tell it to: > > route add 192.168.2.214/32 -interface rl0 -cloning > > a giveaway should have been the duplicate mac addresses in your routing > tables which we all missed. > Richard, Hmmm - that works! Thanks very much ... ... but given that solution, I would have thought that route add -host 192.168.2.214 -interface rl0 -cloning would also work, but it doesn't. Back to the man pages for me!! Interesting how seemingly similar but subtly different FreeBSD can be, at least in this example. I wonder which behaviour of "route", FreeBSD or Linux, is more strictly correct, if there such a thing as a correct behaviour - without starting a trawl, of course! Thanks again! Bob -- Bob Hepple mailto:bhepple@freeshell.org http://bhepple.freeshell.org Public Key: http://bhepple.freeshell.org/public_keys.txt