From owner-freebsd-net@FreeBSD.ORG Fri Sep 7 10:47:29 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 7028516A418 for ; Fri, 7 Sep 2007 10:47:29 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from s200aob12.obsmtp.com (s200aob12.obsmtp.com [207.126.144.116]) by mx1.freebsd.org (Postfix) with SMTP id D952713C4DB for ; Fri, 7 Sep 2007 10:47:28 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from source ([213.206.147.173]) by eu1sys200aob012.postini.com ([207.126.147.11]) with SMTP; Fri, 07 Sep 2007 10:44:08 UTC Received: from [10.0.0.89] (bill.mintel.co.uk [10.0.0.89]) by rodney.mintel.co.uk (Postfix) with ESMTP id 8522C181452 for ; Fri, 7 Sep 2007 10:08:38 +0100 (BST) Message-ID: <46E11515.8090007@tomjudge.com> Date: Fri, 07 Sep 2007 10:08:37 +0100 From: Tom Judge User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: freebsd-net@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Strange behaviour of route command 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: Fri, 07 Sep 2007 10:47:29 -0000 Hi, While making some changes to the routing table on one of our routers today I noticed that "route add" was showing some strange behaviour. When adding a route for 128/8 to the table rather than adding 128.0.0.0/8 it would add 0.0.0.0/8, however adding 10/9 works correctly. Is this a bug in route or the routing table? Tom [root@fw1 /tftpboot]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.0.0.1 UGS 0 4838 bge0 10.0.0.0/8 link#1 UC 0 0 bge0 10.0.0.46 00:11:43:37:2e:2e UHLW 1 0 bge0 1196 10.0.0.89 00:16:17:e1:ea:bc UHLW 1 18 bge0 631 10.0.6.0/23 link#3 UC 0 0 bge2 127.0.0.1 127.0.0.1 UH 0 231 lo0 [root@fw1 /tftpboot]# route add 128/8 10.0.0.1 add net 128: gateway 10.0.0.1 [root@fw1 /tftpboot]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 0.0.0.0/8 10.0.0.1 UGS 0 0 bge0 => default 10.0.0.1 UGS 0 4838 bge0 10.0.0.0/8 link#1 UC 0 0 bge0 10.0.0.1 link#1 UHLW 2 0 bge0 10.0.0.46 00:11:43:37:2e:2e UHLW 1 0 bge0 1193 10.0.0.89 00:16:17:e1:ea:bc UHLW 1 84 bge0 612 10.0.6.0/23 link#3 UC 0 0 bge2 127.0.0.1 127.0.0.1 UH 0 231 lo0 [root@fw1 /tftpboot]# route add 128.0/8 10.0.0.1 add net 128.0: gateway 10.0.0.1 [root@fw1 /tftpboot]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 0.0.0.0/8 10.0.0.1 UGS 0 0 bge0 => default 10.0.0.1 UGS 0 4838 bge0 10.0.0.0/8 link#1 UC 0 0 bge0 10.0.0.1 link#1 UHLW 3 0 bge0 10.0.0.46 00:11:43:37:2e:2e UHLW 1 0 bge0 1180 10.0.0.89 00:16:17:e1:ea:bc UHLW 1 131 bge0 1200 10.0.6.0/23 link#3 UC 0 0 bge2 127.0.0.1 127.0.0.1 UH 0 231 lo0 128.0.0.0/8 10.0.0.1 UGS 0 0 bge0 root@fw1 /tftpboot]# route add 10/9 10.0.0.50 add net 128.0: gateway 10.0.0.1 [root@fw1 /tftpboot]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 0.0.0.0/8 10.0.0.1 UGS 0 0 bge0 => default 10.0.0.1 UGS 0 4838 bge0 10.0.0.0/9 10.0.0.50 UGS 0 0 bge0 10.0.0.0/8 link#1 UC 0 0 bge0 10.0.0.1 link#1 UHLW 3 0 bge0 10.0.0.46 00:11:43:37:2e:2e UHLW 1 0 bge0 1180 10.0.0.89 00:16:17:e1:ea:bc UHLW 1 131 bge0 1200 10.0.6.0/23 link#3 UC 0 0 bge2 127.0.0.1 127.0.0.1 UH 0 231 lo0 128.0.0.0/8 10.0.0.1 UGS 0 0 bge0