From owner-freebsd-stable Fri Dec 14 9:43:57 2001 Delivered-To: freebsd-stable@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 5AC7937B617 for ; Fri, 14 Dec 2001 09:43:44 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBEHhTc15593; Fri, 14 Dec 2001 19:43:29 +0200 (EET) (envelope-from ru) Date: Fri, 14 Dec 2001 19:43:29 +0200 From: Ruslan Ermilov To: Qing Cc: freebsd-stable@FreeBSD.ORG Subject: Re: route Message-ID: <20011214194329.B13364@sunbay.com> References: <200112141722.fBEHMDq31522@spidey.speakeasy.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <200112141722.fBEHMDq31522@spidey.speakeasy.net> User-Agent: Mutt/1.3.23i 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 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 14, 2001 at 09:22:13AM -0800, Qing wrote: > > Where can I get some examples and explanation on how > routes with indirect gateway work? > > I searched into the mailling list archive and didn't > find much there. > If the indirect route points to an Ethernet device, this will almost always result in a "can't allocate llinfo, host is not on local network" error from arp(4). That's the main reason I wanted to disable this feature. The most typical use of indirect routes (I think) is with P2P interfaces. What's important in a route through a P2P interface is the interface itself, not the gateway used, and people install a so-called "policy routes" using this feature. Please find attached a reply from Wes Peters I got when I offered to remove this feature. Search the ML archives for a complete thread. 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 --NzB8fVQJ5HfG6fxh Content-Type: message/rfc822 Content-Disposition: inline Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by whale.sunbay.crimea.ua (8.11.2/8.11.2) with ESMTP id f2LHi3801800 for ; Wed, 21 Mar 2001 19:44:05 +0200 (EET) (envelope-from wes@softweyr.com) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 47CC555BF0 for ; Wed, 21 Mar 2001 09:41:10 -0800 (PST) (envelope-from wes@softweyr.com) Received: by hub.freebsd.org (Postfix) id 9D83A37B739; Wed, 21 Mar 2001 09:43:56 -0800 (PST) Delivered-To: ru@freebsd.org Received: from homer.softweyr.com (bsdconspiracy.net [208.187.122.220]) by hub.freebsd.org (Postfix) with ESMTP id 5FD1637B719; Wed, 21 Mar 2001 09:43:52 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [127.0.0.1] (helo=softweyr.com ident=bc8ebe9722aec4a835b4a4aa3e68a996) by homer.softweyr.com with esmtp (Exim 3.16 #1) id 14fmcM-0000fz-00; Wed, 21 Mar 2001 10:41:54 -0700 Sender: wes@FreeBSD.ORG Message-ID: <3AB8E7E2.36F360AA@softweyr.com> Date: Wed, 21 Mar 2001 10:41:54 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Ruslan Ermilov Cc: Garrett Wollman , net@FreeBSD.ORG Subject: Re: Indirect routes with indirect gateways, bugfix References: <20010321133611.A62997@sunbay.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ruslan Ermilov wrote: > > Hi! > > The routing code (bogusly?) allows to add an indirect route with > also indirect gateway. This results in some nasty bugs: > > : Script started on Wed Mar 21 13:17:47 2001 > : > : freebsd# netstat -rn > : Routing tables > : > : Internet: > : Destination Gateway Flags Refs Use Netif Expire > : 127.0.0.1 127.0.0.1 UH 0 0 lo0 > : 192.168.1 link#1 UC 0 0 rl0 => > : > : freebsd# route add -net 10 1.2.3.4 > : route: writing to routing socket: Network is unreachable > : add net 10: gateway 1.2.3.4: Network is unreachable > : > : freebsd# route add default 192.168.1.1 > : add net default: gateway 192.168.1.1 > : > : freebsd# route add -net 10 1.2.3.4 > : add net 10: gateway 1.2.3.4 > : > : freebsd# ping -c1 10.0.0.1 > : PING 10.0.0.1 (10.0.0.1): 56 data bytes > : > : --- 10.0.0.1 ping statistics --- > : 1 packets transmitted, 0 packets received, 100% packet loss > : > : freebsd# dmesg | tail -2 > : arplookup 1.2.3.4 failed: host is not on local network > : arpresolve: can't allocate llinfo for 1.2.3.4rt > : freebsd# > : > : Script done on Wed Mar 21 13:19:00 2001 > > I have searched the CSRG SCCS logs, and found that the relevant code > was added in route.c, version 7.22 (well, 7.22 is actually a part of > 7.23 that went into Net/2 release). I have marked the relevant text > from the commit log with circumflexes: > > [...] > > Unless someone has a good motivation for not doing this, I am going > to commit the attached patch that disallows indirect routes with > indirect gateways. This allows a crude sort of "policy routing", if that is of any value. I don't see what it hurts, or any reason to remove it. A misconfigured routing table is a system administration problem, not a code problem. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ --NzB8fVQJ5HfG6fxh-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message