From owner-freebsd-stable Thu Oct 10 13:30:36 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1684237B401 for ; Thu, 10 Oct 2002 13:30:35 -0700 (PDT) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 470E443EC5 for ; Thu, 10 Oct 2002 13:30:34 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 748202C3DA; Thu, 10 Oct 2002 22:30:32 +0200 (CEST) Date: Thu, 10 Oct 2002 22:30:32 +0200 From: Thomas Quinot To: Andy Sparrow Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Setup routing entry for host with a non-local IP address Message-ID: <20021010203032.GA73545@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20021009151733.GA15162@melusine.cuivre.fr.eu.org> <20021009221737.0A7AA2A7@CRWdog.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021009221737.0A7AA2A7@CRWdog.demon.co.uk> User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le 2002-10-10, Andy Sparrow écrivait : > > Suppose that on a 4.6.2 machine (hostA), I have an interface xl0 > > with address 10.10.1.2, netmask 255.255.255.0. > > > > On that ethernet, I have a host (hostB) that is set up as 10.10.0.1, > > netmask 255.255.255.0. I need to send a packet from hostA to hostB, > > and to that effect I would like to set up a static route on hostA > > indicating that 10.10.0.1 lives on its xl0 interface. > > This can't work, not as described. I know this is impossible. This does not mean that I should not do it. With a bit of experimentation, I finally found out that I did not even have to patch route(8). The solution was: route add -host hostB -link xl0: -interface I was even able to have the kernel do ARP for me: route add -host hostB -link xl0: -interface -expire 1 > Layer 3 routing only cares about networks, not hosts. A host is just a kind of very small network. Thanks to all who responded, Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message