ONLamp.com
oreilly.comSafari Books Online.Conferences.

advertisement


Connecting to the IPv6 Internet
Pages: 1, 2

Setting the Tunnel and Connecting a Single Host

We will demonstrate how to set up your Linux host to connect to the IPv6 Internet using Freenet6 TSP. We assume that your already meet the requirements previously presented. My own test installation used Fedora Core.



To proceed with the installation and configuration please follow these steps:

  • Enable IPv6 support.

    In my case, I am loading the IPv6 module.

    [root@fedora-core bin]# insmod ipv6
    Using /lib/modules/2.4.22-1.2115.nptl/kernel/net/ipv6/ipv6.o

    When I check the status on my network device, I can see that IPv6 support is enabled.

    [root@fedora-core bin]# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:B0:D0:A4:A9:FA
              inet6 addr: fe80::2b0:d0ff:fea4:a9fa/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1547 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1424 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1319368 (1.2 Mb)  TX bytes:181558 (177.3 Kb)
              Interrupt:10 Base address:0xfc00
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:2348 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2348 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1672742 (1.5 Mb)  TX bytes:1672742 (1.5 Mb)
    
    ppp0      Link encap:Point-to-Point Protocol
              inet addr:67.69.185.115  P-t-P:64.230.254.136  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
              RX packets:1478 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1349 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3
              RX bytes:1282448 (1.2 Mb)  TX bytes:147037 (143.5 Kb)
  • Register a Freenet6 user account.

    Registering a user account is mandatory when you need to receive a permanent IPv6 address for your Linux host that can keep the IPv6 address, although the IPv4 address changes. To register a user account, go to Freenet6's registration page and provide a user name and your email address. Freenet6 will generate a password for you and email it to the address you provided.

    Once you fill out the form and submit it, you will receive a confirmation similar to the one below:

    User Account Creation Succeed
    Userid (account) created : 'username'.
    A new password generated randomly by the system has been sent to
        username@example.com

    The email you receive few seconds later from Freenet6 will look like this:

    <Your account has been created on the Migration Broker>
    User id: username
    Password: XXXXXXXXXX
    Email address registred: username@example.com
    
    Note: Use these values with TSP client to get your IPv6 connectivity.
    </Your account has been created on the Migration Broker>
    
    <CUT AND PASTE TO TSPC.CONF>
    #
    userid=username
    passwd=XXXXXXXX
    #
    </CUT AND PASTE TO TSPC.CONF>
  • Download and install the TSP client.

    Download the latest TSP package that corresponds to your Linux distribution. I will be using freenet6-0.9.8.tgz. However, you can download either the binary package or the RPM package if you like. For the remainder of the tutorial I will be using freenet6-0.9.8.tgz to demonstrate the procedure. Please replace this with the package name you downloaded for your specific system.

    After you download the package (say, into /tmp), you need to install it:

    [root@fedora-core tmp]# tar -xzf freenet6-0.9.8.tgz

    This will unpack the source package for the Freenet6 TSP. Next, you need to switch to that directory and compile and build the binaries.

    [root@fedora-core tmp]# cd freenet6-0.9.8 
    [root@fedora-core freenet6-0.9.8]# make install target=linux
    	installdir=/usr/local/tsp

    This command will start the compilation process on a Linux machine, specified by the target=linux directive, and will automatically install the binaries in /usr/local/tsp, the destination directory. You can change this to a directory of your choice.

  • Edit the TSP client configuration file.

    tspc.conf is located under the installation directory, /usr/local/tsp/bin by default. It controls the configuration of the TSP client. You need to edit it and add your registered user ID and password, as you received them from Freenet6 by email.

    <CUT AND PASTE TO TSPC.CONF>
    #
    userid=username
    passwd=XXXXXXXX
    #
    </CUT AND PASTE TO TSPC.CONF>
  • Start the tspc client.

    You are now ready to start using the TSP client to create an IPv6-over-IPv4 tunnel to the IPv6 Internet.

    [root@fedora-core root]# cd /usr/local/tsp/
    [root@fedora-core bin]# ./tspc -vf tspc.conf
    tspc - Tunnel Server Protocol Client
    Loading configuration file
    Connecting to server
    Using [67.69.185.115] as source IPv4 address.
    Send request 
    Process response from server
    TSP_HOST_TYPE                   host
    TSP_TUNNEL_INTERFACE            sit1
    TSP_HOME_INTERFACE
    TSP_CLIENT_ADDRESS_IPV4         67.69.185.115
    TSP_CLIENT_ADDRESS_IPV6         3ffe:0bc0:8000:0000:0000:0000:0000:1bf9
    TSP_SERVER_ADDRESS_IPV4         206.123.31.115
    TSP_SERVER_ADDRESS_IPV6         3ffe:0bc0:8000:0000:0000:0000:0000:1bf8
    TSP_TUNNEL_PREFIXLEN             128
    TSP_VERBOSE                      1
    TSP_HOME_DIR                     /usr/local/tsp
    --- Start of configuration script. ---
    Script:  linux.sh
    sit1 setup
    Setting up link to 206.123.31.115
    This host is: 3ffe:0bc0:8000:0000:0000:0000:0000:1bf9/128
    Adding default route
    --- End of configuration script. ---
    Exiting with return code : 0 (0 = no error)
    [root@fedora-core bin]#

