Running IPv6 on Linux

IPv6 is still changing and a lot of the applications and procedures have little or no documentation. Not for the faint hearted.


  1. A static IPv4 address.

    v6-in-v4 tunnelling requires fixed addresses for both ends of the tunnel. Does not have to be a permanent link but easier if it is.

  2. Preferably outside a firewall.

    If your IPv6 box is behind a firewall or masquerade box, you will still be able to run IPv6 out (they are just IPv4 packets outside your box) and other sites can reply. However the rest of the IPv6 world cannot start sessions to you nor trace any routing problems, better to use a box outside the firewall.

  3. A working kernel that supports IPv6.

    Effectively a 2.1.x kernel. There were some patches for 2.0.30 but they are well out of date. The IPv6 kernel code changes as the RFCs and Internet drafts change so use a recent "reliable" kernel. 2.1.35 with some significant kernel patches worked but is getting a bit old. 2.1.42 works well apart from a TCP/IPv6 checksum problem, a small patch fixes it.

  4. Fetch the latest inet6-apps kit from

    Craig Metz runs He dislikes people using a browser to fetch files, he prefers normal ftp. There are actually two ftp servers, will only accept transfers from IPv6 hosts, will accept IPv4 or IPv6. New versions are put on first then a week or so later on Both servers reject transfers unless you have a valid reverse name delegation in place. You must have an IPv6 setup with a valid address delegation before you can get IPv6 applications from ­ Catch 22. Fortunately he will relax that rule if you send email and promise to get your address delegation sorted out "soon". contained (June 29) :-

     208440 Jun  9 23:07 inet6-apps-0.24.tar.gz
      18548 Mar 26 05:39 inn-1.5.1+ipv6-1.diff.gz
     973072 Mar 26 05:39 inn-1.5.1+ipv6-1.tar.gz
     959697 Mar 26 05:02 inn-1.5.1.tar.gz
      23079 Jun  9 23:07 inner-apps-0.06.tar.gz
       8708 Apr 16 17:53 innfeed-0.10.1+ipv6-1.diff.gz
     181557 Apr 16 17:53 innfeed-0.10.1+ipv6-1.tar.gz
     177298 Apr 16 17:54 innfeed-0.10.1.tar.gz
        536 Mar  8 23:11 ip_fw.c.diff
       9722 Jan 21  1980
       3212 Mar 14 04:01 libpcap-0.3.1a2+ipv6-1.diff.gz
     109988 Mar 14 04:01 libpcap-0.3.1a2+ipv6-1.tar.gz
     117491 Mar 14 03:00 libpcap-0.3.1a2.tar.gz
       2706 Mar 26 06:50 nn-tk.15.1+ipv6-1.diff.gz
     802757 Mar 26 06:50 nn-tk.15.1+ipv6-1.tar.gz
     818853 Mar 26 05:46 nn-tk.15.1.tar.gz
       3341 Mar 14 04:01 qpopper2.2+ipv6-1.diff.gz
      97450 Mar 14 04:01 qpopper2.2+ipv6-1.tar.gz
      97954 Mar 14 03:00 qpopper2.2.tar.gz
      10521 Mar 14 04:00 sendmail-8.8.5+ipv6-1.diff.gz
     992166 Mar 14 04:00 sendmail-8.8.5+ipv6-1.tar.gz
     992815 Mar 10 04:33 sendmail-8.8.5.tar.gz
      28293 Mar 14 04:00 tcpdump-3.3.1a2+ipv6-1.diff.gz
     206424 Mar 14 04:00 tcpdump-3.3.1a2+ipv6-1.tar.gz
     182360 Mar 14 03:00 tcpdump-3.3.1a2.tar.gz
       5443 Apr 21 02:11 telnet.95.10.23.NE+ipv6-3.diff.gz
     227884 Apr 21 02:11 telnet.95.10.23.NE+ipv6-3.tar.gz
     223709 Mar 14 03:00 telnet.95.10.23.NE.tar.gz
      54219 Mar 14 03:00 tftpd-1.2a1.tar.gz
       9473 Apr  9 00:56 traceroute-1.4a4+ipv6-3.diff.gz
      70163 Apr  9 00:56 traceroute-1.4a4+ipv6-3.tar.gz
      66208 Mar 14 03:00 traceroute-1.4a4.tar.gz
       3464 Mar 26 06:00 trn-3.6+ipv6-1.diff.gz
     322251 Mar 26 06:00 trn-3.6+ipv6-1.tar.gz
     325115 Mar 26 05:02 trn-3.6.tar.gz

    inet6-apps is required. inner-apps contains utilities like fingerd, netd and ipfwdump. tcpdump (which needs libpcap), traceroute and telnet are recommended. Programs such as sendmail, trn, inn are only required if you want to send mail or news over IPv6.

  5. Compile and install inet6-apps into /usr/inet6. Everything else expects /usr/inet6 to contain various IPv6 headers and libraries.

    Where IPv6 programs are not upwards compatible with IPv4, they tend to install into /usr/inet6/*bin, leaving the IPv4 versions in /usr/*bin. You need to put the inet6 directories at the front of the PATH for testing. If you hit problems using an IPv6 utility, try the IPv4 one with an explicit path.

  6. Compile and install inner-apps if desired.

  7. For libpcap and tcpdump "./configure --prefix=/usr" to replace the IPv4 tcpdump (it is upwards compatible). Use --prefix=/usr/inet6 to keep them separate.

  8. Install the latest net-tools kit from By default this overwrites the IPv4 versions, no problems so far.

  9. Optional. To do router advertisment, install the latest radvd from Build with :-
    LIBS="-L/usr/inet6/lib" CPPFLAGS="-I/usr/inet6/include" ./configure --prefix=/usr/inet6

  10. NOTE: The following describes the procedure for RFC 1897. It is not clear how much longer this will be used before being replaced with a procedure based on draft-ietf-ipngwg-testv2-addralloc-00.txt.

    Compute your prefix using the algorithm in RFC 1897. Read the document carefully. If you don't know why to do otherwise, compute a 64-bit prefix. To do this you need to know the ASN of your provider (FYI, Telstra is 1221).

    Also have a look at There is a form which will compute your prefix in two variations. But you still have to read RFC 1897 to know what you are filling in.

  11. Tentative new [TEST] process. Based on email from Bob Fink, it looks like this will be the format of new test 6bone addresses.
             |3|   13    |  8  |     24      |   16   |    64 bits      |
             |  0x3FFE   |NLA1 |     NLA2    |  SLA*  | Interface ID    |
    "NLA1 would be our TLA equivalent, that is, up to 256 Backbone sites acting as our version of TLAs. I doubt that we would have more than 256 backbone sites, but if we got close to that we could practice our implementation of TLA assignment requirements (see [AGGR]). The NLA delegation works in the same manner as CIDR delegation in IPv4 [CIDR]. NLA1s are required to assume registry duties for the NLAs below them, NLA2s for those below them, etc. At this time I would propose a nominal usage for our current 6bone topology that only has one level below a backbone site that looks like:
             |  8  |        16 bits     |   16   |    64 bits      |
             |NLA2 |       Site         |  SLA*  | Interface ID    |
    Then the transit (intermediate backbone) site would sequentially assign Site IDs, or use ASN numbers as long as they are unique in the NLA. If there was no transit site between the backbone and leaf site, then the NLA2 field would be set to zeros."

  12. Compute your prefix using one of the above algorithms. Read the documents carefully. If you don't know why to do otherwise, compute a 64-bit prefix for RFC 1897, compute a 48 bit prefix for [TEST]. For RFC 1897 you need to know the ASN of your provider.

  13. Once the prefix is known, copy the sample radvd.conf to /usr/ipv6/etc and change the prefix to match your net.
            RFC 1897 style
            interface eth0
                    AdvSendAdvert on;
                    prefix 5faa:aa00:xxxx:xx00::0/80
                            AdvOnLink on;
                            AdvAutonomous on;

    aa:aa is your ASN, AARNET/Telstra is 1221 (04:C5). xxxx:xx is the first 3 bytes of your IPv4 network in hex.

            Tentative [TEST] style
            interface eth0
                    AdvSendAdvert on;
                    prefix 3ffe:bbtt:ssss:cccc::0/64
                            AdvOnLink on;
                            AdvAutonomous on;

    bb is your backbone site, tt is your transit site (if any), ssss is the site number within the transit site, cccc is the customer network number.

  14. Find your connection point. You want somewhere that is the topologically closest transit site that is clueful enough to be depended on.

    Look at for a global overview of the 6bone structure. You can click on the names in the drawing to get the RIPE entry of a site. Look at the first field of the tunnel: lines in the RIPE entries and do some traceroutes to those addresses. According to IPv4 traceroute, CICNET is my nearest transit/backbone node, 5 extra hops from YMMV, depending on your ISP.

  15. Ask them to set you up a tunnel. You will need to provide them with your IPv6 prefix and the IPv4 address of your IPv6 router.

  16. Install the skeleton rc.inet6 from and fill in the appropriate blanks. has the following (still RFC 1897 based) :-
    /sbin/ifconfig eth0 down
    set -e
    # Normal IPv4 address, also used for IPv6 tunnel
    /sbin/ifconfig eth0 up
    /sbin/route add -net gw netmask dev eth0
    # Your IPv6 prefix
    # The host-part of the IPv6 address for this machine
    # The IPv4 address of the far side of your tunnel - CICNET
    if [ -e /proc/sys/net/ipv6/accept_ra ]
    	echo 0 > /proc/sys/net/ipv6/accept_ra
    if [ -e /proc/sys/net/ipv6/accept_redirects ]
    	echo 0 > /proc/sys/net/ipv6/accept_redirects
    if [ -e /proc/sys/net/ipv6/forwarding ]
    	echo 1 > /proc/sys/net/ipv6/forwarding
    if [ -e /proc/sys/net/ipv6/ipv6_forwarding ]
    	echo 1 > /proc/sys/net/ipv6/ipv6_forwarding
    #Obsolete /bin/situp
    /sbin/ifconfig eth0 add $PREFIX::$ADDRESS/80
    /sbin/route -A inet6 add $PREFIX::0/80 dev eth0
    # tunnel to outside
    /sbin/ifconfig sit0 up tunnel ::$TUNNEL
    /sbin/ifconfig sit1 up
    /sbin/route -A inet6 add 5f00::0/8 gw fe80::$TUNNEL dev sit1
    /usr/inet6/sbin/radvd &

  17. Make sure the tunnel moves bits. Use IPv6 ping and an IPv6 aware tcpdump to check the outgoing packets, you should see something like :-
    21:46:08.950005 > v6-in-v4
       5f04:c500:cb2b:b300::6 > 5f04:c900:8367:100:1:0:c8e:50c2 icmpv6: echo request (DF)

  18. Ask your connection point to get routing set up for you. Unless you are a transit or backbone node or you just like routing daemons, stick with a static route.

  19. Put an entry in the 6bone registry, see their web pages.

  20. Optional but recommended. Get DNS working for IPv6.

    1. Install bind, at least 4.9.5 is required to support AAAA records (8.1.1 is available). Note that all related name servers must support AAAA records.

    2. Set up an IPv6 forward DNS domain with AAAA records. You could call it, where is your normal IPv4 domain.

    3. Test the above onsite and offsite.

    4. Set up an IPv6 reverse DNS domain.

    5. Test the above on site.

    6. Request a reverse name delegation. For RFC 1897 this may involve your IPv4 provider, for the new system it just involves your IPv6 connection site.

    7. Test the above offsite.

  21. Put IPv6 on your resume.

© Keith Owens O. C. Software P/L 1997