IPv6 addresses are 128 bits long and, like IPv4, use three types of addresses, but they are not the same three types. IPv6 uses the following basic address types:
How IPv6 Addresses Are RepresentedEach IPv6 address is divided into 8 octets, each consisting of 16 bits. An IPv6 address is written in hexadecimal, with each octet being separated by the colon (:) character. The general format is nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn where each nnnn group of characters represents four hexadecimal digits (16 bits). An example of an IPv6 address is fe80:0000:0000:0000:0a00:20ff:feb3:4153 An IPv6 address can be written a number of ways because consecutive zeros can be shortened . The preceding address can be written in these ways:
Format Prefixes (FP)A format prefix at the beginning of each IPv6 address specifies the type of IPv6 address that is being used. Table 7.1 identifies some of the common format prefixes in use. Table 7.1. Common IPv6 Format Prefixes
You might also see an IPv6 address written as follows : fe80:0000:0000:0000:0a00:20ff:feb3:4153/10 The /10 at the end of the address signifies that 10 bits have been used to identify the address type. This is the format prefix, also known as the IPv6 subnet prefix. As you can see from Table 7.1, the address starts with fe8 and is a unicast link-local address. When an address is specified with the format prefix attached, it is known as prefix notation . Unicast AddressesThe unicast address type is used to send IP datagrams to a single host, or interface. A number of unicast address types that each serve a particular purpose are described in the following sections. Link-LocalThe link-local address is intended to be used only on local network links; that is, a system using this kind of address can send IPv6 datagrams only to another system on the same physical network. A router will not forward this type of packet onto another network. Site-LocalThe site-local address is very similar to the link-local address, but can be forwarded (routed) through an internal intranet. The limit for this kind of address is the site rather than the same physical network. Aggregatable GlobalThe aggregatable global address type is used for global communications, such as across the Internet. Aggregatable global addresses contain a hierarchical structure of identifiers, as follows:
Embedded IPv4 AddressThe transition to IPv6 is going to take many years , so a mechanism was necessary to allow IPv6 and IPv4 to work together while the migration to IPv6 carries on. IPv6 systems that use this mechanism use a special IPv6 unicast address, called an IPv4-mapped IPv6 address , that can accommodate an IPv4 address in the lower 32 bits of the address. This address is used to represent an IPv4 address within an IPv6 address space. The general format of an IPv4-mapped IPv6 address is 0000:0000:0000:0000:0000:FFFF:X.X.X.X where
As an example, the embedded IPv4 address 192.168.28.28 would appear as the following IPv6 address: 0000:0000:0000:0000:0000:FFFF:192.168.28.28 Additionally, an IPv4 “compatible-IPv6 address consists of the first 96 bits being all zero, followed by the 32-bit IPv4 address, again in decimal dot notation. This address is used by hosts and routers to transfer IPv6 packets on an IPv4 infrastructure. Unspecified Address TypeThe unspecified address type is used when the sending system does not have an IP address assigned, such as when a diskless client starts up. The address consists of all zeros and can be represented as follows:
Loopback Address TypeAn IPv6 system, like an IPv4 system, uses a loopback address to send datagrams to itself. The IPv6 loopback address is shown in the three representations as follows:
This is equivalent to the IPv4 address 127.0.0.1 . Multicast AddressesThe multicast address is used to address a number of hosts simultaneously . All hosts (or interfaces) that belong to the same multicast group receive the message. Multicast addresses include a 4-bit field, called scope bits , that determines how far a multicast IPv6 datagram is routed. The contents of the first octet of the IPv6 multicast address determines the "scope" of the datagram. The format prefix for multicast addresses is FF . The next 4-bit field is used for flags that are normally set to zero. The final 4-bit field is the scope where:
As an example, the IPv6 multicast address to send a datagram to all NTP servers located on the same site is FF05:0:0:0:0:0:0:101 Anycast AddressesThe anycast address is an IPv6 address that is assigned to more than one interface. A packet sent to an anycast address is received only by the nearest interface that has the address assigned to it ”nearest being interpreted by the routing protocol being used. (RIP, for example, would select the interface that can be reached in the fewest hops.) Anycast IPv6 addresses are assigned from the unicast address space, so as soon as you assign a unicast address to more than one interface, it automatically becomes an anycast address. |