Looking for DNS/Operational experience
Mike Leber
mleber at he.net
Fri May 8 09:52:00 CEST 2009
Steve Bertrand wrote:
> I'm about to write up some Perl scripts to do some crafty work with
> router information, but before I dedicate my time to it (I'm about all
> we have at our small SP), I thought I'd ask if there is anything of the
> like:
>
> - any UNIX command-line tool to convert a compressed v6 addr into a
> reverse DNS entry
Since you mentioned Perl, here is a way to do it with Perl:
$ perl -e 'use Net::IP;$ip=new Net::IP("2a02:c0:100::2/128");print
($ip->reverse_ip()."\n");'
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.c.0.0.2.0.a.2.ip6.arpa.
You'll probably find Net::IP very useful. You can use it to write code
that is nearly address family agnostic.
Mike.
--
+---------------- H U R R I C A N E - E L E C T R I C ----------------+
| Mike Leber Wholesale IPv4 and IPv6 Transit 510 580 4100 |
| Hurricane Electric AS6939 |
| mleber at he.net Internet Backbone & Colocation http://he.net |
+---------------------------------------------------------------------+
More information about the ipv6-ops
mailing list