The -v flag in the command line indicates the verbose mode, which lets you see exactly what is happening during the process. Let's examine the network interfaces after successfully establishing the tunnel:

[root@fedora-core bin]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:B0:D0:A4:A9:FA
          inet6 addr: fe80::2b0:d0ff:fea4:a9fa/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1635 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1516 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1327322 (1.2 Mb)  TX bytes:189687 (185.2 Kb)
          Interrupt:10 Base address:0xfc00
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2348 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2348 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1672742 (1.5 Mb)  TX bytes:1672742 (1.5 Mb)
 
ppp0      Link encap:Point-to-Point Protocol
          inet addr:67.69.185.115  P-t-P:64.230.254.136  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1554 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1429 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1288010 (1.2 Mb)  TX bytes:152686 (149.1 Kb)
 
sit1      Link encap:IPv6-in-IPv4
          inet6 addr: fe80::4345:b973/64 Scope:Link
          inet6 addr: 3ffe:bc0:8000::1bf9/128 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1472  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:72 (72.0 b)  TX bytes:0 (0.0 b)
[root@fedora-core bin]# 

The tunnel interface is sit1. The global IPv6 address assigned to this interface is 3ffe:bc0:8000::1bf9 and the local scope IPv6 address is fe80::4345:b973. The ppp0 interface is my xDSL connection providing me with an IPv4 address and a connection to the Internet.

The easiest way to test your connection is to ping6 some web sites that support IPv6.

[root@fedora-core bin]# ping6 www.6bone.net
PING www.6bone.net(www.6bone.net) 56 data bytes
64 bytes from www.6bone.net: icmp_seq=0 ttl=62 time=60.1 ms
64 bytes from www.6bone.net: icmp_seq=1 ttl=62 time=59.8 ms
64 bytes from www.6bone.net: icmp_seq=2 ttl=62 time=48.1 ms
64 bytes from www.6bone.net: icmp_seq=3 ttl=62 time=49.1 ms
64 bytes from www.6bone.net: icmp_seq=4 ttl=62 time=75.3 ms
 
--- www.6bone.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 80932ms
rtt min/avg/max/mdev = 48.185/58.530/75.303/9.807 ms, pipe 2
[root@fedora-core bin]#

[root@fedora-core bin]# ping6 www.kame.net
PING www.6bone.net(www.6bone.net) 56 data bytes
64 bytes from www.6bone.net: icmp_seq=0 ttl=62 time=63.7 ms
64 bytes from www.6bone.net: icmp_seq=1 ttl=62 time=60.5 ms
64 bytes from www.6bone.net: icmp_seq=2 ttl=62 time=57.4 ms
64 bytes from www.6bone.net: icmp_seq=3 ttl=62 time=47.2 ms
64 bytes from www.6bone.net: icmp_seq=4 ttl=62 time=50.8 ms
                                                                                                 
--- www.6bone.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 80980ms
rtt min/avg/max/mdev = 47.265/55.972/63.749/6.092 ms, pipe 2
[root@fedora-core bin]# 

Conclusion

In this article, we demonstrated how to connect your Linux machine to the IPv6 Internet using the Freenet6 service. In an upcoming article, we'll show you how to connect a full network to the IPv6 Internet using a Linux machine as a router. Stay tuned!

Ibrahim Haddad is the Director of Technology for the Software Operations Group (Home & Network Mobility Business Unit) at Motorola Inc.


Return to the LinuxDevCenter.com.



Sponsored by: