IPv6

This article explains the theory of IPv6, how addresses are displayed, prefixes and different types of traffic with IPv6.

Introduction

IPv6, or Internet Protocol version 6, is the successor to IPv4 and is designed to overcome the limitations and address exhaustion issues of the older protocol. IPv6 introduces several key improvements and features to the world of networking and internet communication.

Description
Address Length: One of the most significant changes in IPv6 is the length of IP addresses. IPv6 addresses are 128 bits long, compared to the 32-bit addresses in IPv4. This expanded address space allows for an astronomically larger number of unique addresses, addressing the issue of address exhaustion that was becoming a problem with IPv4.
Address Format: IPv6 addresses are typically written in hexadecimal notation, separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Leading zeros in each segment can be omitted, and consecutive segments of zeros can be represented by a double colon (::), but this can only be done once in an address to avoid ambiguity.
Simplified Header: The IPv6 header has been streamlined and simplified compared to the IPv4 header. This reduces processing overhead in routers and devices and enhances network efficiency.
Autoconfiguration: IPv6 supports stateless autoconfiguration, allowing devices to automatically configure their IPv6 addresses and network settings without requiring a central server (as used in DHCP in IPv4). This feature simplifies network setup and administration.
Built-in Security: IPv6 includes built-in support for IPsec (Internet Protocol Security), which provides encryption, authentication, and data integrity for network communications. While IPsec is optional in IPv4, it is an integral part of IPv6.
Mobility Support: IPv6 includes features to support mobile devices that frequently change their point of attachment to the network. This enables seamless handover of connections as devices move between different networks.
Extension Headers: IPv6 introduces the concept of extension headers, which allow for the insertion of various optional features into the packet header without increasing the size of the base header. This allows for greater flexibility in defining packet handling and processing.
Multicast: IPv6 multicast, similar to IPv4 multicast, enables efficient one-to-many and many-to-many communication, which is crucial for applications like streaming and online gaming.
Transition Mechanisms: Since IPv4 and IPv6 are not directly compatible, various transition mechanisms were developed to ensure a smooth migration from IPv4 to IPv6. These mechanisms help devices and networks communicate with each other during the transition period.
Header Complexity: While the IPv6 header is simpler in terms of structure, some argue that the greater use of optional extension headers can lead to increased complexity in certain scenarios.
IPv4 Address = 4 Octets = 32 Bits
Decimal: 192.168.2.1
Binary: 11000000 10101000 00000010 00000001
IP addresses available: 4,294,467,295
IPv6 Address = 16 Octets = 128 Bits
Hex: 21DA:00D3:0000:2F3B:02AA:00FF:FE28:9C5A
Binary: 00100001 11011010 00000000 11010011 00000000 00000000 00101111 00111011 00000010 10101010 00000000 11111111 11111110 00101000 10011100 01011010
IP addresses available: 3.4x10^38

OSI Model

The OSI Model remains the same, but the network layer uses IPv6.

OSI Model
7 - Application Layer
6 - Presentation Layer
5 - Session Layer
4 - Transport Layer
3 - Network Layer (IPv6)
2 - Data Link Layer
1 - Physical Layer

IPv6 Packet Header

The IPv6 header is the primary component of an IPv6 packet and plays a crucial role in the routing and delivery of IPv6 packets. It contains various fields that provide information necessary for proper packet handling. Here's an explanation of the key fields in the IPv6 header:

Header Fields
Version (4 bits): This field identifies the IP version being used. In IPv6, this field is set to 6.
Traffic Class (8 bits): This field is used to prioritize and classify traffic. It is similar in function to the Type of Service (TOS) field in IPv4. It allows for Quality of Service (QoS) and Differentiated Services (DiffServ) markings, helping routers and switches prioritize packets.
Flow Label (20 bits): This field is intended to enable routers to recognize and provide special handling for packets that belong to the same flow, such as real-time multimedia streams. However, its use is not widely deployed in practice.
Payload Length (16 bits): This field specifies the length of the IPv6 payload in octets (bytes), excluding the IPv6 header itself. It allows routers to locate the beginning of the next header or the payload data.
Next Header (8 bits): This field indicates the type of the next header that immediately follows the IPv6 header. It is similar to the IPv4 protocol field. Common values include ICMPv6 (58), TCP (6), and UDP (17). If multiple extension headers are present, this field helps the receiver process them in the correct order.
Hop Limit (8 bits): This field is equivalent to the Time to Live (TTL) field in IPv4. It represents the maximum number of hops (router traversals) a packet can make before being discarded. It is decremented by one at each hop and discarded when it reaches zero to prevent packets from endlessly circulating in the network.
Source Address (128 bits): This field contains the IPv6 address of the packet's source, which is 128 bits long.
Destination Address (128 bits): This field contains the IPv6 address of the packet's intended destination, also 128 bits long.

