nanog mailing list archives

Re: IP Prefixes are allocated ..


From: "Christopher L. Morrow" <christopher.morrow () mci com>
Date: Mon, 28 Nov 2005 07:25:16 +0000 (GMT)



On Mon, 28 Nov 2005, Florian Weimer wrote:

* Christopher L. Morrow:

he might be satisfied with:

mail.pch.net.           86400   IN      A       206.220.231.1

:~> host -W 6 -R 10 -t txt  1.231.220.206.asn.routeviews.org
1.231.220.206.asn.routeviews.org text "3856" "206.220.228.0" "22"

which is AS 3856 routing 206.220.228.0/22 ... which contains the /32
above.

asn.routeviews.org doesn't do longest-prefix matching, so you need a
short Perl script to get the correct ASN, attached below.  However,

which means host -t txt <ip> will return more than one record, yes? so he
can just scan for the longest length in the return? (I am assuming he's
not putting this into some gianormous automated monstrosity of course)

-Chris


Current thread: