IPv6
ContentsBRTableOfContents(2) |
IPv6 Introduction
IPv6 (also known as IPng “IP next generation”) is the new version of the well known IP protocol (also known as IPv4). Your Ubuntu system comes with all you will need to experiment with IPv6. This section focuses on getting IPv6 properly configured and running.
In the early 1990s, people became aware of the rapidly diminishing address space of IPv4. Given the expansion rate of the Internet there were two major concerns:
Running out of addresses. Today this is not so much of a concern anymore since RFC1918 private address space (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) and Network Address Translation (NAT) are being employed.
Router table entries were getting too large. This is still a concern today.
IPv6 deals with these and many other issues:
- 128 bit address space. In other words theoretically there are 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses available. This means there are approximately 6.67 * 10^27 IPv6 addresses per square meter on our planet.
- Routers will only store network aggregation addresses in their routing tables thus reducing the average space of a routing table to 8192 entries.
There are also lots of other useful features of IPv6 such as:
- Address autoconfiguration (RFC2462)
- Anycast addresses (“one-out-of many”)
- Mandatory multicast addresses
- IPsec (IP security)
- Simplified header structure
- Mobile IP
- IPv6-to-IPv4 transition mechanisms
For more information see:
- IPv6 overview at playground.sun.com
- KAME.net
Background on IPv6 Addresses
There are different types of IPv6 addresses: Unicast, Anycast and Multicast.
Unicast addresses are the well known addresses. A packet sent to a unicast address arrives exactly at the interface belonging to the address.
Anycast addresses are syntactically indistinguishable from unicast addresses but they address a group of interfaces. The packet destined for an anycast address will arrive at the nearest (in router metric) interface. Anycast addresses may only be used by routers.
Multicast addresses identify a group of interfaces. A packet destined for a multicast address will arrive at all interfaces belonging to the multicast group.
Note: The IPv4 broadcast address (usually xxx.xxx.xxx.255) is expressed by multicast addresses in IPv6.
Reserved IPv6 addresses
IPv6 address Prefixlength (Bits) Description Notes :: 128 bits unspecified cf. 0.0.0.0 in IPv4 ::1 128 bits loopback address cf. 127.0.0.1 in IPv4 ::00:xx:xx:xx:xx 96 bits embedded IPv4 The lower 32 bits are the IPv4 address. Also called “IPv4 compatible IPv6 address” ::ff:xx:xx:xx:xx 96 bits IPv4 mapped IPv6 address The lower 32 bits are the IPv4 address. For hosts which do not support IPv6. fe80:: - feb:: 10 bits link-local cf. loopback address in IPv4 fec0:: - fef:: 10 bits site-local ff:: 8 bits multicast 001 (base 2) 3 bits global unicast All global unicast addresses are assigned from this pool. The first 3 bits are “001”.
Reading IPv6 Addresses
The canonical form is represented as: x:x:x:x:x:x:x:x, each “x” being a 16 Bit hex value. For example FEBC:A574:382B:23C1:AA49:4592:4EFE:9982
Often an address will have long substrings of all zeros therefore one such substring per address can be abbreviated by “::”. Also up to three leading “0”s per hexquad can be omitted. For example fe80::1 corresponds to the canonical form fe80:0000:0000:0000:0000:0000:0000:0001.
A third form is to write the last 32 Bit part in the well known (decimal) IPv4 style with dots “.” as separators. For example 2002::10.0.0.1 corresponds to the (hexadecimal) canonical representation 2002:0000:0000:0000:0000:0000:0a00:0001 which in turn is equivalent to writing 2002::a00:1.
By now the reader should be able to understand the following:
# ifconfig
eth0 Link encap:Ethernet HWaddr ee:ff:ee:ff:ee:ff inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2001:eeff:eeff::1/64 Scope:Global inet6 addr: fe80::eeff:eeff:eeff:e5a7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:33785 errors:0 dropped:0 overruns:0 frame:0 TX packets:33768 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23272619 (22.1 MB) TX bytes:21928501 (20.9 MB) Base address:0xb800 Memory:f2000000-f2020000
fe80::eeff:eeff:eeff:e5a7 of interface eth0 is an auto configured link-local address. It is generated from the MAC address as part of the auto configuration.
For further information on the structure of IPv6 addresses see [http://www.ietf.org/rfc/rfc3513.txt RFC3513].
Copyright Notice
The IPv6 introduction was largely copied and modified from the FreeBSD Handbook. Copyright © 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The FreeBSD Documentation Project.