IPv6
Up to this point, when we talked about IP or an IP address, we were referring to IP Version 4. IPv4 was created to build a Defense Department network in the early 1970s. At the time, no one foresaw that the Internet as we know it today was going to happen. The designers of the TCP/IP suite of protocols did not plan for their little project to balloon into the largest network in the world and revolutionize the commercial, cultural, and communications behavior of the whole planet.
But it did, and a couple problems came to light rather quickly when the Internet started to really catch on. One really tricky one was that the address “space” was originally handed out without quite enough thought and planning as to who got what size chunks, and what routers would be responsible for those chunks. At the time it didn’t matter; there were plenty of addresses to go around. But as the routers started to get really large route tables, with all these networks being added, they had trouble dealing with it. Routers at the time were relatively small and slow, and when the route tables became so large, they were overloaded, slow to do their jobs, and generally poor performers. Solutions were urgently needed because the Internet was growing very fast and the problem was only getting worse.
The solutions came in things like VLSM-capable protocols, route summarization, a reassignment and redistribution of addresses, and the NAT service. These solutions have allowed the IPv4 address space to continue to function and serve as the address system for the Internet, but the second problem is one we can’t get around: The mathematical reality is that there are not enough IP addresses available to meet the demand (especially in Europe and Asia). More people want Internet addresses than there are addresses to hand out.
This is where IPv6 comes in. Whereas an IPv4 address is a 32-bit string, theoretically providing more than 4 billion IP addresses (for the sake of clarity I’ll ignore the fact that a large number of theses addresses are not really usable). An IPv6 address is 128 bits long, providing about 3.4 × 1038 possible addresses, or as the story goes, 500,000,000,000,000,000,000,000,000,000 addresses for each of the 6.5 billion people on the planet. Running out of IPv6 addresses is not expected to be a problem.
Along with the sheer number of addresses available, IPv6 also cleans up a few of the issues with IPv4, making the operation and management of large internetworks easier and more efficient, and adds some useful new functionality as well. So now we can easily envision a world where anything we want can have an Internet IP address (including silly things such as the fridge), where an Internet-enabled mobile phone can keep its IP address as it moves across the globe, and all the difficulty and headache caused by using VPNs through NAT disappears.
IPv6 Address Allocation
An organization called the Internet Corporation for Assigned Network Numbers (ICANN) has the overall responsibility for dividing up the IPv6 address space. They do so with the benefit of a better understanding of the global demand for Internet IP addresses and the luxury of a huge number of addresses to hand out.
The system works like this: First, remember that for the Internet to work well, we need to use route summarization so that the route tables don’t get huge and slow the routers down. Route summarization works best if every router is responsible only for its “branch of the tree,” with smaller branches feeding into larger and larger ones as we get closer to the core or trunk of the tree. This allows the possibility for a single router to advertise a summary that in effect says, “I can reach all North American routes.” That big router connects to other routers that summarize routes for four major Internet service providers (ISPs). Each ISP router connects to smaller ISPs or large enterprise customers, who advertise the summaries that represent the addresses assigned to them. Figure 3.19 gives some idea of how this system works.
FIGURE 3.19 Global IPv6 address design.
The beauty of the system is that it is organized, planned, and executed in advance, with efficient routing in mind. The large number of addresses available also means that changes at or below the ISP level, for example, because of mergers or large customers changing Internet providers, do not affect the global routing information at the core.
IPv6 Address Notation
IPv6 addresses are different in appearance from IPv4. Of course, they are 128 bits long, so even in binary they would be four times longer than a 32-bit IPv4 address, but in notation that humans read and write the format is still different. Instead of using dotted-decimal in four octets, we use hexadecimal in eight sets of four characters separated by colons, like this:
2201:0FA0:080B:2112:0000:0000:0000:0001
The use of hex makes it a little easier to represent all those 128 bits in a shorter format because each character represents 4 bits. But it’s still a long thing to type out, and remember that network people are generally lazy—so we have a couple of truncation methods to make the long addresses even shorter. The first method is that we are allowed to drop leading 0s (0s that appear at the beginning of each set), like so:
2201:FA0:80B:2112:0:0:0:1
That makes for a little less typing and a little more clarity. Pay attention to the fact that dropping 0s at the end of each set is not allowed! Dropping leading 0s does not change the value of the set; dropping 0s at the end does (like removing a 0 from the end of your paycheck amount—not good!)
The second truncation method we can use is to condense contiguous groups of all-0 sets. In our example, there are three sets that are all 0s. We can represent these by a double colon, like this:
2201:FA0:80B:2112::1
This is as short as it gets. We are only allowed to do the double-colon trick once in any address, so if you see an address with two double-colons in it, it is not valid. Here’s an example:
2201::BCBF::1
One last piece of the addressing notation: the mask. We do not represent the mask as another set of hex characters. Instead, we identify the prefix length with slash notation. This is not as confusing at it seems: The slash notation simply identifies how many bits identify the network part, with the remainder being the host part.
For example, the North American registry ARIN (American Registry for Internet Numbers) was given the block of 2620:0000::/23 in September 2006. This indicates that the first 23 bits of 2620:0000:: identify the block of addresses that the North American routers will advertise to the rest of the world. From this point, ARIN will assign chunks of that space to the Big ISPs; Big ISP1 might get 2620:0100::/24, and Big ISP2 might get 2620:0200::/24. Those ISPs then hand out pieces of their chunk to smaller ISP or big customers, and the prefix length will get bigger as the chunks gets smaller—this should feel familiar because what we are doing here is subnetting. Don’t worry, you won’t be expected to subnet in IPv6. Not yet at least.
Types of IPv6 Addresses
An IPv6 address will be one of the following types. Some will be familiar, but there is one brand-new one, too.
- Unicast: An IPv6 unicast address is the same as an IPv4 unicast address; it is an IP that is assigned to an interface on a host. It can be the source of an IP packet or the destination for one. A packet sent to a unicast address goes to the one host with that address.
- Global unicast: A global unicast IPv6 address is the equivalent of a public, registered IP address. They are Internet routable, globally registered IPs that must be leased from an ISP.
- Unique local: Equivalent to a private IPv4 address; not registered with an ISP and not Internet routable.
- Link local: Every IPv6 interface gives itself a link-local address. The address range is FE80::/10, and usually combines this prefix with the last 64 bits in EUI-64 format. It is roughly equivalent to the Automatic Private IP Address (APIPA) address range of 169.254.0.0/16.
- Multicast: Just like in IPv4, a single IPv6 multicast address is assigned to multiple hosts so that a packet sent to the address may be delivered to multiple hosts more or less at the same time. IPv6 multicast addresses always start with the prefix FF00::/8.
- Anycast: An anycast address is a single address that is assigned to multiple hosts. This is similar to a multicast, except that a packet for the anycast address will be delivered to the one host that is nearest according to the routing protocol’s idea of distance. There is no special prefix for anycast addresses.
There is no such thing as a broadcast in IPv6. Ever. Any requirement for broadcasting is performed by a multicast instead.
IPv6 Address Configuration
For hosts to use IPv6 addresses, an IPv6 protocol stack must be installed. This likely means that you will need to upgrade your router IOS to provide IPv6 support. Then you can choose one of four options for address assignment.
To understand the address assignment choices better, we need to examine the concepts of stateful versus stateless configuration and the EUI-64 address format.
In IPv6, we can use DHCP to assign IP addresses just like in IPv4. The admin must set up the server with a scope of IPv6 addresses to hand out. The mechanisms used to discover and assign addresses are a little different, but the net result is the same. This is called stateful addressing, where the DHCP server keeps track of what hosts have been assigned what IPv6 address—in other words, the state of the host DHCP-wise.
There is another option for dynamic addressing in IPv6 called stateless autoconfiguration. This feature allows a host to choose and configure an address for itself. The host that wants an address learns what the /64 network prefix is on the local link, then appends its MAC address (in a special 64-bit format called EUI-64), thus generating a 128-bit IPv6 address that is unique to that host because it incorporates the unique MAC of the host.
The EUI-64 format is not so difficult to understand. We simply take the 48-bit MAC address and put a special pattern, FFFE, after the first 24 bits (the six OUI characters), followed by the rest of the six hex characters in the host MAC. The only trick is that according to IPv6 rules, the seventh bit in an EUI-64 address must be 1, which identifies that the burned-in MAC address has been modified. This is a little confusing, to be sure, but you can relax because the host determines and configures its EUI-64 address all by itself, if you tell it to. Here’s what an EUI-64 address conversion looks like:
Original MAC:
00-15-C5-CB-42-2B
Original MAC in binary:
00000000-00010101-11000101-11001011-01000010-00101011
7th bit = 0
Change 7th bit to 1:
00000010-00010101-11000101-11001011-01000010-00101011
EUI-64 MAC now:
02-15-C5-CB-42-2B
EUI-64 Address = </64 net_prefix>:0215:C5FF:FECB:422B
So, back to the four choices. The following really simplifies the options:
- Static configuration: The administrator chooses and assigns a static IPv6 address to the host NIC. It is the admin’s responsibility to choose an address that will function and be valid in the network to which the host is connected.
- Static configuration using EUI-64: The administrator manually configures the address with the local /64 network prefix followed by the host’s MAC in EUI-64 format.
- Dynamic configuration using DHCP to assign 128-bit address: The host is set to obtain its address from DHCP, and the DHCP server is set up to hand out IPv6 addresses from a scope.
- Dynamic configuration using stateless autoconfiguration with EUI‑64: The host is set to obtain its address automatically, but the DHCP server either does not exist (which works fine by the way), or if it does, it only informs the host of the /64 local network prefix.
IPv6 Router Configuration
Assuming your IOS provides IPv6 support, giving it an IPv6 address is really easy. The command is carried out at the interface configuration prompt:
interface fastethernet 1/0 ipv6 address 2001:AB00:00FF:1::/64 eui-64
Notice the eui-64 switch; this tells the router to figure out its own EUI-64 address to follow the /64 prefix provided. Without that, you must provide a full 128-bit address in the command.
To verify your configuration, use the show ipv6 interface command at the interface configuration prompt. The following is a sample output (with different addresses applied). You can see multiple addresses in use by the interface for global unicast, link-local, and multiple multicast groups:
Router#show ipv6 interface Serial1/0 is up, line protocol is up IPv6 is enabled, link-local address is FE80::A8BB:CCFF:FE00:D200 Global unicast address(es): 2001:1:33::3, subnet is 2001:1:33::/64 [TENTATIVE] Joined group address(es): FF02::1 FF02::1:FF00:3 FF02::1:FF00:D200 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds Router#
IPv6 Features
IPv6 has a couple features that you should keep in mind:
- IPsec: Support for IPsec is built in for IPv6; this means that every packet can be protected by IPsec transport on every IPv6 host if so configured.
- Mobility: IP mobility is built in, but obviously not mandatory because some hosts are not mobile.
Fixed header size: The IPv6 header is fixed at 40 bytes or 320 bits. Figure 3.20 (in the next section) shows the IPv6 header.
FIGURE 3.20 The IPv6 header.
- ICMP for IPv6 has changed, adding new functionality: One example of the new tricks it has learned is path MTU (PMTU) discovery: Before transmitting a packet, a host can send an ICMP message to learn what the smallest maximum transmission unit (MTU) on any link is between the sender and the destination. Then, the host sends packets that are no larger than that value. This clever trick relieves routers of having to fragment and reassemble packets over a small-MTU link, which can be a real performance hog. According to RFC 1981, hosts not using PMTU will transmit packets at the minimum IPv6 link MTU, which is actually quite small and likely to be inefficient.
- IPv6 makes extensive use of Router Solicitation (RS) and Router Advertisement (RA) messages: These are multicast messages to the addresses FF02::1 and FF00::2, respectively. The RS is sent from a host to all routers on the link as a multicast, and the RA message is sent from a router to all hosts on the link, also as a multicast. This is one way that the hosts learn whether DHCP is supported on the link, and possibly the DHCP server address.
The IPv6 Header
As mentioned in the preceding section, the IPv6 header is fixed at 40 bytes (320 bits) in length. Figure 16.11 shows the header fields and their sizes, and this section identifies what the fields are for.
The Version field identifies the IP version of this packet; for IPv6, obviously the version will be 6.
The Traffic Class field is where quality of service (QoS) marking for Layer 3 can be identified. In a nutshell, the higher the value of this field, the more important the packet. Your Cisco routers (and some switches) can be configured to read this value and send a high-priority packet sooner than other lower ones during times of congestion. This is very important for some applications, especially VoIP.
The Flow Label field is a number that identifies this packet as one of a flow of packets in a stream from sender to receiver; a good example is a VoIP call. It’s best for VoIP if all the packets in a given call get sent along exactly the same path to the receiving phone, so that they arrive in the same order they were sent. The flow label is one mechanism that IPv6 routers can use to keep track of different application flows and try to make sure that all the packets within a flow get treated the same way.
The Payload Length field indicates how big the payload of this packet is; it can be variable, so the router needs to know where the packet is supposed to end. That way it knows if anything went missing. This is especially important because there is no header checksum, as there used to be in IPv4.
The Next Header field takes over the Options header functions in IPv4. Short codes for extension headers are listed in the Next Header field, and additional information is appended in additional headers after the primary IPv6 header. All of this is designed to speed up the routing of IPv6 packets by preserving the size and content of the primary header, so it can be routed in the “fast switching” path of the router.
The Hop Limit field is a cool one: Whereas in IPv4 there was a TTL field that limited the life of a packet to 255 hops. (The IPv4 TTL value typically starts at 255 and is decremented by at least 1 as a packet is processed by a router. If it reaches 0, the packet is dropped. This prevents the packet from being endlessly misrouted around the Internet, although it could be misrouted up to 255 hops.) IPv6 is smarter: The Hop Limit value is set to the actual number of hops the packet will go through to reach its destination. This hop information comes from the IPv6 routing protocols. The Hop Limit is still decremented by 1 at each router, but the more accurate value means that the packet can’t be misrouted even by one hop.
The Source and Destination Address fields are self-explanatory; remember that the full 128-bit address for each is listed.
IPv6 Transition Strategies
Clearly, things are moving toward IPv6. The U.S. government once specified that all federal agencies must deploy IPv6 by 2008; then it was pushed back, ultimately to 2012. The process, though, is not going to affect every single host in these large networks overnight. Cisco wants you to be aware of their strategies for the transition to using IPv6 while still maintaining IPv4 functionality.
The easiest IPv6 transition choice is called dual stack. Dual stacking means that the host (router, PC, printer, and so on) runs both the IPv4 and IPv6 protocol stacks and can send and receive both types of packets, probably (but not necessarily) on the same interface. The drawbacks here are the additional load on the host and whether an IPv6 stack for that device is available (your old router might not be able to run IPv6).
Tunneling mode creates a tunnel for one protocol through another. You can picture taking an IPv6 packet from the head office, encapsulating it inside an IPv4 packet to transition across the provider network, then decapsulating it on the other side and forwarding the IPv6 packet into the remote branch office. This is known as a 6-to-4 tunnel; these tunnels can be either automatic or manual. 6-to-4 tunnels have a special address range of 2002::/16. Other tunneling strategies include the following:
- Teredo tunneling: Named after a particularly ugly species of marine wood-boring clam that makes tunnels in wood, this technology encapsulates IPv6 packets in IPv4 UDP datagrams for routing through the IPv4 network (usually the Internet). Its chief benefit is that it can operate from behind NAT devices. It is considered a “last resort” transition strategy, meaning that you should implement IPv6 natively instead, if possible.
- ISATAP (Intra-Site Automatic Tunnel Addressing Protocol) tunneling: This technology uses the IPv4 network (again, this would usually be the Internet) as a virtual NBMA data link layer. IPv6 link layer addressing is derived dynamically from IPv4 addresses, allowing dynamic neighbor discovery on top of IPv4 in addition to simple routability. ISATAP is a native capability in most Windows operating systems, Linux, and most Cisco IOS versions.
Translation means taking an IPv6 packet, removing the IP header, and replacing it with an IPv4 header that approximates the original IPv6 information as much as possible.
Translation is usually associated with a NAT router, and sometimes is known as NAT-PT (for Protocol Translation). What happens here is that the IPv6 packet header is removed and replaced with an IPv4 header (or vice versa), effectively changing from one protocol to the other. The big issues with NAT-PT are latency, performance loading, and the loss of header information in the translation process.
You need to know IPv6 configuration for your test; they may or may not ask you to actually do it (in a sim), but you definitely need to be able to recognize if the configuration they show you is valid.