Address Format

IPv6 addresses can be written in different ways to enhance readability and reduce the length of the address notation. This flexibility is intended to make working with IPv6 addresses more user-friendly.

Description
IPv6 addresses are written in a hexadecimal format
The address letters are not case sensitive
Leading zeros are optional
One per address, successive fields of zeros can be written as ::
Brackets are needed to open a specific port as 8080 on a IPv6 address
Example
2001:0db8:85a3:0000:0000:8a2e:0370:7334
2001:0DB8:85A3:0000:0000:8A2E:0370:7334 is equivalent to 2001:0db8:85a3:0000:0000:8a2e:0370:7334
2001:0db8:85a3:0000:0000:8a2e:0370:7334 can be written as 2001:db8:85a3:0:0:8a2e:370:7334
2001:0db8:0000:0000:0000:0000:0000:7334 can be compressed to 2001:db8::7334
http://[2001:123:4567::8]:8080/index.html

Routers will not work with addresses that are written with “::” more than once (2001:123::ffff::abc) – it is only possible to use “::” once (2001:123::ffff:0:0:abc).

Network Prefix
Interface Identifier
64 Bits
64 Bits

An IPv6 unicast address has 128 bits. There is no subnetting & no classes as in IPv4. Every interface has a mask of /64 in IPv6. Also NAT is not used any more in IPv6. Every address within an organization is a global unique address.

EUI-64

An IPv6 Extended Unique Identifier (EUI-64) address is a type of interface identifier used in IPv6 addresses. It's a method of generating a 64-bit portion of an IPv6 address that uniquely identifies a network interface, typically associated with a device's network adapter. The EUI-64 address is often used in the interface identifier portion of an IPv6 address when autoconfiguring addresses, especially in link-local and global unicast addresses.

Description
MAC Address: The process starts with the 48-bit MAC address assigned to the network interface by the manufacturer. The MAC address is a unique identifier for the network adapter.
Insertion of "FFFE": In the EUI-64 process, the hexadecimal value "FFFE" is inserted between the third and fourth bytes of the MAC address. This insertion results in a 64-bit identifier, allowing the use of EUI-64 addresses in IPv6.
Bit Inversion: The seventh bit of the MAC address (counting from the left) is inverted. This is because the seventh bit in the first byte of a MAC address is the "universal/local" bit, which distinguishes between universally administered (assigned by the manufacturer) and locally administered (assigned by the network administrator) MAC addresses.
Combination: After the insertion of "FFFE" and the bit inversion, the resulting 64-bit identifier is combined with the network prefix to form a complete IPv6 address.
MAC Address
EUI-64
00:1A:2B:3C:4D:5E
021A:2BFF:FE3C:4D5E

EUI-64 addresses are often used in link-local addresses and global unicast addresses. For example, if a device has the MAC address "00:1A:2B:3C:4D:5E", its EUI-64 address for IPv6 would be "021A:2BFF:FE3C:4D5E". This address is then combined with the network prefix to create a full IPv6 address. EUI-64 addressing is particularly useful in situations where devices need to configure their own IPv6 addresses automatically, such as when using stateless address autoconfiguration (SLAAC). It ensures that each network interface has a unique identifier within the network, aiding in efficient and organized communication.

Prefixes

In IPv6, a prefix refers to the initial portion of an IPv6 address that indicates the network portion of the address. It provides information about the address's location within the network hierarchy and helps routers and devices determine how to route data packets across the internet. IPv6 addresses are divided into two main parts: the network prefix and the interface identifier (host portion).

