IPv6-Over-IPv4 Tunnels


During the transition period from IPv4 to IPv6, there are going to be occasions where two hosts on a network are configured with IPv6 addresses, but the intervening hosts and routers are part of an IPv4 network. This section describes how to use a tunnel to overcome this problem.

What Is an IPv6-Over-IPv4 Tunnel?

An IPv6-over-IPv4 tunnel is a mechanism by which IPv6 datagrams can be transported over an IPv4 network. The sender and the receiver both support IPv6 (and IPv4), but the hosts and routers along the path the datagram takes support only IPv4. As an example, consider encryption as an analogy. Only the sender and the intended recipient know how to get at the data, such as your credit card details. While this sensitive information is transported across the Internet, for example, the actual data is not accessible and is passed on to the destination, where it is extracted correctly. With an IPv6-over-IPv4 tunnel, the data is encapsulated into IPv4 datagrams at the sender side, and then transported across the network as normal IPv4 datagrams are. When the datagram reaches the destination, the IPv6 data is extracted (decapsulated).

Configuring a Tunnel

This section describes how to configure an IPv6-over-IPv4 tunnel between two hosts ( ultra10 and systema ), each having an hme0 network interface.

The following steps describe how to create the tunnel.

  1. A new IPv4 logical interface needs to be configured on both systems. On the host ultra10 , enter the following:

     ultra10# ifconfig hme0 addif 192.168.23.23 up Created new logical interface hme0:1 

    On the host systema enter the following:

     systema# ifconfig hme0 addif 192.168.24.24 up Created new logical interface hme0:1 
  2. On host ultra10 , define the IPv6 tunnel and then configure it to join the two IPv4 logical interfaces just created, as follows :

     ultra10# ifconfig ip.tun0 inet6 plumb ultra10# ifconfig ip.tun0 inet6 tsrc 192.168.23.23 tdst 192.168.24.24 up 

    The first command creates the tunnel and the second line configures it with the source and destination IP addresses.

    graphics/note_icon.gif

    The initialization and configuration of the IPv6-over-IPv4 tunnel could be carried out in one step by doing the following:

     ultra10# ifconfig ip.tun0 inet6 plumb tsrc 192.168.23.23 tdst \ 192.168.24.24 up 

  3. On host systema , define the IPv6 tunnel and then configure it to join the two IPv4 logical interfaces just created. This time the source and destination addresses are swapped because the tunnel is being created at the other end:

     systema# ifconfig ip.tun0 inet6 plumb systema# ifconfig ip.tun0 inet6 tsrc 192.168.24.24 tdst 192.168.23.23 up 

    The first command creates the tunnel and the second line configures it with the source and destination IP addresses.

  4. The tunnel is now created and can be verified by running the ifconfig -a command. The following output shows the result of running this command on the host ultra10 :

     ultra10# ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1         inet 127.0.0.1 netmask ff000000 hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 \ index 2         inet 192.168.23.28 netmask ffffff00 broadcast 192.168.23.255         ether 8:0:20:b3:41:53 hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 \ index 2         inet 192.168.23.23 netmask ffffff00 broadcast 192.168.23.255 ip.tun0: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> \ mtu 1480 index 3         inet tunnel src 192.168.23.23   tunnel dst 192.168.24.24         inet6 fe80::c0a8:1717/10 --> fe80::c0a8:1818 

    Notice that both the tunnel source and tunnel destination have been automatically configured with IPv6 addresses. The IPv6 addresses will be used for communiation between the two hosts when utilizing the tunnel, but the IPv4 addresses will be used to actually transport the data across the IPv4 network.

  5. Verify the tunnel is working by issuing a ping command to the tunnel destination (IPv6 address fe80::c0a8:1818 ) as follows:

     ultra10# ping fe80::c0a8:1818 fe80::c0a8:1818 is alive 
graphics/note_icon.gif

A tunnel is removed like any other network interface. The following ifconfig command would remove the tunnel ip.tun0 :

 ultra10# ifconfig ip.tun0 inet6 down unplumb 

Routing Between Tunnels

When an IPv6-over-IPv4 tunnel is configured, the routing entry is automatically added to the routing table. Verify that the routing is correct by issuing the following command:

 ultra10# netstat -r -f inet6 Routing Table: IPv6   Destination/Mask         Gateway           Flags Ref   Use   If ------------------------ ------------------- ----- --- ------ ----- fe80::c0a8:1818          fe80::c0a8:1717     UH      1      1 ip.tun0 

Notice that the -f inet6 argument was used when running the netstat command to show only IPv6 routing entries.



Solaris 9 Network Administration Exam Cram 2 (Exam Cram CX-310-044)
Solaris 9 Network Administrator Exam Cram 2 (Exam CX-310-044)
ISBN: 0789728702
EAN: 2147483647
Year: 2003
Pages: 174
Authors: John Philcox

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net