From owner-freebsd-net@FreeBSD.ORG Wed Oct 24 07:56:03 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 D8A9416A420 for ; Wed, 24 Oct 2007 07:56:03 +0000 (UTC) (envelope-from liujiusheng@galaxywind.com) Received: from m15.cnsun.net (m15.cnsun.net [210.22.15.15]) by mx1.freebsd.org (Postfix) with ESMTP id B32A513C49D for ; Wed, 24 Oct 2007 07:56:03 +0000 (UTC) (envelope-from liujiusheng@galaxywind.com) Received: from KsemailAntiServer-Engine-5.0-Build-050315-localhost (m15.cnsun.net [127.0.0.1]) by m15.cnsun.net (CnSunMail_NC http://www.51.hk) with SMTP id C7CA05BEFFB for ; Wed, 24 Oct 2007 15:50:53 +0800 (CST) Received: from [127.0.0.1] (unknown [222.210.203.91]) by m15.cnsun.net (CnSunMail_NC http://www.51.hk) with ESMTP id 4522B5BEF93 for ; Wed, 24 Oct 2007 15:50:51 +0800 (CST) Message-ID: <471EF736.1070207@galaxywind.com> Date: Wed, 24 Oct 2007 15:41:42 +0800 From: LiuJiusheng User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Routing problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 07:56:03 -0000 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. I think this happens because Arp is stored in the routing table (That means this is a design problem). I am just start reading the FreeBSD code, so I don't know if I make some mistake. If I am correct, is there any solutions to this problem.(I test it in linux, and it works fine). Thank you!