IPv6

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by M. B., Jr. (talk | contribs) at 13:59, 1 July 2006 (specifically a protocol standard). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Jump to navigation Jump to search

Internet Protocol version 6 (IPv6) is a network layer IP standard used by electronic devices to exchange data across a packet-switched internetwork. It follows IPv4 as the second version of the Internet Protocol to be formally adopted for general use.

IPv6 is intended to provide more addresses for networked devices, allowing, for example, each cell phone and mobile electronic device to have its own address. IPv4 supports 4.3×109 (4.3 billion) addresses, which is inadequate for giving even one address to every living person, much less support the burgeoning market for connective devices. IPv6 supports 3.4×1038 addresses, or 5×1028(50 octillion) for each of the roughly 6.5 billion people alive today.

Invented by Steve Deering and Craig Mudge at Xerox PARC, IPv6 was adopted by the Internet Engineering Task Force in 1994, when it was called "IP Next Generation" (IPng). (Incidentally, IPv5 was not a successor to IPv4, but an experimental flow-oriented streaming protocol intended to support video and audio.)

As of December 2005, IPv6 accounts for a tiny percentage of the live addresses in the publicly-accessible Internet, which is still dominated by IPv4. The adoption of IPv6 has been slowed by the introduction of network address translation (NAT), which partially alleviates address exhaustion. The U.S. Government has specified that the network backbones of all federal agencies must deploy IPv6 by 2008.[1]

It is expected that IPv4 will be supported alongside IPv6 for the foreseeable future.

Features of IPv6

To a great extent, IPv6 is a conservative extension of IPv4. Most transport- and application-layer protocols need little or no change to work over IPv6; exceptions are applications protocols that embed network-layer addresses (such as FTP or NTPv3).

Larger address space

The main feature of IPv6 is the larger address space: addresses in IPv6 are 128 bits long.

The larger address space avoids the potential exhaustion of the IPv4 address space without the need for NAT and other devices that break the end-to-end nature of Internet traffic.

128 bits might seem overkill to achieve that goal. However, since IPv6 addresses are plentiful, it is reasonable to allocate addresses in large blocks, which makes administration easier and avoids fragmentation of the address space, which in turn leads to smaller routing tables. The current allocation policies allocate 64 bits of address space to an end-user, and 96 bits or more to an organization.

A technical reason for selecting 128-bit for the address length is that since most future network products will be based on 64 bit processors, it is more efficient to manipulate 128-bit addresses. The drawback of the large address size is that IPv6 is less efficient in bandwidth usage, and this may hurt regions where bandwidth is limited.

Another advantage of the larger address space is that it makes scanning certain IP blocks for vulnerabilities significantly more difficult than in IPv4, which makes IPv6 more resistant to malicious traffic.

Stateless autoconfiguration of hosts

IPv6 hosts can be configured automatically when connected to a routed IPv6 network. When first connected to a network, a host sends a link-local multicast (broadcast) request for its configuration parameters; if configured suitably, routers respond to such a request with a router advertisement packet that contains network-layer configuration parameters.

If IPv6 autoconfiguration is not suitable, a host can use stateful autoconfiguration (DHCPv6) or be configured manually.

Stateless autoconfiguration is only suitable for hosts; routers must be configured manually or by other means.

Multicast

Multicast (both on the local link and across routers) is part of the base protocol suite in IPv6. This is in opposition to IPv4, where multicast is optional.

IPv6 multicast is, however, not yet widely deployed across routers.

IPv6 does not have a link-local broadcast facility; the same effect can be achieved by multicasting to the all-hosts group with a hop count of one.

Jumbograms

In IPv4, packets are limited to 64KiB of payload. When used over suitable link layers (for example Myrinet), IPv6 has support for packets over this limit, affectionately known as jumbograms. Use of jumbograms might improve performance over high-throughput networks.

Faster routing

By using a simpler and more systematic header structure, IPv6 was supposed to improve the performance of routing. Recent advances in router technology, however, may have made this improvement obsolete.

Network-layer security

IPsec, the protocol for IP network-layer encryption and authentication, is an integral part of the base protocol suite in IPv6. It is, however, not yet deployed widely except for securing BGP traffic between IPv6 routers.

Addressing

