IPv6 & Linux - HowTo - Script Files (3.19) - 20010731 and later

Version: 3.20a from 2001-08-30


(P) & (C) 2001 by Peter Bieringer <pb@bieringer.de>, see copyright notice for more details
Original site of publishing: http://www.bieringer.de/linux/IPv6/; suggestions, comments and improvements are welcome!

If you found errors, bugs or problems, please contact the author - thank you!

Contents


Version information

Additional information

Credits to


How to get

Because of the amount of files and dependencies, the current scripts are no longer separately available via HTTP, they are now distributed in a tarball via FTP and for Red Hat Linux also as SRPMS

Stable set

Testing


Script files (index), version: 20010828a

My IPv6 setup is based on a RedHat 6.2, 7.1 and Rowell beta system, but should be easy to install on all SystemV compatible Linux distributions (except S.u.S.E. and Debian...).

Common (distribution version independed)

Red Hat Linux 6.2

This version has no IPv6 support, so it must be implemented

Red Hat Linux 7.1

This version has already IPv6 support, but based on an older version of my scripts

Red Hat Linux Roswell beta

This version has already IPv6 support, but based on an (but not much) older version of my scripts



Installation, configuration and testing

Network configuration on Linux is splitted in several steps:
  1. Configuration of the built-in interfaces
  2. Global network configuration
  3. Starting of the daemons using the network
For IPv6 you have to implement in this steps the IPv6 configuration in the right way. Therefore I have written several configuration and script files, which do this work.
Please, DO NOT USE following shown addresses in your case without checking!

