2.4 IPv6
The parts of a global address are as follows:
- The first 3 bits (001) indicate that the address is within the global scope. Most of the IPv6 address space is unused. The scope for globally unique unicast addressing occupies just 1/8th of the total address space. In hex, globally scoped unicast addresses will start with a 2 (0010) or 3 (0011).
The parts of a global address are as follows(Continued):
- The next 45 bits are allocated in a hierarchical manner to regional registries and from them to ISPs and end users. - The next 16 bits identify site-specific subnet addresses. - The final 64 bits are the interface ID.
The parts of a multicast are subdivided as follows: -The first 8 bits indicate that the address is within the multicast scope (11111111 or ff). -The next 4 bits are used to flag types of multicast if necessary (they are set to 0 otherwise).
-The next 4 bits are used to flag types of multicast if necessary (they are set to 0 otherwise). -The next 4 bits determine the scope; for example, 1 is node-local (to all interfaces on the same node) while 2 is link-local. -The final 112 bits define multicast groups within that scope.
IPv6 address comprise eight 16-bit numbers (double-byte) with each double-byte number expressed in hex. For example:
2001:0db8:0000:0000:0abc:0000:def0:1234
Where IPv6 addresses are used as part of a URI (web address), as both formats use colon delimiters to mean different things, the IPv6 address must be contained within square brackets. For example:
http://[2001:db::abc:0:def0:1234]/index.htm
In IPv6, the interface identifier is always the last 64 bits;
the first 64 bits are used for network addressing
...is not valid as it is ambiguous between:
2001:db8:0000:0abc:0000:0000:def0:1234 and 2001:db8:0000:0000:0abc:0000:def0:1234
Even this is quite cumbersome, so where a double-byte contains leading zeroes, they can be ignored. In addition, one contiguous series of zeroes can be replaced by a double colon place marker. Thus the address above would become:
2001:db8::abc:0:def0:1234
Note that you can only use double colon compression once in a given address. For example:
2001:db8::abc::def0:1234
Multicast Addressing
A multicast address identifies multiple network interfaces. Unlike IPv4, IPv6 routers must support multicast.
IPv6 Addressing Schemes
An IPv6 address is divided into two main parts: the first 64 bits are used as a network ID while the second 64 bits designate a specific interface.
Anycast Addressing An anycast address also identifies multiple addresses.
Anycast is used where a message must be sent to any member of a group but not necessarily to all of them. The packet is sent to the member of the group physically closest to the transmitting host. Anycast is principally used for routing protocol traffic.
The interface ID can be determined using two techniques. One is by using the client computer's network interface MAC address. This is known as MAC-derived address or interface identifier.
As a MAC address is currently 48 bits (6 bytes), a (relatively) simple translation mechanism allows driver software to create a 64 bit interface ID (an EUI-64) from these 48 bits.
Despite being in development for well over a decade. IPv6 has still not been widely deployed.
But as the problems with existing IPv4 solutiions multiply, the next couple of years are almost certain to see IPv6 become the mainstream for corporate networks and the web.
As well as coping with the growth in ordinary company networks and internet access subscribers, IPv6 is designed to meet the demands of billions of handheld and personal devices with internet connectivity.
Currently, that principally means phones but the designers of IPv6 envisage a world of wireless internet connectivity for a huge range of appliances. For example, an advertising hoarding could be made "active" so you can link to the product via your phone.
A link-local address is also appended with a zone index (or scope_id) of the form %1 (Windows) or %eth0 (Linux). This is used to define the source of the address and make it unique to a particular link. For example, a given host may have links to a loopback address, Ethernet , and a VPN.
Each of these links may use the same link-local address, so each is assigned a zone ID to make it unique. Zone indices are generated by the host system, so where two hosts communicate, they may be referring to the link using different zone IDs.
IPv6 (also called IP Next Generation or IPng) provides a long-term solution to the problem of address space exhaustion. Its 128- bit addressing scheme has space for 340 undecillion unique addresses.
Even though only a small part of the scheme can currently be allocated to hosts, there is still enough address space within that allocation for every person on the planet to "own" approximately 4000 addresses.
The conversion mechanism is defined in RFC 4291. Essentially, the digits fffe are added in the middle of the address and the U/L bit is flipped.
For example, the MAC address 00608c123abc would become the EUI-64 address 02608cffe123abc, or more accurately 260:8cff:fe12:3abc (dropping the leading zero).
Global Addressing
Global scoped unicast addresses span the internet and are the equivalent of public IPv4 addresses.
Unicast Addressing As with IPv4, a unicast address identfies a single network interface. IPv6 unicast addressing is scoped; a scope is a region of the network.
Global scopes provide the equivalent of public addressing schemes in IPv4 while link-local schemes provide private addressing.
To interpret IPv6 addresses, you must understand hexadecimal notation. Hex is a convenient way of referring to the very long (128 binary character) addresses.
Hexadecimal has 16 characters (0...9,A, B, C, D, E, F) compared to binary's 2. Therefore it only takes 1 hexadecimal character to represent 4 binary characters.
IPv6 Address Format In IPv4 the addressing scheme is based on a 32-bit binary number, 32 bits can express 2(to the 32nd power) unique addresses (in excess of four billion).
However, the way in which addresses have been allocated has been inefficient, leading to wastage of available addresses. Inefficiencies in the addressing scheme and growing demand for addresses in Asia mean that the available IPv4 address supply is close to exhaustion.
The equivalent in IPv4 is Automatic Private IP addressing (APIPA) and its 169.254.0.0 addresses.
However, unlike IPv4, an IPv6 host is always configured with link-local addresses (one for each link), even if it also has a globally unique address.
NAT and private addressing have provided a "stopgap" solution to the problem but
NAT does not work well with modern application, such as VoIP and conferencing.
Link-local Addressing Link-local addresses are used by IPv6 for network housekeeping traffic. Link-local addresses span a single subnet (they are not forwarded by routers).
Nodes on the same link are referred to as neighbors. Link-local addresses start with a leading fe80 while the next 54 bits are set to zero and the last 64 bits are the interface ID.
Like IPv4, IPv6 defines a number of addressing schemes. These are unicast, multicast, and anycast.
There is no concept of broadcast addressing in IPv6. Eliminating the use of broadcasts saves network bandwidth. Functions that would have used broadcasts in IPv4 use special multicast addresses in IPv6.
In the second technique (described in RFC 4941), the client device uses a pseudo-random number for the interface ID. this is known as a temporary interface ID or token.
There is some concern that using interface identifiers would allow a particular host to be identified and closely monitored when connecting to the internet and using a token mitigates this to some degree.
For example, if the prefix is /48, then if the first 48 bits of IPv6 address were the same as another address, the two would belong to the same network.
This means that a given organization's network can be represented by a network prefix 48 bits long and they then have 16 bits left in the network ID to subnet their network. For example, 2001:db8:3c4d::/48 would represent a network address while 2001:db8:3c4d:01::/64 would represent a subnet within that network address.
The 0000::/8 block (that is, IPv6 addresses where the first bits are 0000 0000) is reserved for special functions. Within this block, there are two special addresses defined:
Unspecified address (0:0:0:0:0:0:0:0) - a host that has not obtained a valid address. This is often expressed as :: Loopback address (0:0:0:0:0:0:0:0:1) - used for testing (for the host to send a packet to itself). This is often expressed as ::1.
Network addresses are written using CIDR notation, where 1 nn is the length of the routing prefix in bits.
WIthin the 64-bit network ID, as with CIDR, the length of any given network prefix is used to determine whether two addresses belong to the same network.