Date: Wed, 19 Oct 2005 21:29:11 +1000 From: Bob Hepple <bhepple@freeshell.org> To: freebsd-questions@freebsd.org Subject: Re: FreeBSD routing 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Oct 2005 12:52:22 +1000 Richard Burakowski <richard.burakowski@mrburak.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051019212911.657cc7e1.bhepple>