From owner-freebsd-questions@FreeBSD.ORG Wed Aug 8 13:01:44 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94C6416A419 for ; Wed, 8 Aug 2007 13:01:44 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 3252513C491 for ; Wed, 8 Aug 2007 13:01:42 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id XAA17531; Wed, 8 Aug 2007 23:01:30 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 8 Aug 2007 23:01:29 +1000 (EST) From: Ian Smith To: Chuck Swiger In-Reply-To: <20070808120020.3564C16A476@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org, Adam J Richardson Subject: Re: Bizzare routing table entry. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 13:01:44 -0000 On Tue, 7 Aug 2007 15:37:50 -0700 Chuck Swiger wrote: > On Aug 7, 2007, at 3:13 PM, Adam J Richardson wrote: > > Modulok wrote: > >> 0&0xc0a80132 link#1 UCS 0 0 bge0 > > > >> 1. The first entry, it's not IPv4, IPv6 or a MAC address that I've > >> ever seen, what format is it? > > > > Hi Modulok, > > > > It's possible to represent IPv4 addresses as a single number. I > > don't recall the algorithm for converting that four byte dot- > > delimited group into an integer, though, so I can't tell you what > > number it is. Perhaps you can Google the algorithm and do the math > > to figure out what it is. > > aaa.bbb.ccc.ddd => 0xAABBCCDD, where AA = hex(aaa), BB = hex(bbb), etc. > In particular, 0xc0a80132 is the hex equivalent of 192.168.1.50. > > An IP address + netmask can normally be represented in the routing > table via the slash notation-- say 192.168.1.50/24 meaning a > 255.255.255.0 (or 0xffffff00) netmask. Non-contiguous netmasks are > represented by "address & netmask", but since no normal network ever > uses such a netmask, they almost always represent a > misconfiguration-- someone confused the arguments such that the route > command interpreted the gateway IP as a netmask instead. Been there; in my case it was a rogue route added by an ifconfig with an incorrect - as you say, non-contiguous - netmask. In this case it might have been specified/interpreted as 0.0.0.0 netmask 192.168.1.50 ? Cheers, Ian