From owner-freebsd-net@FreeBSD.ORG Wed Oct 24 18:56:17 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE6E16A420 for ; Wed, 24 Oct 2007 18:56:17 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id A826713C4CC for ; Wed, 24 Oct 2007 18:56:17 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (97lzvmmgdspp58jn@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l9OIuC4a095502; Wed, 24 Oct 2007 11:56:12 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l9OIuA4G095501; Wed, 24 Oct 2007 11:56:10 -0700 (PDT) (envelope-from jmg) Date: Wed, 24 Oct 2007 11:56:10 -0700 From: John-Mark Gurney To: LiuJiusheng Message-ID: <20071024185610.GE39759@funkthat.com> Mail-Followup-To: LiuJiusheng , freebsd-net@freebsd.org References: <471EF736.1070207@galaxywind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <471EF736.1070207@galaxywind.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hydrogen.funkthat.com [127.0.0.1]); Wed, 24 Oct 2007 11:56:12 -0700 (PDT) Cc: freebsd-net@freebsd.org Subject: Re: Routing problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 18:56:17 -0000 LiuJiusheng wrote this message on Wed, Oct 24, 2007 at 15:41 +0800: > Hello all: > I have found something interesting in FreeBSD routing. This is a test environment, which is not used in reality(perhaps meaningless). > > | host |-------| router1 |----------| router2 | > 2.2.2.2 2.2.2.1 6.6.6.1 6.6.6.2 X.X.X.X > (All run FreeBSD OS) > > Two routes is added to the router1. (4.4.4.0/24 6.6.6.2) and (6.6.6.0/24 2.2.2.2).Then the routing table look this: > Destination Gateway Flags Refs Use Netif Expire > 2 link#3 UC 0 0 > 2.2.2.1 00:0c:29:67:a5:88 UHLW 0 4 > 2.2.2.2 00:09:6b:42:94:b7 UHLW 1 2 1068 > 4.4.4/24 6.6.6.2 UGS 0 38 > 6 link#4 UC 0 0 > 6.6.6/24 2.2.2.2 UGS 1 0 > > At this time, route 4.4.4.0 can not be used. When ping 4.4.4.4, the machine prints: sent to: Invalid argument. If I remove the route 6.6.6.0/24, then all become correct. You need to have the gateway for 4.4.4/24 be 2.2.2.2... The routing code isn't smart enough to follow the trail through 6.6.6/24 to get to 2.2.2.2.... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."