128-bit length

The primary change from IPv4 to IPv6 is the length of network addresses. IPv6 addresses are 128 bits long (as defined by RFC 4291), whereas IPv4 addresses are 32 bits.

IPv6 addresses are typically composed of two logical parts: a 64-bit (sub-)network prefix, and a 64-bit host part, which is either automatically generated from the interface's MAC address or assigned sequentially. Because the globally unique MAC addresses offer an opportunity to track user equipment, and so users, across time and IPv6 address changes, RFC 3041 was developed to reduce the propsect of user identity being permanently tied to an IPv6 address, thus restoring some of the possibilities of anonymity existing at IPv4. RFC 3041 specifies a mechanism by which variable over time random bit strings can be used as interface circuit identifiers, replacing unchanging and traceable MAC addresses.

Notation

IPv6 addresses are normally written as eight groups of four hexadecimal digits. For example, 2001:0db8:85a3:08d3:1319:8a2e:0370:7334 is a valid IPv6 address.

If a four-digit group is 0000, the zeros may be omitted. For example, 2001:0db8:85a3:0000:1319:8a2e:0370:7344 can be shortened as 2001:0db8:85a3::1319:8a2e:0370:7344. Following this rule, any group of consecutive 0000 groups may be reduced to two colons, as long as there is only one double colon used in an address. Thus, the addresses below are all valid and equivalent:

2001:0db8:0000:0000:0000:0000:1428:57ab
2001:0db8:0000:0000:0000::1428:57ab
2001:0db8:0:0:0:0:1428:57ab
2001:0db8:0::0:1428:57ab
2001:0db8::1428:57ab

Having more than one double-colon abbreviation in an address is invalid as it would make the notation ambiguous.

Leading zeros in a group can be omitted. Thus 2001:0db8:02de::0e13 may be shortened to 2001:db8:2de::e13.

A sequence of 4 bytes at the end of an IPv6 address can also be written in decimal, using dots as separators. This notation is often used with compatibility addresses (see below). Thus, ::ffff:1.2.3.4 is the same address as ::ffff:102:304.

Additional information can be found in RFC 4291 - IP Version 6 Addressing Architecture.

Network notation

IPv6 networks are written using CIDR notation.

An IPv6 network (or subnet) is a contiguous group of IPv6 addresses the size of which must be a power of two; the initial bits of addresses which are identical for all hosts in the network are called the network's prefix.

A network is denoted by the first address in the network and the size in bits of the prefix, separated with a slash. For example, 2001:1234:5678:9ABC::/64 stands for the network with addresses 2001:1234:5678:9ABC:: through 2001:1234:5678:9ABC:FFFF:FFFF:FFFF:FFFF

Because a single host can be seen as a network with a 128-bit prefix, you will sometimes see host addresses written followed with /128.

Special addresses

There are a number of addresses with special meaning in IPv6:

  • ::/128 – the address with all zeroes is an unspecified address, and is only to be used in software.
  • ::1/128 – the loopback address is a localhost address. If an application in a host sends packets to this address, the IPv6 stack will loop these packets back to the same host (corresponding to 127.0.0.1 in IPv4).
  • ::/96 – the zero prefix was used for IPv4-compatible addresses (see Transition mechanisms below)
  • ::ffff:0:0/96 – this prefix is used for IPv4 mapped addresses (see Transition mechanisms below)
  • fc00::/7 – Unique Local IPv6 Unicast Addresses are only routable within a set of cooperating sites. They were defined in RFC 4193 as a replacement for site-local addresses (see below). The addresses include a 40-bit pseudorandom number that minimizes the risk of conflicts if sites merge or packets somehow leak out.
  • fe80::/10 – The link-local prefix specifies that the address only is valid in the local physical link. This is analogous to the Autoconfiguration IP address 169.254.x.x in IPv4.
  • fec0::/10 – The site-local prefix specifies that the address is only valid inside the local organisation. Its use has been deprecated in September 2004 by RFC 3879 and future systems must not implement any support for this special type of address anymore.
  • ff00::/8 – The multicast prefix is used for multicast addresses.

There are no address ranges reserved for broadcast in IPv6 — applications are supposed to use multicast to the all-hosts group instead.

IPv6 packet

