<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >The ipv6calc Homepage</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD ><BODY CLASS="ARTICLE" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="ARTICLE" ><DIV CLASS="TITLEPAGE" ><H1 CLASS="TITLE" ><A NAME="AEN2" >The ipv6calc Homepage</A ></H1 ><H3 CLASS="AUTHOR" ><A NAME="AEN4" >Peter Bieringer</A ></H3 ><DIV CLASS="AFFILIATION" ><DIV CLASS="ADDRESS" ><P CLASS="ADDRESS" >pb at bieringer dot de</P ></DIV ></DIV ><DIV CLASS="REVHISTORY" ><TABLE WIDTH="100%" BORDER="0" ><TR ><TH ALIGN="LEFT" VALIGN="TOP" COLSPAN="3" ><B >Revision History</B ></TH ></TR ><TR ><TD ALIGN="LEFT" >Revision 2.0</TD ><TD ALIGN="LEFT" >2007-06-01</TD ><TD ALIGN="LEFT" >Revised by: PB</TD ></TR ><TR ><TD ALIGN="LEFT" COLSPAN="3" ></TD ></TR ></TABLE ></DIV ><HR></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >1. <A HREF="#AEN14" >General</A ></DT ><DT >2. <A HREF="#AEN22" >License</A ></DT ><DT >3. <A HREF="#AEN25" >Author</A ></DT ><DT >4. <A HREF="#AEN32" >Where to get sources or binaries</A ></DT ><DD ><DL ><DT >4.1. <A HREF="#AEN34" >Latest version of sources:</A ></DT ><DT >4.2. <A HREF="#AEN52" >Available formats:</A ></DT ><DT >4.3. <A HREF="#AEN63" >Ready to use packages for several operating systems:</A ></DT ></DL ></DD ><DT >5. <A HREF="#AEN96" >Mailling Lists</A ></DT ><DD ><DL ><DT >5.1. <A HREF="#AEN98" >ipv6calc-announce</A ></DT ><DT >5.2. <A HREF="#AEN118" >ipv6calc</A ></DT ></DL ></DD ><DT >6. <A HREF="#AEN138" >Bug Reports</A ></DT ><DT >7. <A HREF="#AEN141" >Features of ipv6calc</A ></DT ><DD ><DL ><DT >7.1. <A HREF="#AEN143" >Description</A ></DT ><DT >7.2. <A HREF="#AEN146" >Examples</A ></DT ><DT >7.3. <A HREF="#AEN171" >Option style</A ></DT ><DT >7.4. <A HREF="#AEN183" >Online help</A ></DT ></DL ></DD ><DT >8. <A HREF="#AEN197" >Webserver log conversion helper program "ipv6logconv"</A ></DT ><DD ><DL ><DT >8.1. <A HREF="#AEN200" >Examples</A ></DT ></DL ></DD ><DT >9. <A HREF="#AEN204" >Webserver log anonymization helper program "ipv6loganon"</A ></DT ><DD ><DL ><DT >9.1. <A HREF="#AEN207" >Anonymization details</A ></DT ><DT >9.2. <A HREF="#AEN236" >Supported log file formats</A ></DT ><DT >9.3. <A HREF="#AEN243" >Supported options</A ></DT ><DT >9.4. <A HREF="#AEN246" >Usage</A ></DT ></DL ></DD ><DT >10. <A HREF="#AEN250" >Perl CGI wrapper program "ipv6calcweb.cgi"</A ></DT ><DD ><DL ><DT >10.1. <A HREF="#AEN253" >Examples</A ></DT ></DL ></DD ><DT >11. <A HREF="#AEN269" >Webserver log statistics helper program "ipv6logstats"</A ></DT ><DD ><DL ><DT >11.1. <A HREF="#AEN272" >Supported options</A ></DT ><DT >11.2. <A HREF="#AEN275" >Usage</A ></DT ><DT >11.3. <A HREF="#AEN278" >Examples</A ></DT ></DL ></DD ></DL ></DIV ><DIV CLASS="SECT1" ><H2 CLASS="SECT1" ><A NAME="AEN14" >1. General</A ></H2 ><P >ipv6calc is a small utility written in programming languate C to manipulate (not only) IPv6 addresses. Intentions were convering a given IPv6 address into compressed format, convering a given IPv6 address into the same format like shown in /proc/net/if_inet6 and (because it was not difficulty) migrating the Perl program ip6_int into. Now only one utiltity is needed to do a lot.</P ><P >This utility is also used to extend features on network-functions-ipv6 library, used by initscripts-ipv6.</P ><P >Note: this tool got also its <A HREF="http://freshmeat.net/projects/ipv6calc/" TARGET="_top" >freshmeat / ipv6calc</A > page (not maintained by the author)</P ><P >Hint: take also a look at the <A HREF="http://steinbeck.ucs.indiana.edu:47401/" TARGET="_top" >Advanced Network Management Laboratory / IPv6 Address Oracle</A > if you want to learn more about IPv6 addresses.</P ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN22" >2. License</A ></H2 ><P >The program is published under the GNU GPL version 2.</P ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN25" >3. Author</A ></H2 ><P >The author of ipv6calc is</P ><P ></P ><UL ><LI ><P ><A HREF="mailto:pb@bieringer.de" TARGET="_top" >Dr. Peter Bieringer</A > with some minor contribution by others</P ></LI ></UL ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN32" >4. Where to get sources or binaries</A ></H2 ><DIV CLASS="SECT2" ><H3 CLASS="SECT2" ><A NAME="AEN34" >4.1. Latest version of sources:</A ></H3 ><P ></P ><UL ><LI ><P >Via CVS at <A HREF="http://www.deepspace6.net/" TARGET="_top" >DeepSpace6</A >: <A HREF="http://www.deepspace6.net/sections/cvs.html" TARGET="_top" >DeepSpace6 / CVS instructions</A ></P ></LI ><LI ><P >Via web interface to CVS at <A HREF="http://www.deepspace6.net/" TARGET="_top" >DeepSpace6</A >: <A HREF="http://cvs.deepspace6.net/view/ipv6calc/" TARGET="_top" >DeepSpace6 / CVS web interface</A ></P ></LI ><LI ><P >Via FTP at <A HREF="http://www.deepspace6.net/" TARGET="_top" >DeepSpace6</A >: <A HREF="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/" TARGET="_top" >DeepSpace6 / anonymous FTP</A ></P ></LI ><LI ><P >Via FTP at <A HREF="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/" TARGET="_top" >ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/</A ></P ></LI ></UL ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN52" >4.2. Available formats:</A ></H3 ><DIV CLASS="SECT3" ><H4 CLASS="SECT3" ><A NAME="AEN54" >4.2.1. tar.gz</A ></H4 ><P >A SPEC file is included, so you can build a RPM from source tarball using</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ rpmbuild -ta path/to/ipv6calc-$version.tar.gz</PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN58" >4.2.2. as RPM</A ></H4 ><P >Currently only on <A HREF="http://www.rpmfind.net/linux/rpm2html/search.php?query=ipv6calc" TARGET="_top" >rpmfind / ipv6calc</A >, but there are plans to publish at least source RPMS on <A HREF="http://www.deepspace6.net/" TARGET="_top" >DeepSpace6</A > some day.</P ></DIV ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN63" >4.3. Ready to use packages for several operating systems:</A ></H3 ><DIV CLASS="SECT3" ><H4 CLASS="SECT3" ><A NAME="AEN65" >4.3.1. Fedora</A ></H4 ><P >Fedora Core 6 is the current developing platform, so use given hints above to create a RPM. Fedora 7 includes this package by default.</P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN68" >4.3.2. Red Hat Enterprise Linux and clones</A ></H4 ><P >It's tested by the developer that creation of the RPM is working fine on RHEL4. RHEL5 includes this package by default.</P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN71" >4.3.3. Mandrake:</A ></H4 ><P >Linux Mandrake is very similar to Red Hat Linux, therefore a rebuild should work, too.</P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN74" >4.3.4. PLD:</A ></H4 ><P >See <A HREF="http://www.rpmfind.net/linux/rpm2html/search.php?query=ipv6calc" TARGET="_top" >rpmfind / ipv6calc</A >.</P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN78" >4.3.5. Debian GNU/Linux</A ></H4 ><P >Package is maintained, more information can be found at <A HREF="http://packages.debian.org/ipv6calc" TARGET="_top" >http://packages.debian.org/ipv6calc</A ></P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN82" >4.3.6. NetBSD:</A ></H4 ><P >See here for more: <A HREF="http://www.netbsd.org/packages/net/ipv6calc/" TARGET="_top" >http://www.netbsd.org/packages/net/ipv6calc/</A ></P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN86" >4.3.7. FreeBSD:</A ></H4 ><P >See here for more: <A HREF="http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/ipv6calc/" TARGET="_top" >http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/ipv6calc/</A > (<A HREF="http://www.freebsd.org/cgi/query-pr.cgi?pr=34441" TARGET="_top" >http://www.freebsd.org/cgi/query-pr.cgi?pr=34441</A >), <A HREF="http://www.freshports.org/net-mgmt/ipv6calc/" TARGET="_top" >http://www.freshports.org/net-mgmt/ipv6calc/</A ></P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN92" >4.3.8. OpenBSD:</A ></H4 ><P >See here for more: <A HREF="http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/" TARGET="_top" >http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/</A ></P ></DIV ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN96" >5. Mailling Lists</A ></H2 ><DIV CLASS="SECT2" ><H3 CLASS="SECT2" ><A NAME="AEN98" >5.1. ipv6calc-announce</A ></H3 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >Reason:</DT ><DD ><P >sending announcements of new versions</P ></DD ><DT >Traffic:</DT ><DD ><P >very low</P ></DD ><DT >Postings:</DT ><DD ><P >only moderators are allowed to post</P ></DD ><DT >Information:</DT ><DD ><P ><A HREF="http://lists.deepspace6.net/listinfo/ipv6calc-announce" TARGET="_top" >DeepSpace6 / maillist ipv6calc-announce</A ></P ></DD ></DL ></DIV ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN118" >5.2. ipv6calc</A ></H3 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >Reason:</DT ><DD ><P >discussions</P ></DD ><DT >Traffic:</DT ><DD ><P >low</P ></DD ><DT >Postings:</DT ><DD ><P >subscribers</P ></DD ><DT >Information:</DT ><DD ><P ><A HREF="http://lists.deepspace6.net/listinfo/ipv6calc" TARGET="_top" >DeepSpace6 / maillist ipv6calc</A ></P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN138" >6. Bug Reports</A ></H2 ><P >You can send bug reports to the author himself or subscribe to maillist “ipv6calc” and send it to the list.</P ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN141" >7. Features of ipv6calc</A ></H2 ><DIV CLASS="SECT2" ><H3 CLASS="SECT2" ><A NAME="AEN143" >7.1. Description</A ></H3 ><P >The main program named “ipv6calc” is able to recognice many (not only) IPv6 address formats and depending on a selectable action (not required) a selectable output format can be specified. Also it has the capability to show detailed information of an IPv4/IPv6 address or anonymize it.</P ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN146" >7.2. Examples</A ></H3 ><DIV CLASS="SECT3" ><H4 CLASS="SECT3" ><A NAME="AEN148" >7.2.1. Conversion</A ></H4 ><P >A simple example is the conversion of an IPv6 address to a DNS PTR query string:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > ./ipv6calc --out revnibbles.arpa 2001:db8::1 No input type specified, try autodetection...found type: ipv6addr 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.</PRE ></FONT ></TD ></TR ></TABLE ><P >Like you see, input format was autodetected. And the given example can be extended because ipv6calc also understands netmask / prefix length values:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q --out revnibbles.arpa 2001:db8::1/64 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.</PRE ></FONT ></TD ></TR ></TABLE ><P >Also you've also learnt now that switch '-q' (quiet) suppresses informational messages. You can use this now to start a DNS PTR query using:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ dig PTR `./ipv6calc -q --out revnibbles.arpa 2001:db8::1/64`</PRE ></FONT ></TD ></TR ></TABLE ><P >But ipv6calc can do many more for you! Next example shows you the extraction of the IPv4 address contained in a 6to4 IPv6 address:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q --action conv6to4 --in ipv6 2002:c0a8:fb61::1 --out ipv4 192.168.251.97</PRE ></FONT ></TD ></TR ></TABLE ><P >This also works vice-versa:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q --action conv6to4 --in ipv4 192.168.251.97 --out ipv6 2002:c0a8:fb61::</PRE ></FONT ></TD ></TR ></TABLE ><P >There are many more features already implemented, if you miss one, send a note.</P ></DIV ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN161" >7.2.2. Information</A ></H4 ><P >Information about a simple IPv6 address:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q -i 3ffe:ffff::210:a4ff:fe01:2345 Address type: unicast, 6bone, global-unicast, productive Address type has SLA: 0000 Registry for address: reserved Interface identifier: 0210:a4ff:fe01:2345 EUI-48/MAC address: 00:10:a4:01:23:45 MAC is a global unique one MAC is an unicast one OUI is: XIRCOM</PRE ></FONT ></TD ></TR ></TABLE ><P >Information about a Teredo IPv6 address:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q -i 3ffe:831f:ce49:7601:8000:efff:af4a:86BF Address type: unicast, 6bone, global-unicast, productive, teredo IPv4 address: 80.181.121.64 IPv4 registry[80.181.121.64]: RIPENCC IPv4 address: 206.73.118.1 IPv4 registry[206.73.118.1]: ARIN Address type is Teredo and included IPv4 server address is: 80.181.121.64 and client port: 4096 IPv4 registry for Teredo server address: ARIN Registry for address: reserved</PRE ></FONT ></TD ></TR ></TABLE ><P >There exists also a machine readable output (e.g. used by 'ipv6calcweb.cgi') - in addition, here <A HREF="http://www.ip2location.com/" TARGET="_top" >IP2Location</A > and/or <A HREF="http://www.maxmind.com/" TARGET="_top" >GeoIP</A > information can be displayed, if databases are specified. Note that GeoIP currently still supports IPv4 only.</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -q -i -m --db-ip2location-ipv4 /usr/share/IP2Location/IP-COUNTRY-SAMPLE.BIN --db-ip2location-ipv6 /var/local/share/IP2Location/IPV6-COUNTRY.BIN --db-geoip /usr/share/GeoIP/GeoIP.dat 3ffe:831f:ce49:7601:8000:efff:af4a:86BF IPV6=3ffe:831f:ce49:7601:8000:efff:af4a:86bf TYPE=unicast,6bone,global-unicast,productive,teredo IPV4_SOURCE[80.181.121.64]=TEREDO-CLIENT IPV4[80.181.121.64]=80.181.121.64 IPV4_REGISTRY[80.181.121.64]=RIPENCC IP2LOCATION_DATABASE_INFO_IPV4=url=http://www.ip2location.com date=2005-06-17 entries=20470 apiversion=2.1.3 IP2LOCATION_COUNTRY_SHORT[80.181.121.64]=IT IP2LOCATION_COUNTRY_LONG[80.181.121.64]=ITALY IP2LOCATION_REGION[80.181.121.64]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_CITY[80.181.121.64]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ISP[80.181.121.64]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_LATITUDE[80.181.121.64]=0.000000 IP2LOCATION_LONGITUDE[80.181.121.64]=0.000000 IP2LOCATION_DOMAIN[80.181.121.64]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ZIPCODE[80.181.121.64]=This parameter is unavailable for selected data file. Please upgrade the data file. GEOIP_COUNTRY_SHORT[80.181.121.64]=IT GEOIP_COUNTRY_LONG[80.181.121.64]=Italy GEOIP_DATABASE_INFO=GEO-106FREE 20070201 Build 1 Copyright (c) 2007 MaxMind LLC All Rights Reserved apiversion=system IPV4_SOURCE[206.73.118.1]=TEREDO-SERVER IPV4[206.73.118.1]=206.73.118.1 IPV4_REGISTRY[206.73.118.1]=ARIN IP2LOCATION_COUNTRY_SHORT[206.73.118.1]=?? IP2LOCATION_COUNTRY_LONG[206.73.118.1]=This record is unavailable in demo version. Please subscribe. IP2LOCATION_REGION[206.73.118.1]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_CITY[206.73.118.1]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ISP[206.73.118.1]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_LATITUDE[206.73.118.1]=0.000000 IP2LOCATION_LONGITUDE[206.73.118.1]=0.000000 IP2LOCATION_DOMAIN[206.73.118.1]=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ZIPCODE[206.73.118.1]=This parameter is unavailable for selected data file. Please upgrade the data file. GEOIP_COUNTRY_SHORT[206.73.118.1]=US GEOIP_COUNTRY_LONG[206.73.118.1]=United States TEREDO_PORT_CLIENT=4096 IPV6_REGISTRY=reserved IP2LOCATION_DATABASE_INFO_IPV6=url=http://www.ip2location.com date=2007-05-26 entries=7495 apiversion=2.1.3 IP2LOCATION_COUNTRY_SHORT=- IP2LOCATION_COUNTRY_LONG=- IP2LOCATION_REGION=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_CITY=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ISP=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_LATITUDE=0.000000 IP2LOCATION_LONGITUDE=0.000000 IP2LOCATION_DOMAIN=This parameter is unavailable for selected data file. Please upgrade the data file. IP2LOCATION_ZIPCODE=This parameter is unavailable for selected data file. Please upgrade the data file. IPV6CALC_NAME=ipv6calc IPV6CALC_VERSION=0.70.1 IPV6CALC_COPYRIGHT="(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>" IPV6CALC_OUTPUT_VERSION=4</PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN171" >7.3. Option style</A ></H3 ><P >Since version 0.40 new-style option handling was introduced, using</P ><P ></P ><UL ><LI ><P >--in <inputtype></P ></LI ><LI ><P >--out <outputtype></P ></LI ><LI ><P >--action <actiontype></P ></LI ></UL ><P >and many more conversions were added. A built-in check matrix should prevent misconversions.</P ><P >Up to version 0.39, only old-style options (which perhaps - but it's not planned at the moment - are going obsolete sometimes the future) were available. They are one-in-all options, specifying input/action/output in one token. Internally this options will be converted into new-style options.</P ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN183" >7.4. Online help</A ></H3 ><P >Online help always shows the currently implemented features.</P ><DIV CLASS="SECT3" ><HR><H4 CLASS="SECT3" ><A NAME="AEN186" >7.4.1. Main online help:</A ></H4 ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc -? ipv6calc: version 0.70.1 (P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de> General: [-d|--debug <debug value>] : debug value (bitwise like) [-q|--quiet] : be more quiet Usage with new style options: [--in|-I <input type>] : specify input type (default: autodetect) [--out|-O <output type>] : specify output type (sometimes: autodetect) [--action|-A <action>] : specify action (default: format conversion, sometimes: autodetect) [<format option> ...] : specify format options <input data> [...] : input data Available input types: --in -?|-h|--help Available output types: --out -?|-h|--help Available action types: --action -?|-h|--help Other usage: --showinfo|-i [--machine_readable|-m] : show information about input data --showinfo|-i --show_types : show available types on '-m' [--db-ip2location-ipv4 <file>] : IP2Location IPv4 database file (optional) [--db-ip2location-ipv6 <file>] : IP2Location IPv6 database file (optional) [--db-geoip <file>] : GeoIP database file (optional) To see old-style option use: --printoldoptions</PRE ></FONT ></TD ></TR ></TABLE ><P >Input-type options</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >]$ ./ipv6calc --in -? ipv6calc: version 0.70.1 (P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de> Available input types: auto : automatic detection revnibbles.int : dot separated nibbles reverse, ending with ip6.int. revnibbles.arpa: dot separated nibbles reverse, ending with ip6.arpa. bitstring : bitstring labes, ending with ip6.arpa. ipv6addr : IPv6 address ipv4addr : IPv4 address ipv4hex : IPv4 in hexdecimal format ipv4revhex : IPv4 in byte-reversed hexdecimal format mac : MAC address (48 bits) base85 : Base-85 string ifinet6 : Like line in /proc/net/if_inet6 iid+token : Interface identifier and token ipv6logconv : ipv6logconv (currently not supported) prefix+mac : IPv6 prefix and a MAC address</PRE ></FONT ></TD ></TR ></TABLE ><P >Output-type options:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc --out -? ipv6calc: version 0.70.1 (P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de> Available output types: revnibbles.int : dot separated nibbles reverse, ending with ip6.int. revnibbles.arpa: dot separated nibbles reverse, ending with ip6.arpa. bitstring : bitstring labes, ending with ip6.arpa. ipv6addr : IPv6 address ipv4addr : IPv4 address mac : MAC address (48 bits) eui64 : EUI-64 identifier (64 bits) base85 : Base-85 string ifinet6 : Like line in /proc/net/if_inet6 iid : Interface identifier iid+token : Interface identifier and token addrtype : Address type ouitype : OUI (IEEE) type ipv6addrtype : IPv6 address type any : any type (currently not supported) revipv4 : reverse IPv4, ending with in-addr.arpa ipv4hex : IPv4 in hexdecimal format octal : IP address in escaped octal format For examples and available format options use: --out <type> --examples</PRE ></FONT ></TD ></TR ></TABLE ><P >Action-type options: </P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc --action -? ipv6calc: version 0.70.1 (P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de> Available action types: auto : Automatic selection of action (default) geneui64 : Converts a MAC address to an EUI-64 address conv6to4 : Converts IPv4 address <-> 6to4 IPv6 address (prefix) genprivacyiid : Generates a privacy interface ID out of a given one and a token anonymize : Anonymize IPv4/IPv6 address without loosing much information prefixmac2ipv6: Generates an IPv6 address out of a prefix and a MAC address</PRE ></FONT ></TD ></TR ></TABLE ><P >Because of historical issues, there exists also a support of the old-styled options: </P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6calc --printoldoptions ipv6calc: version 0.70.1 (P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de> Usage with old style (shortcut) options (going obsolete): <shortcut option> [<format option> ...] <input data> [...] --addr2ip6_int --addr_to_ip6int --addr2ip6_arpa --addr_to_ip6arpa --addr_to_bitstring --addr2compaddr --addr_to_compressed --addr2uncompaddr --addr_to_uncompressed --addr_to_base85 --base85_to_addr --mac_to_eui64 --addr2fulluncompaddr --addr_to_fulluncompressed --addr2if_inet6 --addr_to_ifinet6 --if_inet62addr --ifinet6_to_compressed --eui64_to_privacy --ipv4_to_6to4addr</PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN197" >8. Webserver log conversion helper program "ipv6logconv"</A ></H2 ><P >This program parses address tokens of a given webserver logfile and converts them to special strings, useful for statistics (e.g. created by using "analog").</P ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN200" >8.1. Examples</A ></H3 ><P >A demonstration about which kind of statistics are possible to produce is shown at <A HREF="http://www.ipv6.bieringer.de/" TARGET="_top" >http://www.ipv6.bieringer.de/</A > (IPv6 only).</P ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN204" >9. Webserver log anonymization helper program "ipv6loganon"</A ></H2 ><P >On autoconfiguration, the interface part of an IPv6 address is based on the MAC address of the network interface card (NIC). This address is used for outgoing requests, if privacy option (RFC3041) is not enabled. This results in many privacy related information on web- or mail-server log files. Administrators, which won't (be allowed to) store such information over time, but still do not want to loose information about address type distribution should use 'ipv6loganon' to anonymize their log files.</P ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN207" >9.1. Anonymization details</A ></H3 ><P >The anonymizer would keep as much information as possible for IPv6 address types.</P ><P >Client-side IID would be anonymized by</P ><P ></P ><UL ><LI ><P >UI-48 based: serial number would be zero'ed, keeping OID</P ></LI ><LI ><P >EUI-64 based: serial number would be zero'ed, keeping OID</P ></LI ><LI ><P >ISATAP: client IPv4 address would be anonymized by given IPv4 mask</P ></LI ><LI ><P >TEREDO: client IPv4 address would be anonymized by given IPv4 mask, client port would be zero'ed</P ></LI ><LI ><P >6to4(Microsoft): client IPv4 address would be anonymized by given IPv4 mask</P ></LI ><LI ><P >local: whole IID would be zero'ed</P ></LI ></UL ><P >Client-side SLA would be anonymized by </P ><P ></P ><UL ><LI ><P >SLA would be zero'ed</P ></LI ></UL ><P >Prefix would be anonymized by</P ><P ></P ><UL ><LI ><P >6to4: client IPv4 address would be anonymized by given IPv4 mask</P ></LI ></UL ><P >Compat/Mapped IPv4 addresses would be anonymized by</P ><P ></P ><UL ><LI ><P >IPv4 address would be anonymized by given IPv4 mask</P ></LI ></UL ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN236" >9.2. Supported log file formats</A ></H3 ><P >Currently native supported log files:</P ><P ></P ><UL ><LI ><P >Apache log file format, 1st token is IPv4 or IPv6 address</P ></LI ></UL ><P >There are plans to support also mail server log files sometimes in the future, but because of different formats, this would be probably done by a Perl program which parses the log file and a (cached) 'ip6calc' call with action 'anonymize'.</P ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN243" >9.3. Supported options</A ></H3 ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6loganon -? ipv6loganon: version 0.70.1 (P) & (C) 2007 by Peter Bieringer <pb (at) bieringer.de> This program anonymizes IPv4/IPv6 addresses in HTTP server log files General: [-d|--debug <debug value>] : debug value (bitwise like) [-V|--verbose] : be verbose [-n|--nocache] : disable caching [-c|--cachelimit <value>] : set cache limit default: 20 maximum: 200 Output anonymization: --mask-ipv4 <bits> : mask all IPv4 addresses [0-32], default 24 even if occurs in IPv6-IID --mask-ipv6 <bits> : mask IPv6 prefix [0-64], default 48 only applied to related address types --no-mask-iid : do not mask non-IPv4 based IPv6-IID --anonymize-standard : preset for standard anonymization (default) mask-ipv4=24 mask-ipv6=48 mask-iid --anonymize-careful : preset for careful anonymization mask-ipv4=20 mask-ipv6=40 mask-iid --anonymize-paranoid : preset for paranoid anonymization mask-ipv4=16 mask-ipv6=32 mask-iid Takes data from stdin, outputs the processed data to stdout</PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN246" >9.4. Usage</A ></H3 ><P >Currently, only offline conversion is supported. Implementation as pipe filter between Apache and 'cronolog' has been tested, but didn't work for unknown reason.</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ cat /path/to/http_log | ./ipv6loganon >/path/to/http_log_anonymized</PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN250" >10. Perl CGI wrapper program "ipv6calcweb.cgi"</A ></H2 ><P >Because calling C programs directly as CGI isn't really recommended (too much security troubles all the time), I wrote a small wrapper utility which calls "ipv6calc" to get information about client and server address for displaying on a web page. </P ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN253" >10.1. Examples</A ></H3 ><P >A demonstration about which kind of output is possible to produce is shown at</P ><P ></P ><UL ><LI ><P ><A HREF="http://www.ipv6.bieringer.de/" TARGET="_top" >http://www.ipv6.bieringer.de/</A > (IPv6 only)</P ></LI ><LI ><P ><A HREF="http://ipv6.aerasec.de/index2.html" TARGET="_top" >http://ipv6.aerasec.de/index2.html</A > (IPv4/IPv6)</P ></LI ><LI ><P ><A HREF="http://www.sixxs.net/tools/ipv6calc/" TARGET="_top" >http://www.sixxs.net/tools/ipv6calc/</A > (IPv4/IPv6)</P ></LI ><LI ><P ><A HREF="http://ipv6-info.internet2.edu/" TARGET="_top" >http://ipv6-info.internet2.edu/</A ></P ></LI ></UL ></DIV ></DIV ><DIV CLASS="SECT1" ><HR><H2 CLASS="SECT1" ><A NAME="AEN269" >11. Webserver log statistics helper program "ipv6logstats"</A ></H2 ><P >This program parses a given webserver logfile and count addresses, useful for time period statistics.</P ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN272" >11.1. Supported options</A ></H3 ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ ./ipv6logstats -? ipv6logstats: version 0.70.1 (P) & (C) 2003-2005 by Peter Bieringer <pb (at) bieringer.de> General: [-d|--debug <debug value>] : debug value (bitwise like) [-u|--unknown] : print unknown IP addresses to stderr [-c|--colums] : print statistics in colums [-n|--noheader] : don't print header in colums mode [-o|--onlyheader] : print only header in colums mode [-p|--prefix <token>] : print token as prefix Takes http log data from stdin and print a table on output</PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN275" >11.2. Usage</A ></H3 ><P >There are a README and some helper scripts available in the package how to use this program and how to generate a graph using Gnuplot.</P ></DIV ><DIV CLASS="SECT2" ><HR><H3 CLASS="SECT2" ><A NAME="AEN278" >11.3. Examples</A ></H3 ><P >A demonstration with real data is available at <A HREF="http://mirrors.bieringer.de/stats/timeline.html" TARGET="_top" >http://mirrors.bieringer.de/stats/timeline.html</A >.</P ></DIV ></DIV ></DIV ></BODY ></HTML >