Re: [mirrorbrain] [PATCH] IPv6 support for mod_asn - Apparently a very low hanging fruit.

From: Michael Meier <>
Date: Fri, 08 May 2015 20:43:13 +0200
> With the adoption of IPv6 for more and more end user connections I believe it's
> necessary that mod_asn is also able to match IPv6 addresses to their AS and get
> the users to the closest IPv6-enabled mirror possible.
> [...]
> as you can see it works just as it should, giving back the correct order, IPv4
> and IPv6 prefixes in harmony !

I played around with your incredibly small patches today, and it really
does seem to work very well. It really is a very low hanging fruit.

> The only piece to the IPv6 puzzle that is missing to me at least, is a good
> source for the IPv6 prefixes <-> AS list in plain just like there is with
> for IPv4. If someone has BGP full-table running on
> maybe a looking glass router one can simply get it from there, but that is of
> course not something for everyone. So this needs some thought and then the
> appropriate addition to the provided script to gather the data and put it into
> the database.

While there are no textual dumps available for IPv6, there is really no
lack of binary dumps. For example, ripe offers quite a few on But since mirrorbrain already uses
data for IPv4, I used their IPv6 data for my tests.
Unfortunately, there is no "current" symlink as with the IPv4 text data,
so you need to construct the right filename depending on the current
date (and maybe time) yourself. For example, the data i used was
So generally,
They offer dumps every two hours, but for mirrorbrain use just taking a
random one from the last week should be perfectly fine.
The command-sequence I used then was:
> bzcat rib.20150508.0000.bz2 | ./ | ./ > /tmp/v6routedump.dat
> asn_get_routeviews > /tmp/v4routedump.dat
> cat /tmp/v6routedump.dat /tmp/v4routedump.dat |
The helper tools used in this and the slightly modified version of that I used can be found in
While this works, it could need some more streamlining, e.g.:
- providing a download-tool like for the IPv4 data
- providing a mirror of the data used on
- install the new helper tool(s) in packaging
- perhaps merging it all together into
It would really be nice if this could be integrated into mirrorbrain.

While I'm at it, I also have a small documentation fix at
This should be trivial to merge, it simply adapts the documentation to
non-ancient postgresql-versions.

mirrorbrain mailing list

Note: To remove yourself from this mailing list, send a mail with the content
to the address
Received on Sat May 09 2015 - 01:34:44 GMT

This archive was generated by hypermail 2.3.0 : Wed Jun 10 2015 - 12:17:05 GMT