The structure of an IPv6 packet header.

The IPv6 packet is composed of two main parts: the header and the payload.

The header is in the first 40 octets of the packet and contains both source and destination addresses (128 bits each), as well as the version (4-bit IP version), traffic class (8 bits, Packet Priority), flow label (20 bits, QoS management), payload length (16 bits), next header (8 bits), and hop limit (8 bits, time to live). The payload can be up to 64k in size in standard mode, or larger with a "jumbo payload" option.

Fragmentation is handled only in the sending host in IPv6: routers never fragment a packet, and hosts are expected to use PMTU discovery.

The protocol field of IPv4 is replaced with a Next Header field. This field usually specifies the transport layer protocol used by a packet's payload.

In the presence of options, however, the Next Header field specifies the presence of an extra options header, which then follows the IPv6 header; the payload's protocol itself is specified in a field of the options header. This insertion of an extra header to carry options is analogous to the handling of AH and ESP in IPsec for both IPv4 and IPv6.

IPv6 and the Domain Name System

IPv6 addresses are represented in the Domain Name System by AAAA records (so-called quad-A records) for forward lookups; reverse lookups take place under ip6.arpa (previously ip6.int), where address space is delegated on nibble boundaries. This scheme, which is a straightforward adaptation of the familiar A record and in-addr.arpa schemes, is defined in RFC 3596.

The AAAA scheme was one of two proposals at the time the IPv6 architecture was being designed. The other proposal, designed to facilitate network renumbering, would have had A6 records for the forward lookup and a number of other innovations such as bit-string labels and DNAME records. It is defined in the experimental RFC 2874 and its references (with further discussion of the pros and cons of both schemes in RFC 3364).

IPv6 scope

IPv6 defines 3 unicast address scopes: global, site-local and link-local. Site-local addresses are non-link-local address which are valid within the scope of a "site" and cannot be exported beyond it.

Companion IPv6 specifications further define that only link-local address can be used when generating ICMP Redirect Messages [ND] and as next hop addresses in some routing protocols.

These restrictions do imply that an IPv6 router must have a link-local next hop address for all directly connected routes (routes for which the given router and the next hop router share a common subnet prefix).

IPv6 deployment

In February 1999, The IPv6 Forum was founded by the IETF Deployment WG to drive deployment worldwide creating by now over 30 IPv6 Country Fora and IPv6 Task Forces IPv6 FORUM. On 20 July 2004 ICANN announced[2] that the root DNS servers for the Internet had been modified to support both IPv6 and IPv4.

A global view into the IPv6 routing tables which displays also which ISPs are already deploying IPv6 can be found by looking at the SixXS Ghost Router Hunter pages, these pages display a list of all allocated IPv6 prefixes and giving colors to the ones that are actually being announced in BGP. When a prefix is announced that means that the ISP at least can receive IPv6 packets for their prefix. They might then actually also offer IPv6 services, maybe even to end users/sites directly.

Transition mechanisms

Until IPv6 completely supplants IPv4, which is not likely to happen in the foreseeable future, a number of so-called transition mechanisms are needed to enable IPv6-only hosts to reach IPv4 services and to allow isolated IPv6 hosts and networks to reach the IPv6 Internet over the IPv4 infrastructure.

Dual stack

Since IPv6 is a conservative extension of IPv4, it is relatively easy to write a network stack that supports both IPv4 and IPv6 while sharing most of the code. Such an implementation is called a dual stack, and a host implementing a dual stack is called a dual-stack host. This approach is described in RFC 4213.

Most current implementations of IPv6 use a dual stack. Some early experimental implementations used independent IPv4 and IPv6 stacks. There are no known implementations that implement IPv6 only.

Tunneling

In order to reach the IPv6 Internet, an isolated host or network must be able to use the existing IPv4 infrastructure to carry IPv6 packets. This is done using a technique somewhat misleadingly known as tunnelling which consists in encapsulating IPv6 packets within IPv4, in effect using IPv4 as a link layer for IPv6.

IPv6 packets can be directly encapsulated within IPv4 packets using a protocol number of 41. They can also be encapsulated within UDP packets e.g. in order to cross a router or NAT device that blocks protocol 41 traffic. They can of course also use generic encapsulation schemes, such as AYIYA or GRE.

