Date: Wed, 8 Aug 2007 23:01:29 +1000 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Chuck Swiger <cswiger@mac.com> Cc: freebsd-questions@freebsd.org, Adam J Richardson <fatman.uk@gmail.com> Subject: Re: Bizzare routing table entry. Message-ID: <Pine.BSF.3.96.1070808224733.16319A-100000@gaia.nimnet.asn.au> In-Reply-To: <20070808120020.3564C16A476@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 7 Aug 2007 15:37:50 -0700 Chuck Swiger <cswiger@mac.com> wrote: > On Aug 7, 2007, at 3:13 PM, Adam J Richardson wrote: > > Modulok wrote: > >> 0&0xc0a80132 link#1 UCS 0 0 bge0 > > <snip> > >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1070808224733.16319A-100000>