IPv6-in-IPv4 Tunnel: Tipe tunnel

From OnnoWiki
Revision as of 09:27, 22 June 2013 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Ada banyak kemungkinan tunnel paket IPv6 di link IPv4.

Static point-to-point tunneling: 6bone

Sebuah tunnel point-to-point adalah sebuah tunnel dedicated ke sebuah endpoint, yang mengetahui tentang IPv6 network kita (untuk backward routinng) dan IPv4 address dari tunnel endpoint dan di definisikan di RFC 2893 / Transition Mechanisms for IPv6 Hosts and Routers. Kebutuhan:

  • Address IPv4 address dari endpoint harus statik, unik secara global dan harus dapat di hubungi dari tunnel endpoint yang satunya.
  • Sebuah prefix IPv6 yang dialokasikan ke kita.
  • Sebuah endpoint tunnel yang mampu untuk melakukan routing IPv6 prefix ke tunnel endpoint kita.

Automatically tunneling

Tunneling secara automatis akan terjadi, ketika sebuah node tersambung secara langsung ke node lain dan mendapat adress IPv4 dari node sebelumnya.


6to4-Tunneling

6to4 tunneling (RFC 3056 / Connection of IPv6 Domains via IPv4 Clouds) menggunakan mekanisme sederhana untuk membuat automatik tunnel. Setiap npde dengan global unik IPv4 address mampu untuk menjadi endpoint 6to4 tunnel (jika tidak ada firewall IPv4 yang menghalanginya).


6to4 tunneling is mostly not a one-to-one tunnel. This case of tunneling can be divided into upstream and downstream tunneling. Also, a special IPv6 address indicates that this node will use 6to4 tunneling for connecting the world-wide IPv6 network

Generation of 6to4 prefix

The 6to4 address is defined like following (schema is taken from RFC 3056 / Connection of IPv6 Domains via IPv4 Clouds):

|   3+13   |    32     |    16  |            64 bits             | 
+---+------+-----------+--------+--------------------------------+ 
|  FP+TLA  |  V4ADDR   | SLA ID |           Interface ID         | 
|  0x2002  |           |        |                                | 
+---+------+-----------+--------+--------------------------------+

FP and TLA together (16 bits) have the value 0x2002. V4ADDR is the node's global unique IPv4 address (in hexadecimal notation). SLA is the subnet identifier (65536 local subnets possible) and are usable to represent your local network structure.

For gateways, such prefix is generated by normally using SLA “0000” and suffix “::1” (not a must, can be an arbitrary one with local-scope) and assigned to the 6to4 tunnel interface. Note that Microsoft Windows uses V4ADDR also for suffix.

6to4 upstream tunneling

The node has to know to which foreign tunnel endpoint its in IPv4 packed IPv6 packets should be send to. In “early” days of 6to4 tunneling, dedicated upstream accepting routers were defined. See NSayer's 6to4 information for a list of routers.

Nowadays, 6to4 upstream routers can be found auto-magically using the anycast address 192.88.99.1. In the background routing protocols handle this, see RFC 3068 / An Anycast Prefix for 6to4 Relay Routers for details.

6to4 downstream tunneling

The downstream (6bone -> your 6to4 enabled node) is not really fix and can vary from foreign host which originated packets were send to. There exist two possibilities:

  • Foreign host uses 6to4 and sends packet direct back to your node (see below)
  • Foreign host sends packets back to the world-wide IPv6 network and depending on the dynamic routing a relay router create a automatic tunnel back to your node.

Possible 6to4 traffic

  • dari 6to4 ke 6to4: is normally directly tunneled between the both 6to4 enabled hosts
  • dari 6to4 ke non-6to4: is sent via upstream tunneling
  • non-6to4 ke 6to4: is sent via downstream tunneling