From owner-freebsd-stable Wed Oct 9 15:12:38 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 6787137B401 for ; Wed, 9 Oct 2002 15:12:35 -0700 (PDT) Received: from clover.kientzle.com (user-112uh9a.biz.mindspring.com [66.47.69.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5A7043E42 for ; Wed, 9 Oct 2002 15:12:34 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org (c43 [66.47.69.43]) by clover.kientzle.com (8.11.3/8.11.3) with ESMTP id g99MCWE35652; Wed, 9 Oct 2002 15:12:33 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3DA4A9D0.6090603@acm.org> Date: Wed, 09 Oct 2002 15:12:32 -0700 From: Tim Kientzle Reply-To: kientzle@acm.org User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stable@FreeBSD.ORG, Thomas Quinot Subject: Re: Setup routing entry for host with a non-local IP address References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 I can think of two solutions: 1) dual-home hostA On hostA: ifconfig xl0 alias
netmask 255.255.255.0 In this way, hostA will have an address on both networks and can communicate on either one. HostB can then use an address on its local network without problem. 2) Change the netmask on hostB to 255.255.0.0 Now hostB thinks hostA is on the same network. Tim Kientzle > Date: Wed, 9 Oct 2002 17:17:33 +0200 > From: Thomas Quinot > Subject: Setup routing entry for host with a non-local IP address > > 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. > > I tried: > 1. route add 10.10.0.1 10.10.1.2 -interface > > -> arplookup 10.10.0.1 failed: could not allocate llinfo > arpresolve: can't allocate llinfo for 10.10.0.1rt > > 2. route add 10.10.0.1 -link xl0 -interface > > Interesting netstat -rn output: > 10.10.0.1 78.6c.30.0.0.0.0.0.e.fa.ce UHLS 0 0 xl0 > > but does not work (gets wrong ARP entry: > ? (10.10.0.1) at 78:6c:30:00:00:00 on xl0 permanent [ethernet]) > > 3. route add 10.10.0.1 -link hostB-MAC-address -interface > > Fails with 'add host 10.10.0.1: gateway 1:2:3:4:5:6: Network is unreachable' > > Am I trying to do something impossible, or am I just clueless enough > that I did not find the proper way of cajoling the kernel into > cooperation? > > 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