IPv6
Why IPv6
IPv4 address exhaustion is the depletion of the pool of unallocated IPv4
addresses. Because the original Internet architecture had fewer than 4.3
billion addresses available, depletion has been anticipated since the late
1980s, when the Internet started experiencing dramatic growth.
The main market forces that accelerated IPv4 address depletion included the
rapidly growing number of Internet users, always-on devices, and mobile
devices.
The anticipated shortage has been the driving factor in creating and adopting
several new technologies, including network address translation (NAT),
Classless Inter-Domain Routing (CIDR) in 1993, and IPv6 in 1998.
Present State of IPv4
The top-level exhaustion occurred on 31 January 2011.
All RIRs have exhausted their address pools, except those reserved for
IPv6 transition; this occurred on 15 April 2011 for the Asia-Pacific
(APNIC)
10th June 2014 for Latin America and the Caribbean (LACNIC),
on 24th September 2015 for North America
on 24th September 2015 for North America
25th November 2019 for Europe, Middle East and Central Asia (RIPE
NCC)
These RIRs still allocate recovered addresses or addresses reserved for
a special purpose.
Individual ISPs still have pools of unassigned IP addresses, and could
recycle addresses no longer needed by subscribers.
IPv6 Representation
• An IPv6 address is 128 bits or 16 bytes (octets) long, four times the address length in IPv4.
• The following shows two of these notations: binary and colon hexadecimal.
• Binary notation is used when the addresses are stored in a computer.
• The colon hexadecimal notation (or colon hex for short) divides the address into eight
sections, each made of four hexadecimal digits separated by colons.
• Binary notation is used when the addresses are stored in a computer.
• The colon hexadecimal notation (or colon hex for short) divides the address into eight sections,
each made of four hexadecimal digits separated by colons.
Compressing IPv6
• Although an IPv6 address, even in hexadecimal format, is very long,
many of the digits are zeros.
• In this case, we can abbreviate the address.
• The leading zeros of a section can be omitted.
• Using this form of abbreviation, 0074 can be written as 74, 000F as F,
and 0000 as 0. Note that 3210 cannot be abbreviated.
• Further abbreviation, often called zero compression, can be applied to
colon hex notation if there are consecutive sections consisting of zeros
only.
• We can remove all the zeros and replace them with a double colon.
• Note that this type of abbreviation is allowed only once per address. If there is more than
one run of zero sections, only one of them can be compressed.
Compressing IPv6
Notation (Mixed)
Sometimes we see a mixed representation of an IPv6 address: colon
hex and dotted-decimal notation.
This is appropriate during the transition period in which an IPv4
address is embedded in an IPv6 address (as the rightmost 32 bits).
We can use the colon hex notation for the leftmost six sections and
four-byte dotted-decimal notation instead of the rightmost two
sections.
However, this happens when all or most of the leftmost sections of the
IPv6 address are 0s.
For example, the address (::[Link]) is a legitimate address in
IPv6, in which the zero compression shows that all 96 leftmost bits of
the address are zeros.
Address Space
The address space of IPv6 contains 2128 addresses. This address
space is 296 times the IPv4 address-definitely no address
depletion-as shown, the size of the space is
To give some idea about the number of addresses, we assume that only
1/64 (almost 2 percent) of the addresses in the space can be assigned to
the people on planet Earth and the rest are reserved for special
purposes.
We also assume that the number of people on the earth is soon to be 234
(more than 16 billion). Each person can have 288 addresses to use.
Address depletion in this version is impossible.
Address Space Allocation
• Like the address space of IPv4, the address space of IPv6 is divided into
several blocks of varying size and each block is allocated for a special
purpose.
• Most of the blocks are still unassigned and have been set aside for future
use.
Addressing
Supports Three types of addressing:
Unicast Address: A unicast address defines a single interface
(computer or router). The packet sent to a unicast address will be
routed to the intended recipient.
Anycast Address: An anycast address defines a group of computers
that all share a single address. A packet with an anycast address is
delivered to only one member of the group, the most reachable one
Multicast Address: A multicast address also defines a group of
computers. However, there is a difference between anycasting and
multicasting. In anycasting, only one copy of the packet is sent to one
of the members of the group; in multicasting each member of the
group receives a copy.
Quiz-1
IPv6 does not use _________ type of address.
a) broadcast
b) multicast
c) anycast
d) unicast
Address Formats
• An IPv6 address consists of 128 bits. For each of the major addressing and
routing methodologies, various address formats are recognized by dividing
the 128 address bits into bit groups and using established rules for
associating the values of these bit groups with special addressing features.
An IPv6 is divided into following address groups
Unicast and anycast address format
Address Formats (Cont.…)
Unique local address format
The prefix field contains the binary value 1111110.
The L bit is one for locally assigned addresses;
The address range with L set to zero is currently not defined. The random field is chosen randomly
once, at the inception of the /48 routing prefix.
Address Formats (Cont.…)
Link Local address format
The prefix field contains the binary value 1111111010. The 54 zeroes that follow make the total network
prefix the same for all link-local addresses (fe80::/64 link-local address prefix), rendering them non-
routable.
Address Formats (Cont.…)
Multicast address format
For all multicast addresses, the prefix field holds the binary value 11111111.
Currently, three of the four flag bits in the flg field are defined; the most-significant flag bit is reserved for
future use.
The four-bit scope field (sc) is used to indicate where the address is valid and unique.
IPv6 Representation
• An IPv6 address is represented as eight groups of four hexadecimal digits, each
group representing 16 bits The groups are separated by colons (:).
[Link]
• The hexadecimal digits are always compared in case-insensitive manner, but IETF
recommendations suggest the use of only lower case letters.
[Link] is preferred over [Link];
• Leading zeros in each 16-bit field are suppressed, but each group must retain at
least one digit. For example
[Link] is rendered as [Link]
• The longest sequence of consecutive all-zero fields is replaced with two colons (::). If
the address contains multiple runs of all-zero fields of the same size, to prevent
ambiguities, it is the leftmost that is compressed. For example,
[Link] is rendered as [Link] rather than as
[Link].
IPv6 Representation (Cont.…)
:: is not used to represent just a single all-zero field.
[Link] is shortened to [Link],
but [Link] is rendered as [Link].
During the transition of the Internet from IPv4 to IPv6, it is typical to operate
in a mixed addressing environment. For such use cases, a special notation
has been introduced, which expresses IPv4-mapped and IPv4-compatible
IPv6 addresses by writing the least-significant 32 bits of an address in the
familiar IPv4 dot-decimal notation, whereas the 96 most-significant bits are
written in IPv6 format. For example,
the IPv4-mapped IPv6 address [Link] is written as ::ffff:[Link],
thus expressing clearly the original IPv4 address that was mapped to IPv6.
Network Address
• An IPv6 network uses an address block that is a contiguous group of
IPv6 addresses of a size that is a power of two. The leading set of bits
of the addresses are identical for all hosts in a given network, and are
called the network's address or routing prefix.
• Network address ranges are written in CIDR notation. A network is
denoted by the first address in the block (ending in all zeroes), a slash
(/), and a decimal value equal to the size in bits of the prefix.
• For example, the network written as [Link]/48 starts at
address [Link] and ends at
[Link].
• The routing prefix of an interface address may be directly indicated
with the address using CIDR notation. For example, the configuration
of an interface with address [Link] connected to subnet
[Link]/64 is written as [Link]/64.
Address Block Size
• The size of a block of addresses is specified by writing a slash (/)
followed by a number in decimal whose value is the length of the
network prefix in bits.
• For example, an address block with 48 bits in the prefix is
indicated by /48. Such a block contains 2128 − 48 = 280 addresses.
The smaller the value of the network prefix, the larger the block: a
/21 block is 8 times larger than a /24 block.
IPv6 Packet Header
Version (4-bits): It represents the version of
Internet Protocol, i.e. 0110.
Traffic Class (8-bits): These 8 bits are
divided into two parts. The most significant
6 bits are used for Type of Service to let
the Router Known what services should be
provided to this packet. The least
significant 2 bits are used for Explicit
Congestion Notification (ECN).
Flow Label (20-bits): This label is used to
maintain the sequential flow of the packets
belonging to a communication. The source
labels the sequence to help the router
identify that a particular packet belongs to
a specific flow of information. This field
helps avoid re-ordering of data packets. It
is designed for streaming/real-time media.
IPv6 Packet Header
Payload Length (16-bits): This field is
used to tell the routers how much
information a particular packet contains in
its payload. Payload is composed of
Extension Headers and Upper Layer data.
With 16 bits, up to 65535 bytes can be
indicated; but if the Extension Headers
contain Hop-by-Hop Extension Header,
then the payload may exceed 65535 bytes
and this field is set to 0.
Next Header (8-bits): This field is used to
indicate either the type of Extension
Header, or if the Extension Header is not
present then it indicates the Upper Layer
PDU.
IPv6 Packet Header
Hop Limit (8-bits): This field is used to
stop packet to loop in the network infinitely.
The value of Hop Limit field is
decremented by 1 as it passes a link
(router/hop). When the field reaches 0 the
packet is discarded.
Source Address (128-bits): This field
indicates the address of originator of the
packet.
Destination Address (128-bits): This field
provides the address of intended recipient
of the packet.
Transition from IPv4 to IPv6
• When we want to send a request from an IPv4 address to an IPv6
address, but it isn’t possible because IPv4 and IPv6 transition is
not compatible. For a solution to this problem, we use some
technologies. These technologies are
a) Dual Stack Routers,
b) Tunneling, and
c) NAT Protocol Translation
Network Address Translation
• It’s a way to map multiple local private addresses to a public one
before transferring the information.
• Organizations that want multiple devices to employ a single IP
address use NAT, as do most home routers.
Why Dual Stack?
• Dual stack means that devices are able to run IPv4 and IPv6 in
parallel. It allows hosts to simultaneously reach IPv4 and IPv6
content, so it offers a very flexible coexistence strategy.
• Benefits
• Native dual stack does not require any tunneling mechanisms on internal
networks
• Both IPv4 and IPv6 run independent of each other
• Dual stack supports gradual migration of endpoints, networks, and
applications
Dual Stack Router in Three Layers
The access layer, which is the lowest level of the Cisco
three tier network model, ensures that packets are delivered
to end user devices. This layer is sometimes referred to as the
desktop layer, because it focuses on connecting client nodes
to the network.
The distribution layer is the smart layer in the three-layer
model. Routing, filtering, and QoS policies are managed at the
distribution layer. Distribution layer devices also often manage
individual branch-office WAN connections. This layer is also
called the Workgroup layer.
The core layer is a high-speed backbone that should be
designed to switch packets as quickly as possible to
optimize communication transport within the network.
Because the core is critical for connectivity, core layer devices
are expected to provide a high level of availability and
reliability.
The aggregation (or distribution) layer aggregates the uplinks
from the access layer to the data center core. This layer is
the critical point for control and application services.
How NAT Works?
• Let’s say that there is a laptop connected to a home router. Someone uses
the laptop to search for directions to their favorite restaurant. The laptop
sends this request in a packet to the router, which passes it along to the
web. But first, the router changes the outgoing IP address from a private
local address to a public address.
• If the packet keeps a private address, the receiving server won’t know where
to send the information back to — this is akin to sending physical mail and
requesting return service but providing a return address of anonymous. By
using NAT, the information will make it back to the laptop using the router’s
public address, not the laptop’s private one.
Types of NAT
1. Static NAT: When the local address is converted to a public one, this NAT
chooses the same one. This means there will be a consistent public IP address
associated with that router or NAT device.
2. Dynamic NAT: Instead of choosing the same IP address every time, this NAT
goes through a pool of public IP addresses. This results in the router or NAT
device getting a different address each time the router translates the local
address to a public address.
3. PAT: PAT stands for port address translation. It’s a type of dynamic NAT,
but it bands several local IP addresses to a singular public one. Organizations
that want all their employees’ activity to use a singular IP address use a PAT,
often under the supervision of a network administrator.