Pre-install:

  • IPv4 interface configuration should be done by the distribution and is working (not a must for an IPv6 only box)
  • Installation:

    1. Fetch tarball
    2. Extract tarball
    3. Copy script files to relating directories (perhaps outdated ones will be overwrited)
    4. Apply patches to existing files using given diff files
    5. Look into the configuration files and copy related items to yours Please, check example data and change it before starting!

    Configuration:

    Basics: if a variable is shown twice (and one of the line is starting with "#") then the possible values are shown. To change the value you can comment out the uncommented (add a leading "#" at the beginning of the line) and delete the other "#" or delete one line and change the value regarding to that what you want.

    See also sysconfig-ipv6.txt (included in the tar-ball) for more description and examples.

    /etc/sysconfig/network

    Controls global IPv6 configuration

    /etc/sysconfig/network-scripts/ifcfg-device

    Example to controls a LAN or PPP device specific IPv6 configuration 6to4 related part (optional) Special controls (optional)

    /etc/sysconfig/network-scripts/ifcfg-sit0

    Example to controls basic IPv6-in-IPv4 tunnel interface, obsolete in script sets >20010522d now, use switch IPV6_AUTOTUNNEL at /etc/sysconfig/network now.

     /etc/sysconfig/network-scripts/ifcfg-tunnel

    Example to control a dedicated IPv6-in-IPv4 tunnel interface

    /etc/sysconfig/static-routes-ipv6

    Example for IPv6 static routes:

    Testing:


    Migration

    From 3.15-3.16 to 3.19+

    Following changes should be done for migration:
     
    File Description 3.15-3.16 3.19+
    ifcfg-ethX IPv6 address must include prefix length now IPV6ADDR IPV6ADDR (prefix length included)
    ifcfg-ethX Extra variable for prefix length is now obsolete IPV6PREFIXLENGTH Prefix length now included in IPV6ADDR
    ifcfg-ethX Support for more than only 2 secondary IPv6 addresses per interface IPV6ADDR_1 
    IPV6ADDR_2
    IPV6ADDR_SECONDARIES (prefix length included) contains a list with additional IPv6 addresses
    ifcfg-sitX
    (X > 0)
    Tunnel route no longer specified here IPV6TUNNELROUTE Specified now in static-routes-ipv6
    ifcfg-sitX
    (X > 0)
    Numbered tunnel now supported not supported IPV6ADDR (prefix length included)
    ifcfg-sit0 Automatic tunneling now supported not supported (in early releases) Use switch IPV6_AUTOTUNNEL at /etc/sysconfig/network now

    From 3.17 to 3.19+

    Following changes should be done for migration:
     
    File Description 3.17 3.19+
    ifcfg-sitX (X > 0) Numbered tunnel now better supported Prefix length was set to 0 because of NBMA-styled setup prefix length for p-t-p tunnels in non NBMA-styled mode can be set now to 127

    rom 3.18 to 3.19+

    Following changes should be done for migration:
     
    File Description 3.18 3.19+
    ifcfg-sit0 Automatic tunneling ifcfg-sit0 was used for that Use switch IPV6_AUTOTUNNEL at /etc/sysconfig/network now instead
    ifcfg-sitX (X > 0) Numbered tunnel now better supported Prefix length was set to 0 because of NBMA-styled setup prefix length for p-t-p tunnels in non NBMA-styled mode can be set now to 127


    Examples for static tunnel setup

    This section contains examples about a setup of static tunnels to different tunnel providers.

    Note: static tunnels should be configured on device names sitX with (X>0). Do not use sit0, because it is a reserved device and shouldn't be used for such cases.


    Static tunnel with a routable segment

    Example based on test at 2001-03-13.

    Data you got from a static tunnel server administrator (here is an example shown):

    IPv6 remote static tunnel IPv4 address (server side): 1.2.3.4
    To local routed IPv6 address space: 3ffe:ffff:0000:f100::/56

    Common known data:

    Global routable IPv6 address space: 3ffe::/16, 2000::/3

    What does this data mean and where to put the values in the configuration files:

    Name Value(s) Explanation Which file is related Where to put this value
    IPv6 remote static tunnel IPv4 address (server side) 1.2.3.4 The IPv4 address of a remote tunnel server e.g.
    ifcfg-sit1
    IPV6TUNNELIPV4="1.2.34"
    To local routed IPv6 segment 3ffe:ffff:0000:f100::/56 An IPv6 address space which will be routed to you e.g. local interface,  RAdvD, routing configuration e.g. /etc/radvd.conf, segmented per device, other local hosts
    Global routable IPv6 address space 3ffe::/16
    2000::/3
    IPv6 address space, which should be routed through this tunnel static-routes-ipv6 See example, one IPv6 address space per line

    Configuration files result in:

    Check:


    Freenet6 point-to-point-tunnel

    Example based on test at 2001-03-13.

    See here for more information about what Freenet6 provides you.

    Data you got from Freenet6: (here is an example shown):

    This perl script is setup with exacts values :

    Your IPv6 address : 3ffe:b00:c18:1fff:0:0:0:a1f
    Freenet6 IPv6 address (server side) : 3ffe:b00:c18:1fff:0:0:0:a1e
    Freenet6 IPv4 address (server side) : 206.123.31.102
    Your IPv4 address : 62.155.142.69

    Common known data:

    Global routable IPv6 address space: 3ffe::/16, 2000::/3

    What does this data mean and where to put the values in the configuration files:

    Name Value(s) Explanation Which file is related Where to put this value
    Your IPv6 address 3ffe:b00:c18:1fff:0:0:0:a1f Freenet6 assign only one IPv6 address to you, not more! e.g.
    ifcfg-sit2
    IPV6ADDR="3ffe:b00:c18:1fff:0:0:0:a1f/127"
    Freenet6 IPv6 address (server side) 3ffe:b00:c18:1fff:0:0:0:a1e They also assigned a relating IPv6 address on their tunnel server (it's now a point-to-point IPv6 link) Value is locally not needed (but for easier ping6 tests you can put it in /etc/hosts)
    Freenet6 IPv4 address (server side) 206.123.31.102 The IPv4 address of their tunnel server e.g.
    ifcfg-sit2
    IPV6TUNNELIPV4="206.123.31.102
    Your IPv4 address 62.155.142.69 Your global IPv4 address, static or dynamically assigned interface or
    ial-up configuration
    Value must be already assigned static or dynamically, otherwise no Internet connection is possible
    Global routable IPv6 address space 3ffe::/16
    2000::/3
    IPv6 address space, which should be routed through this tunnel static-routes-ipv6 See example, one IPv6 address space per line

    Configuration files result in:

    Check:


    Hurricane Electric tunnel broker

    Example based on test at 2001-03-13.

    Data you got from Hurricane Electric: (here is an example shown):

    Account: *****
    Last Active: Never (tested via ipv6 ping every half hour)
    Full name: *****
    Company: *****
    E-mail address: *****
    Broker IPv4 tunnel address: 64.71.128.26
    Broker IPv6 link address: 3FFE:1200:3028:FF01::2e6/127
    Your IPv4 tunnel address: 62.155.142.69
    Your IPv6 link address: 3FFE:1200:3028:FF01::2e7/127

    If you also require an IPv6 network:

    Your IPv6 network prefix: 3FFE:1200:3028:8173::/64

    Common known data:

    Global routable IPv6 address space: 3ffe::/16, 2000::/3

    What does this data mean and where to put the values in the configuration files:

    Name Value(s) Explanation Which file is related Where to put this value
    Your IPv4 tunnel address 3FFE:1200:3028:FF01::2e7/127 In this mode, only one IPv6 address is provided to you. e.g.
    ifcfg-sit3
    IPV6ADDR="3FFE:1200:3028:FF01::2e7/127"
    Broker IPv6 link address 3FFE:1200:3028:FF01::2e6/127 They also assigned a relating IPv6 address on their tunnel server (it's now a point-to-point IPv6 link) Value is locally not needed (but for easier ping6 tests you can put it  [without prefix length] in /etc/hosts)
    Broker IPv4 tunnel address 64.71.128.26 The IPv4 address of their tunnel server e.g.
    ifcfg-sit3
    IPV6TUNNELIPV4="64.71.128.26"
    Your IPv4 tunnel address 62.155.142.69 Your global IPv4 address, static or dynamically assigned interface or
    ial-up configuration
    Value must be already assigned static or dynamically, otherwise no Internet connection is possible
    Your IPv6 network prefix 3FFE:1200:3028:8173::/64 An IPv6 address space which will be routed to you e.g. local interface,  RAdvD, routing configuration e.g. /etc/radvd.conf, segmented per device, other local hosts
    Global routable IPv6 address space 3ffe::/16
    2000::/3
    IPv6 address space, which should be routed through this tunnel static-routes-ipv6 See example, one IPv6 address space per line

    Configuration files result in:

    Check:


    6to4 relay tunnel router

    Example based on test at 2001-03-13.

    Information about 6to4 relay tunnel routers are given here: http://www.kfu.com/~nsayer/6to4/

    Data you got from: (here is an example shown):

    IPv4 address of remote 6to4 relay router: 194.95.108.191

    Common known data:

    Global routable IPv6 address space: 3ffe::/16, 2000::/3
    Your global accessable IPv4 address: 62.155.142.69

    What does this data mean and where to put the values in the configuration files:

    Name Value(s) Explanation Which file is related Where to put this value
    IPv4 address of remote 6to4 relay router 194.95.108.191 The IPv4 address of a 6to4 relay tunnel router e.g.
    ifcfg-eth0
    IPV6TO4_RELAY="194.95.108.191"
    Your global accessable IPv4 address 62.155.142.69 Global accessable IPv4 address of your host e.g.
    ifcfg-eth0
    IPV6TO4_IPV4ADDR="62.155.142.69"
    Only needed, if NAT, PPP or other scenarios do not let extract a global IPv4 address automatically from the interface configuration
    Global routable IPv6 address space 3ffe::/16
    2000::/3
    IPv6 address space, which should be routed through this tunnel static-routes-ipv6 See example, one IPv6 address space per line

    The IPv6to4 address in shown example 2002:3e9b:8e45::1/48 will be build automatically by the script.

    Configuration files result in:

    Check:


    6to4 relay tunnel router  connecting one or more subnets to the IPv6 backbone

    If you are enable to connect your tunnel server via 6to4 to the IPv6 backbone like described earlier on this page, it's because of the assigned /48 prefix also possible, to route one or more local connected subnets, too.

    Once you have decided which site prefixes you want to use, you can enstablish local routes of this prefixes through dedicated interfaces.
    E.g. with a choosen site prefix 0:0:0:f101::0/64 on eth0 run route -A inet6 add 2002:d950:2485:f101::0/64 dev eth0. To distribute the prefix, use e.g. radvd. Now clients on this link should also be able to connect to the IPv6 backbone.

    In dial-up scenarios with dynamic local IPv4 address assignment, the described command must be executed every time and also the tunnel must be reconfigured. Therefore I create some scripts which do the job automatically. Also, with a new release of radvd (currently available at http://v6web.litech.org/radvd/), which support automatic recalculation of 6to4 prefixes, you can distribute the new prefix to local LANs.

    Configuration:

    Testing:

    Trigger a dial and take a look into the new created logfile /var/log/ppp-ipv6to4.log

    More information coming next...