Date: Fri, 07 Sep 2007 10:08:37 +0100 From: Tom Judge <tom@tomjudge.com> To: freebsd-net@FreeBSD.org Subject: Strange behaviour of route command Message-ID: <46E11515.8090007@tomjudge.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46E11515.8090007>