کد:
http://www.trainsignaltraining.com/ipv6-addressing/2010-02-23/
The transition to IPv6 will be one of the most important issues that network professionals will address in this new decade. As CCNA candidates, a solid understanding of the IPv6 protocol and how to use it in addition to IPv4 is essential. In my previous article, we examined the history of IPv6 and answered the question of
Why is IPv6 needed?
In this article, we will examine the structural differences between IPv4 and IPv6 and we’ll investigate the different types of IPv6 addresses and how they communicate.
IPv4 vs. IPv6: Structure Comparison
In my last IPv6 article, I mentioned that IPv4 addresses are 32 bits in length and IPv6 addresses are 128. The 32 bit structure of the address for IPv4 was designed to be represented as four separate octets, or sets of eight bits, separated by dots. The maximum range of values in each octet is seen to be 0-255.
IPv6 addresses contain eight different fields, instead of octets, and each field consists of 16 bits. Due to their larger size, IPv6 addresses are noted using hexadecimal characters, not decimal as seen with IPv4. I would strongly advise reviewing hexadecimal notation (0-15 = 0-F) before doing anything with IPv6 (and for your CCNA exam), just as you would have reviewed binary notation for IPv4.
Another important item to note about IPv6 addressing is the subnet mask identification. IPv4 could use the standard
255.x.x.x or the
/xx CIDR of VLSM notation. IPv6 only uses the /xx notation for mask representation.
The example in Figure 1 illustrates some of the structural differences you would see between IPv4 and IPv6 address.
IPv6 addresses can also be compressed in size if certain conditions exist. If a field contains all zeroes, that field can be reduced to just one zero. In addition, if there are multiple fields adjacent to one another that have all zeroes, those fields can be displayed by on a “::” notation.
It definitely can get confusing if you have multiple fields missing from the address, but there is an important point to remember. The compression to the “::” notation can only happen once in an address. You would be allowed to have a “::” and a few single 0 fields, but anything else is invalid.
Figure 2 below shows two IPv6 addresses and the valid and invalid ways to compress them.
Continuing with our comparison on structure, let’s dig deeper and look at the full IP address headers of IPv4 and IPv6. To best understand the header configurations, you may want to look up the corresponding
Request for Comments (RFCs) that are posted by the IETF for topics that they wish to become standardized.
RFC 791: Internet Protocol DARPA Internet Program Specification, defines the IPv4 header and description of the IP packet, while
RFC 2460: Internet Protocol, Version 6(IPv6) Specification, describes the same for IPv6.
Some of the IETFs RFCs are lengthy, often contain high level research discussion points, and can read like very bad stereo instructions, but careful reading can unlock a lot of useful information.
The IP packet contains the IP header and a data payload. For IPv4, the IP header is a total of 20 bytes (160 bits), but this can be increased if the options field is used. The options field is variable in length and if a field does not equal an even 32 bits, padding is added to accommodate. A graphic of the IPv4 header is shown in Figure 3.
Figure 3: IPv4 Header (click on image to expand)
In contrast, IPv6 addresses utilize a fixed length of 40 octets (320 bits) and have been simplified in its format compared to the IPv4 version. The IPv4 options field has been replaced by extension headers, which were designed to provide more structure and easier processing for network devices.
IPv6 addresses can contain zero, one, or multiple extension headers depending on the services the IP packet will be supporting. As you can from the structure of the IPv6 header graphic in Figure 4, a Next Header field identifies any headers that follow and this field is present in all extension headers, thus providing a defined chain.
Figure 4: IPv6 Header (click on image to expand)
Types of IPv6 Addresses
Different types of IPv6 addresses are defined in
RFC 2373: IP Version 6 Addressing Architecture. As we look at these address types, it is important to understand that unlike IPv4, IPv6 does not use Broadcasts in its communication and therefore, does not require network number and Broadcast addresses for each subnet.
Much of the functions like ARP (Address Resolution Protocol) and other subnet only protocols are accomplished with different mechanisms that utilize Multicast or Anycast instead of Broadcast.
Unlike IPv4, each host and router utilizing IPv6 will have multiple IPv6 addresses which are used for different functions. The address types seen with IPv6 are:
- Link-Local
- Global Unicast
- Loopback
- Multicast
- Anycast
IPv6 did contain a private address space called a Site-Local address, but this was removed from the IPv6 RFCs in 2004. The following tables describe the required addresses and their representation for hosts and routers.
Putting the IPv6 Address Together
We have talked about the representation of the IPv6 address compared to IPv6 and listed the different types of IPv6 addresses. Now let’s dig deeper into the formation of an IPv6 addresses.
To illustrate this topic, I will use the
Link-Local and
Global Unicast addresses as examples.
Link-Local addresses are used for communication between nodes on the same local link or subnet. Communication to the broader Internet requires the Global Unicast address. In IPv4 and IPv6, addresses can be subnetted down to very small groups, but the IETF has chosen that IPv6 addresses utilized in the broader Internet will use a 64 bit interface identifier or host id. This consumes the last half of the 128 bits of the IPv6 address.
This same interface identifier is utilized for both the Link-Local and Global Unicast addresses on a network interface. The interface identifier can be configured manually or automatically utilizing the EUI-64 address. This address is a combination of a 24 bit manufacturer id provided by the IEEE and a 40 bit value given to the product by the manufacturer.
Why consume so much of the address for host id you ask?
The IETF structured the first block of 48 bits of the IPv6 address to utilize a very hierarchical structure for routing in the Internet and this block is often referred to as an IPv6 Global Prefix. The minimum subnet that can be assigned from a Regional Internet Registry (RIR) is /48. This leaves 16 bits of the first block of 64 bits of an IPv6 addresses to be used by a site or ISP for subnetting.
Based on this format, the IETF believes that there will be enough addresses to support the world’s IP addressing needs for decades to come. An illustrated example of the structure of a Link-Local and a Global Uncast Address is shown in Figure 5.
What Did We Learn?
In this article, we investigated the differences between IPv4 and IPv6 addresses and reviewed the different ways to display an IPv6 address. In addition, we discuss some of the types of IPv6 addresses and what the format means.
As you can see, there is a bit more complexity to IPv6 than IPv4, but also a great deal more structure and flexibility.
In upcoming articles, I will explain some of the key features of IPv6 such as: stateless and stateful configuration, end-to-end encryption, and IP MTU discovery. I will also address how to implement this new protocol into your network and discuss what is needed for configuring IPv6 to use different routing protocols.
IPv6 has a lot of promise, but new protocols like this often require a great deal of change in a network to properly implement and significant change is often feared. As we look at all the necessary requirements for implementation of IPv6, we will find that some of the fears we might have can be easily alleviated