In my last article, I discussed the fundamentals of IPv4 addressing and Routing. Here, I am going to discuss another version of logical addressing called IPv6 addressing.
As a reader you might be aware that IPv6 addressing was introduced way back in the mid 1990s by the Internet Engineering Task Force, starting with RFC 1883. It’s still in a development phase; only 1% of internet traffic is shared by IPv6 as of late November 2012. Here in this article I would give you a clear idea about IPv6 addressing and routing, after which you will able to understand why we need to learn IPv6 addressing, how we can represent it, and what its basic differences with IPv4 are.
CCNA Training – Resources (Intense)
What is IPv6?
IPv6 or Internet Protocol version 6 is a next generation layer 3 TCP/IP protocol, held as the future of communication protocols.
Before discussing more about IPv6 addressing, let’s look at the Packet format of IPv6. Below we can see the detailed architecture of an IPv6 packet.
The architecture of IPv6 allows existing IPv4 users to transition easily to IPv6 while providing services such as end-to-end security, quality of service (QoS) and globally unique addresses.
Larger IPv6 address space allows networks to scale and provides global reachability. The simplified IPv6 packet header format handles packets more efficiently.
IPv6 prefix aggregation, simplified network numbering and IPv6 site multi-homing capabilities create an addressing hierarchy that allows more efficient routing.
Why do we need to learn IPv6?
Using IPv4 addressing, there were 3.7 billion usable IP addresses out of 4.3 billion available, which is very few when viewed by the communication world. Since only 10% of the world’s population use the Internet directly, new emerging markets like China, India and Africa will need a huge number of IP addresses in the near future. In next generation networks where every electronic device could be managed by a smart phone, to get communications done you need to have an IP address assigned to each device.
Previously, IETF provided a temporary solution by giving enterprises a special range of address space such as Private Address, which anyone could use in a Public Network. To access a Public Network, address translation was used to convert the private addressing information to a Public address, mainly with static Network Address Translation (NAT) for internal services and dynamic overloading (Port Address Translation) for user connection. But due to increase internet usage, there won’t be any Public addresses left to translate soon.
IPv6 Addressing & Expressions:
An IPv6 address has 8 sections separated by columns, and each section carries 4 hexadecimal digits. So an IPv6 address is something like this:
(Network Address-64 bit)
(Host Address-64 bit)
Each X can have a hexa-decimal value from 0 to 9 and a to f. It means there is 16 possible values for each X. Since X is stored in binary i.e. 0 or 1, it means only two possible values for each bit. The number of bits per section turns out to be 2*2*2*2 = 16 bits, thus we have now each section with 16 bits per section and 8 sections in total. This turns out to be 16*8 = 128 bits. That’s why IPv6 address is 128 bits unlike its counterpart IPv4 address which is only 32 bits.
Because of its 128 bit size, the possible addresses in IPv6 space is 2^128 = 340 282 366 920 938 464 463 474 607 431 768 211 456 addresses. Chances are we will not run out of addresses until the end of this century.
The most important thing to remember is that in IPv6 addressing, clients are mostly based on /64 subnet which means the first 64 bits go to the network part while the next 64 bits go to the host part i.e usage IP v6 addresses which are allocated to end machines.
In IPv6 addressing scheme, decimal notation has been replaced with hexadecimal using 16 characters (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f), A=10, B=11, C=12, etc. You can use both upper and lower cases to address your device since the numbers are case sensitive.
Addresses still use the hierarchy in IPv4. They are divided into two parts. The blue one (64 bits) denotes the network position and the red one, the interface identifier/host addresses.
We can use some shortcut methods to shorten the big address notation:
Leading zeroes can be omitted.
Groups of four 0s can be abbreviated as Zero.
Multiple contiguous groups (2 byte groups) can be abbreviated to double colon (::) but it can only be once.
Using the shortcut technique, the right answer would be 3001::14:0:0:1354:76ab.
Types of IPv6 addresses:
We are all familiar about IPv4’s unicast, broadcast, and multicast addresses that basically define who or in how many devices we’re talking about this. By omitting Broadcast address, IPv6 has introduced the new type address Anycast, resulting in three main types:
Anycast: Very different from an IPv4 broadcast with its one-to-the-nearest interface, where many interfaces can share the same address. An anycast address identifies one or more interface. The anycast packet is delivered to only one device, actually to the closest one it defined in terms of routing distance.
As a network admin need to remember following guidelines:
- Don’t assign anycast addresses to any hosts-only routers.
- Don’t put an anycast address in the source of a packet – only the destination.
- Multicast: Similar to a multicast in IPv4, it’s one to a group of devices. Packets addressed to a multicast address are delivered to all interfaces turned into the multicast address. In IPv6, multicast address always starts with FF. Multicast address can’t be used as source address.
IPv6 multicast addresses have the Format Prefix of 1111 1111. An IPv6 address is simple to classify as multicast because it always begins with FF. Multicast addresses cannot be used as source addresses.
|11111111(8 bits)||Flag(8 bits)||Scope(8 bits)||Group ID(112 bits)|
Multicast addresses include additional structure to identify their flags, scope, and multicast group, as shown above.
- Unicast: IPv6 unicast addresses are assigned to each interface and packets addressed to unicast addresses. Below are descriptions of the five different types of unicast addresses.
- Global unicast addresses: Global unicast addresses are typical publicly routable addresses and it’s same as they are in IPv4. The address starts at 2000:: /3. ISPs summarize these to provide scalability in the Internet
- Reserved addresses: Like its counterpart IPv4, IPv6 also reserved some ranges of addresses which are used to specify types of anycast as well as for future use. Currently about 1/256th of the IPv6 address space is reserved for future use only.
- Private Addresses: Like IPv4, IPv6 also supports private addressing, which is used by devices that don’t need to access a public network. In private addresses, the first two digits are FE and the third digit can range from 8 to F (FE80::/10).
There are two kinds of private addresses:
- Site local: Site local addresses are similar to the RFC 1918 addresses and represent a particular site or an enterprise network. It starts with FEC:: through FFF::.
- Link local: Link local addresses give network admins an opportunity to throw a temporary LAN together for meetings or to create a small LAN that’s not going to be routed but still needs to share and access files and services locally. It starts with FE8::through FEB::.
Using private addresses, a network admin can easily control who is allowed to leave your network and get returning traffic back by setting up address translation policies for IPv6.
- Loopback Address: Same like IPv4 addressing where the loopback address was 127.0.0.1 which is dedicated for complete A class block addresses for local testing. Here in IPv6 the address is 0:0:0:0:0:0:0:1 or ::1. Loopback address is used for local testing functions, and only one is used in IPv6.
- Unspecified Address: 0.0.0.0 in IPv4 means an unknown address, but in IPv6 it is represented by 0:0:0:0:0:0:0:0 or :: and it is typically used in the source address field of the packet when an interface doesn’t have an address and is trying to acquire one dynamically.
Below is a short note on these special addresses, which can be a very good drill:
|0:0:0:0:0:0:0:1||::1||Equivalent of 127.0.0.1 in IPv4|
|0:0:0:0:0:0:192.168.100.1||Mixed IPv6/IPv4 network address|
|2000::/3||Global Unicast address range|
|FC00::/7||The unique local unicast range|
|FE80::/10||The link-local unicast range|
|FF00::/8||The unicast range|
|3FFF:FFFF::/32||Reserved for example and documentation purposes|
|2001:0DB8::/32||Also reserved for example and documentation|
|2002::/16||Used with 6 to 4 tunnelling which is an IPv4 to IPv6 transition system|
Transition Capabilities of IPv6:
The Dual stack method allows the successful co-existence of IPv4 and IPv6 when migrating between the two. With the Dual stack method, a network admin can allow both protocols to run simultaneously on an interface of a device.
Another method is Tunnelling, which allows you to tunnel IPv6 over IPv4 and vice versa to transmit an IP version of one type across a network using another type. Using 2002::/16 address which is used for IPv4 to IPv6 tunnelling, the structure allows IPv6 packets to be transmitted over an IPv4 network without the need to configure explicit tunnels.
Cisco also supports another method referred to as Network Address Translation-Protocol Translation (NAT-PT), to translate between IPv4 and IPv6.
What are the advantages of IPv6 over IPv4?
Listed below are the key advantages of IPv6:
- Larger address spaces: Increased size from 32 bits to 128 bits.
- Streamlined Protocol Header: IPv6 encapsulation is simpler than IPv4’s; it provides faster forwarding rates and better packet-forwarding efficiency.
- Stateless auto-configuration: The ability for nodes to determine their own addresses.
- Multicast: Increased use of efficient one to many communications than IPv4.
- Network Layer Security: IP security (IPsec) is built into IPv6 so it’s highly secure.
- Quality of Service capabilities: Quality of service information is built into the IPv6 header, where a flow label identifies the traffic, making packets and flow labels that help identity priority traffic.
- Mobility: Devices can roam between wireless networks without breaking their connections.
Though it has several advantages over IPv4, IPv6 still has some drawbacks. For example, hexadecimal expressions are not easy to learn and memorize. Another drawback is there are no Private IP addresses, which is one of the most important features in IPv4.
As I have given the fundamentals of IPv4 routing in detail in my previous article, I will only discuss the key features which were added or modified in IPv6 routing below.
RIPng: The primary features of RIPng are the same as they were in RIPv2. It is still distance vector routing protocol, has a max hop count of 15 and uses split horizon, with poison reverse used to prevent routing loops. Unlike RIPv2, it uses UDP port 521 instead of UDP 520.
Like RIPv2 however, it uses multicast to send its updates too, but here in IPv6, it uses FF02::9 for the transport address.
One of the biggest changes with RIPng (and all IPv6 routing protocols) is that it uses network interface itself instead of the network command you used to enable the interface in order to route the connected network.
EIGRPv6: Like RIPng, it also uses almost the same features of EIGRP. It is still an advanced distance vector routing protocol that has some link state features. The neighbour discovery process using Hellos are still happening. Hello packets and updates are sent using multicast transmission but EIGRPv6’s multicast address stayed almost the same. In IPv4 it was 18.104.22.168 and in IPv6 it’s FF02::A (A=10 in hexadecimal notation).
Network and interface to be advertised must be enabled from interface configuration mode. But as a network admin you still have to use the router configuration mode to enable the routing protocol in EIGRP v6.
OSPF v3: The basic properties of OSPF v3 remain the same like in the previous version. It is still a link state routing protocol that divides an entire inter-network or autonomous system into areas, making a hierarchy.
In OSPF, router ID is determined by the highest IP addresses assigned to the router. In version 3, you assign RID and area ID, which are both still 32-bit values but are not found using the IP addresses anymore, because IPv6 address is 128 bits.
OSPFv3 uses multicast traffic to send its updates and acknowledgements, with the addresses FF02::5 for OSPF routers and FF02::6 for OSPF-designated routers. These new addresses are the replacements for 22.214.171.124 and 126.96.36.199 respectively.
Future of IPv6: In the near future all devices will run only on IPv6. So as a network engineer/fresher/enthusiast you need to master this addressing technique. One important thing to keep in mind about IPv6 addressing is that there is a research going on for Subnetting of IPv6 addresses. Before that, you have plenty of IPv6 addresses to work with.
CCNA Exam Essentials:
In order to pass the CCNA exam, please keep in mind these topics:
- Understand why we need IPv6
- Understand Link-local
- Understand Unique local
- Representation of IPv6 addressing
- Special Class range in IPv6 addressing
- IPv6 addressing Chapter 24, CCNA Study guide by Richard Deal
- IPv6 addressing Chapter 15, CCNA study guide by Todd Lammle
- IPv6 basics Cisco Press www.cisco.com/go/ipv6
- IPv6 Configuration Guide, Cisco IOS Release 12.4T
- http://www.anuragbhatia.com/ipv6 addressing.html