Note: This content is accessible to all versions of every browser. However, this browser may not support basic Web standards, preventing the display of our site's design details. We support the mission of the Web Standards Project in the campaign encouraging users to upgrade their browsers.
Monday, September 27, 2004 09:00 // Sane 2004, RAI, Amsterdam, Netherlands // href
A tutorial by Joost van Dijk.
About the IPv6 Header
It is much simpler than the IPv4 header. It has a fixed length of 40 Bytes.
Rule 1: Make the frequent case fast
Complex things like fragmentation are handled with extension headers. Because IPv6 routers do not do fragmentation anyway they can do with just looking at the base header. Fragmentation happens in the sending host. The sender uses Path MTU discovery.
With the flow label in the header, The router can see which packets belong together without looking into the packets themselves.
Extension headers can be inserted between the IPv6 header and the payload data. These extension headers come in a predefined order. This order again ensures that the routers only have to look at the first few extension headers because only they can contain information relevant to a router.
Each header has a field called next header which defines the type of the next header.
Implementations
Most current OSes and routers support IPv6. Since Windows XP SP2 there is a production quality IPv6 implementation for Windows as well. The first prototypes were available as a separate downloads from MS.
Enabling it on Windows XP SP2
netsh interface ipv6 install
IPv6 addressing
The first few bits of an IPv6 address define the type of the address. Every IPv6 interface has a link local address (private local address space).
Addresses are written as 8 colon separated tuples of 4 hex digits.
One sequence of zeros can be abbreviated to a double ::
2001:0000:0000:0000:0000:3233:da33:3ad3 becomes 2001::3233:da33:3ad3
The loop back address is ::1
Global Unicast Addresses are built like this
001 - 3 bit Top Level Aggregator (eg. RIPE) - 13 Bit Reserved (these bits could be added the TLA or NLA field in the future) - 8 Bit Next Level Aggregator (ISP) - 24 Bit Site Level Aggregator (Subnet) - 16 Bit Interface Address - 64 Bit
RFC 3587 obsoleted this format recently. In the future, the toplevel registrars will decide where the borders are.
Because of the hierarchical nature of addressing the routing tables will become much shorter for IPv6 routing.
Currently only 3 TLAs are defined. Today most new addresses are from the 2001:: Sub-TLA Assignment range. There you get 13 bit sub TLA and 19 bit NLA.
The 48 bit Ethernet addresses can be mapped to the 64 bit IPv6 interface address: (first 24 bit, FFFE, last 24 bit) this is not required though. You can use a random number. Just make sure you get no duplicates.
Addresses starting with 0 ending with an IPv4 address can be used for automatic tunneling.
Current versions of the host dns lookup tool will find IPv6 addresses and it will do reverse lookups automatically when given a numeric address.
Multicast addresses
They start with "FF" there are some well known addresses like
ff02::1 - all nodes on the link
ff02::2 - all routers on the link
ff05::1:3 - All DHCP server at this site
There is a special entry in the routing table for multicast FF00::/8.
ping -c 2 -I eth0 ff02::1 will find all hosts on the local link.
In IPv6 there is a new version of the ICMP protocol (known from ping) it is now also used for ARP and multi cast group membership management.
Get the IPv6 routing table on Linux
route -A inet6
or use the shortcut notation
route -6
Getting an IPv6 address in IPv4 land through tunneling
On way, is to use 6to4. (tldp.org ...) Note that the gateway 192.88.99.1 is a global any-cast address which will automatically go to the closest IPv6 gateway. The 6to4 approach requires you to have a public IPv4 address on your machine or a NAT gateway which can do protocol 41 NAT (protocol 41 is used for 6to4 tunneling)
The new Teredo protocol allows even boxes behind a NAT gateway to get connected to IPv6. Windows XP SP2 has this feature built in. On Linux there is an implementation called miredo which can do the same.
Content © by Tobias Oetiker