Automatic tunneling

Automatic tunneling refers to a technique where the tunnel endpoints are automatically determined by the routing infrastructure. The recommended technique for automatic tunneling is 6to4[3] tunneling, which uses protocol 41 encapsulation. Tunnel endpoints are determined by using a well-known IPv4 anycast address on the remote side, and embedding IPv4 address information within IPv6 addresses on the local side. 6to4 is widely deployed today.

Teredo [4] is an automatic tunneling technique that uses UDP encapsulation and is claimed to be able to cross multiple NAT boxes. Teredo is not widely deployed today, but an experimental version of Teredo is installed with the Windows XP SP2 IPv6 stack and Teredo will reportedly be enabled by default in Windows Vista [5].

Configured tunneling

Configured tunneling is a technique where the tunnel endpoints are configured explicitly, either by a human operator or by an automatic service known as a Tunnel Broker[6]. Configured tunneling is usually more deterministic and easier to debug than automatic tunneling, and is therefore recommended for large, well-administered networks.

Configured tunneling typically uses either protocol 41 (recommended) or raw UDP encapsulation.

Proxying and translation

When an IPv6-only host needs to access an IPv4-only service (for example a web server), some form of translation is necessary. The one form of translation that actually works is the use of a dual-stack application-layer proxy, for example a web proxy.

Techniques for application-agnostic translation at the lower layers have also been proposed, but they have been found to be too unreliable in practice due to the wide range of functionality required by common application-layer protocols, and are commonly considered to be obsolete. See for example SIIT[7], NAT-PT[8], TCP-UDP Relay[9], Socks-based Gateway[10], Bump-in-the-Stack or Bump-in-the-API[11].

See also

Major IPv6 announcements

  • In 2003, Nihon Keizai Shimbun (as cited in CNET Asia Staff, 2003) reported that Japan, China, and South Korea claimed to have made themselves determined to become the leading nations in Internet technology, which would partially take the form of jointly developing IPv6, and completely adopting IPv6 starting in 2005.
  • ICANN announced on 20 July 2004 that the IPv6 AAAA records for the Japan (.jp) and Korea (.kr) country code Top Level Domain (ccTLD) nameservers became visible in the DNS root server zone files with serial number 2004072000. The IPv6 records for France (.fr) were added a little later. This made IPv6 operational in a public fashion.
  • 6bone IPv6 Backbone (EOL=June 6, 2006)
  • ipng IP Next Generation (concluded)
  • ipv6 IP Version 6
  • ipv6mib IPv6 MIB (concluded)
  • multi6 Site Multihoming in IPv6
  • shim6 Site Multihoming by IPv6 Intermediation
  • v6ops IPv6 Operations

Further reading

Core specifications

  • RFC 2460: Internet Protocol, Version 6 (IPv6) Specification (obsoletes RFC 1883)
  • RFC 2461/4311: Neighbor Discovery for IP Version 6 (IPv6) (4311 updates)
  • RFC 2462: IPv6 Stateless Address Autoconfiguration
  • RFC 4443: Internet Control Message Protocol (ICMPv6) for the IPv6 Specification (obsoletes RFC 2463)
  • RFC 2464: Transmission of IPv6 Packets over Ethernet Networks
  • RFC 4291: Internet Protocol Version 6 (IPv6) Addressing Architecture (obsoletes RFC 3513)
  • RFC 3041: MAC address use replacement option
  • RFC 3587: An IPv6 Aggregatable Global Unicast Address Format

Stateless autoconfiguration

  • RFC 2461: Neighbor Discovery for IP Version 6 (IPv6)
  • RFC 2462: IPv6 Stateless Address Autoconfiguration

Programming

  • RFC 3493: Basic Socket Interface Extensions for IPv6 (obsoletes RFC 2553)
    • see getaddrinfo for an example of client/server programming in an IPv4/IPv6 independent manner using some of RFC 3493 extensions
  • RFC 3542: Advanced Sockets Application Program Interface (API) for IPv6 (obsoletes RFC 2292)
  • RFC 4038: Application Aspects of IPv6 Transition

Books

There are a number of IPv6 books:

Misc

Address Space

Software (Operating Systems + Applications)

Template:Link FA