Description
Prefix Notation: In IPv6, prefixes are commonly represented using CIDR (Classless Inter-Domain Routing) notation, similar to IPv4. The notation consists of the network prefix followed by a slash ("/") and the prefix length in bits. For example, "2001:0db8:85a3::/48" represents a network with a prefix length of 48 bits.
Network Hierarchy: IPv6 prefixes are hierarchical, meaning that they can be subdivided into smaller subnets to efficiently allocate IP addresses within an organization's network. This hierarchy is useful for routing purposes, as it allows routers to make decisions about how to forward data packets to their intended destinations.
Subnetting: Subnetting in IPv6 involves dividing a larger prefix into smaller prefixes to create subnetworks. For example, if an organization is assigned the prefix "2001:0db8:85a3::/48," it can further divide this prefix into smaller prefixes to create individual subnets for different departments or purposes.
Global Unicast Prefixes: Global unicast IPv6 prefixes are used to uniquely identify networks on the global internet. These prefixes are assigned by Regional Internet Registries (RIRs) to Internet Service Providers (ISPs) and organizations. Each ISP or organization can then allocate smaller prefixes to their customers or subnets.
Link-Local and Unique Local Prefixes: IPv6 also has link-local and unique local prefixes. Link-local addresses are used for communication within the same network segment and are not routable outside that segment. Unique local addresses are similar to private IPv4 addresses and are used within an organization's private network.
Autoconfiguration: IPv6 includes features for stateless autoconfiguration, where devices can automatically generate their own IPv6 addresses based on the network prefix. Devices combine the network prefix with their interface identifier to create a unique address.
IPv6 Prefix Delegation: ISPs can provide IPv6 prefix delegations to customers, allowing them to manage their own subnets and IP addresses. This is particularly useful for organizations that need to configure their internal networks.
Routing: Routers use routing tables to determine how to forward data packets. The longest matching prefix in a routing table entry is used to make routing decisions. This means that the most specific prefix entry in the routing table is chosen to determine the next hop for a packet.
Description
Address Range
Link Local Unicast
FE80::/10
Global Unicast example
2017:1:2::1/64
Aggregate Global example
2001::/16
Assigned Multicast
FF00::/8
Solicited-Node Multicast
FF02::1:FF00:0000/104
Localhost
::1/128
Default Route
::/0
All nodes
FF02::1
All routers
FF02::2
Multicast OSPFv3
FF02::5/6
Multicast IS-IS
FF02::8
Multicast RIP
FF02::9
Multicast EIGRP
FF02::A
Multicast NTP
FF02::101

Localhost

In IPv6, the equivalent address for "localhost" is "::1". This is often referred to as the loopback address in IPv6. Just like in IPv4, any data sent to "::1" is directed to the same device, allowing for self-testing and communication. The IPv6 loopback address is "::1/128", which is a single address (::1) in the IPv6 address space.

Class
IPv6
Localhost
0:0:0:0:0:0:0:1

Unicast, Multicast & Anycast

In IPv6, communication between devices is categorized into three main types: unicast, multicast, and anycast. These communication types determine how data packets are sent and received within an IPv6 network.

Description
Unicast: Unicast communication involves sending a data packet from one source device to a specific destination device. It's a one-to-one communication method. Most communication on the internet uses unicast addresses. When you access a website, send an email, or establish a direct connection, you're using unicast communication.
Multicast: Multicast communication involves sending a data packet from one source device to multiple destination devices that are interested in receiving the data. It's a one-to-many communication method.Multicast is used for scenarios where data needs to be sent to a group of devices that share a common interest. For example, multimedia streaming (like video streaming), online gaming, and software updates can benefit from multicast, as the same data can be sent to multiple recipients simultaneously.
Anycast: Anycast communication involves sending a data packet from one source device to the nearest (or best) destination device among a group of devices that share the same anycast address. It's a one-to-nearest communication method. Anycast is used for providing services from multiple locations, and the user is connected to the closest or most responsive service. For example, DNS (Domain Name System) services often use anycast to provide faster and more reliable name resolution by directing users to the nearest DNS server.

Broadcast

In traditional networking, broadcast is a communication method in which a single data packet is sent from one sender to all devices within a network segment. This method was commonly used in IPv4 networks to deliver data to all devices on a local network. However, in IPv6, the concept of broadcast communication has been eliminated.

Description
Scalability: Broadcast communication becomes inefficient as the network grows. As the number of devices increases, so does the amount of network traffic generated by broadcasts.
Security: Broadcasts are received by all devices in the broadcast domain, making them susceptible to potential security risks and unauthorized access.
Address Exhaustion: Broadcast traffic contributes to network congestion and can consume valuable network resources, particularly in larger networks.

0 Comments

Submit a Comment