Unit 2: Next Generation IP: Class: Year: Subject Teacher
Unit 2: Next Generation IP: Class: Year: Subject Teacher
COURSEOUTCOMES (COs)
The theory, practical experiences and relevant soft skills associated with this course are to be
Taught and implemented, so that the student demonstrates the following industry oriented
COs associated with the above mentioned competency:
a) Implement Network Layer Protocols.
b) Configure IPv6 Network.
c) Choose routing protocol in the given network situation.
d) Implement different Transport Layer Protocols.
e) Configure various Application Layer Protocols.
Unit 2: Next generation IP
2.1 IPv6 Addressing: Representation, address space, address space allocation, Auto-
configuration, Renumbering.
2.2 Transition from IPv4 to IPv6: Dual Stack, Tunneling, Header Translation.
2.3 IPv6 Protocol: Packet format, Extension Header.
IPV6 Addressing:
IP Features:
Layer 3 (Network layer)
Unreliable, Connectionless, Datagram
Best-effort delivery
Popular version: IPv4
Major functions
Global addressing
Datagram lifetime
Fragmentation & Reassembly
Why IPv6?
Deficiency of IPv4
Address space exhaustion
New types of service Integration
Multicast
Quality of Service
Security
Mobility (MIPv6)
Header and format limitations
Advantages of IPv6 over IPv4
Larger address space Allows billions of devices to be interconnected, mean no forced
Network Address Translators
Allow coherent end-to-end packet delivery
Improve the potential for use of end-to-end security tools for encryption and
authentication
IPv6 is “more secure” than V4
Better header format
New options
Allowance for extension
Only IPv6 supports mobility
IPv6 offers “bundled” QoS
Quality of service (QoS) refers to any technology that manages data traffic to reduce packet
loss, latency and jitter on the network. QoS controls and manages network resources by
setting priorities for specific types of data on the network. (Packet-based and stream-based
QoS)
Support for resource allocation
1
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
2
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
CHANGED CHANGED
3
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Example:
IPV6 use 16 bytes addresses If a block of 1 milion addresses is allocated every
picosecond how long will be the addresses last?
Ans.:
Total no. of address bit = 18* 8 =128
Number of addresses = 2 128 = 3.4 * 1036
One picosecond = 1 * 1012 seconds
1 million addresses = 1 *106 address
1 picosecond = 1 * 106 address
Therefore, X = 3.4 * 1038
3.4* 1038
X = ------------- * 1 picoseconds
1 * 106
Therefore, X = 3.4* 1032 picoseconds
4
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Address space:
For IPV6 it is 2 128 = 3.4 * 1036 it is 296 times bigger than IPV4.
No possible Address Depletion inIPV6.
There are three types of addresses in IPV6:
1. Unicast Addresses: Single computer as a destination, means packet delivered
to specific address.
In IPV6 it is possible to assign unicast addresses to the interfaces.
2. Anycast Addresses: Used to define group computers with addresses which
have the same prefix. It delivers the packets only one of the member of the
group which is closest or the most easily accessible. No special or separate
address block is assigned for anycasting in IPV6. These are assigned for block
of unicast addresses.
3. Multicast addressing: Defines group of computers which may or may not
share the same prefix and may not connected to the same physical network.
Packet sent by this is meant to be delivered to each of the group. There is
broad cast address as multicast perform same function. Type of address
is determined by leading bits.
OR
Unicast
o Address is for a single interface.
o IPv6 has several types (for example, global and IPv4 mapped).
Anycast
o One-to-nearest (allocated from unicast address space).
o Multiple devices share the same address.
o All anycast nodes should provide uniform service.
o Source devices send packets to anycast address.
o Routers decide on closest device to reach that destination.
o Suitable for load balancing and content delivery services.
Multicast
o One-to-many
o Enables more efficient use of the network
o Uses a larger address range
5
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Link-local: The scope is the local link (nodes on the same subnet)
Hosts on the same link (the same subnet) use these automatically
configured addresses to communicate with each other.
Neighbor Discovery provides address resolution.
The prefix for link-local addresses is FE80::/64.
The following illustration shows the structure of a link-local address
6
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Stateless Auto-configuration:
Stateless Address Configuration (IP Address, Default Router Address)
Routers sends periodic Router Advertisement
Node gets prefix information from the Router advertisement and
generates the complete address using its MAC address
Global Address=Link Prefix + EUI 64 Address
Router Address is the Default Gateway
Stateless Autoconfiguration Example
MAC address: 00:0E:0C:31:C8:1F
EUI 64 Address: 20E:0CFF:FE31:C81F
Router Solicitation is sent on FF01::2 (All Router Multicast Address)
and Advertisement sent on FF01::1 (All Node Multicast Address)
DHCPv6 https://www.youtube.com/watch?v=S43CFcpOZSI
Stateful Configuration
Provides not only IP address, also other configuration parameters like DNS
Client
Initiates requests on a link to obtain configuration parameters
use its link local address to connect the server
Send requests to FF02::1:2 multicast address
(All_DHCP_Relay_Agents_and_Servers)
IPv6 uses a new header format in which options are separated from the base header and
inserted, when needed, between the base header and the upper-layer data. This simplifies
and speeds up the routing process because
Most of the options do not need to be checked by routers.
New options.
IPv6 has new options to allow for additional functionalities.
8
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
The following is a list of changes I did for IPv6 and for legacy IP — just an overview to get an
idea of differences and stumbling blocks.
The general idea is to have a device generate a temporary address until it can determine the
characteristics of the network it is on, and then create a permanent address it can use based
on that information. In the case of multi-homed devices,
9
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Assuming the uniqueness test passes, the device assigns the link-local
address to its IP interface.
This address can be used for communication on the local network, but
not on the wider Internet (since link-local addresses are not routed).
4. Router Contact: The node next attempts to contact a local router for
more information on continuing the configuration.
This is done either by listening for Router Advertisement messages sent
periodically by routers, or
by sending a specific Router Solicitation to ask a router for information
on what to do next.
This is in reference with IPv6 Neighbor Discovery protocol.
5. Router Direction:
The router provides direction to the node on how to proceed with the
auto-configuration.
It may tell the node that on this network “stateful” auto-
configuration is in use, and tell it the address of a DHCP server to
use.
Means it will tell the host how to determine its global Internet
address.
6. Global Address Configuration:
Assuming that stateless auto-configuration is in use on the network,
the host will configure itself with its globally-unique Internet address.
This address is generally formed from a network prefix provided to the host
by the router, combined with the device's identifier as generated in the
first step.
Numerous advantages over both manual and server-based
configuration.
10
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Routers on the local network will typically tell hosts which type of
auto-configuration is supported using special flags in ICMPv6
Router Advertisement messages.
IPv6 includes an interesting feature called stateless address auto-
configuration, which allows a host to actually determine its own IPv6
address from its layer two address by following a special procedure.
11
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Integrity protection for the data that is encapsulated in the IPv6 packet is
assumed to be assured by both the link layer or error detection in higher-layer
protocols, namely the Transmission Control Protocol (TCP) and the User
Datagram Protocol (UDP) on the transport layer.
Thus, while IPv4 allowed UDP datagram headers to have no checksum
(indicated by 0 in the header field), IPv6 requires a checksum in UDP headers.
IPv6 routers do not perform IP fragmentation.
IPv6 hosts are required to either perform path MTU discovery,
perform end-to-end fragmentation, or
to send packets no larger than the default Maximum transmission unit (MTU),
which is 1280 octets.
Mobility
Unlike mobile IPv4, mobile IPv6 avoids triangular routing and is therefore as
efficient as native IPv6.
IPv6 routers may also allow entire subnets to move to a new router connection
point without renumbering.
Extension headers
The IPv6 packet header has a minimum size of 40 octets (320 bits).
Options are implemented as extensions.
This provides the opportunity to extend the protocol in the future without
affecting the core packet structure.
However, a study in 2015 indicated that some network operators dropped IPv6
packets with extension headers when they traversed transit autonomous systems.
Changes overview
The following table summarizes the number of changes I did for both Internet
protocols.
In fact, it is a list that compares the usage of IPv6 GUA addresses vs IPv4 private
addresses in server configurations.
IPv6 global addresses are similar to IPv4 public addresses. As the name
implies, they are routable on the internet. ...
A global Unicast Address IPv6 (GUA) address consists of two parts:
subnet ID – 64 bits long. Contains the site prefix (obtained from a Regional
Internet Registry) and the
subnet ID (subnets within the site).
IPv6 Legacy IP
Firewall: Interfaces 7x 2x
12
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
IPv6 Legacy IP
DNS Authoritative 5x 4x
Zones: masters, also-
notify
Reverse DNS PTR 40x (incl. new zone for None (since internal RFC
Records new v6 range) 1918 addresses haven't
changed)
RIPE Atlas 2x 1x
measurements
13
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
IPv6 Legacy IP
Dual-stack IP implementation
14
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
can communicate with other nodes in the LAN or the Internet using either IPv4 or
IPv6.
The Domain Name System (DNS) protocol is used by both IP protocols to
resolve fully qualified domain names (FQDN) and IP addresses,
but dual stack requires that the resolving DNS server can resolve both types of
addresses.
Such a dual stack DNS server would hold IPv4 addresses in the A records, and
IPv6 addresses in the AAAA records.
Depending on the destination that is to be resolved, a DNS name server may
return an IPv4 or IPv6 IP address, or both.
A default address selection mechanism, or preferred protocol, needs to be
configured either on hosts or the DNS server.
The IETF(Internet Engineering Task Force) has published Happy Eyeballs ==
called Fast Fallback) is an algorithm published by the IETF which can make dual-
stack applications more responsive to users )to assist dual stack applications, so that
they can connect using both IPv4 and IPv6, but prefer an IPv6 connection if it is
available.
dual-stack also needs to be implemented on all routers between the host and the
service for which the DNS server has returned a IPv6 address.
Dual-stack clients should only be configured to prefer IPv6, if the network is able to
forward IPv6 packets using the IPv6 versions of routing protocols.
When dual stack networks protocols are in place the application layer can be
migrated to IPv6.
While dual-stack is supported by major operating system and network
device vendors, legacy networking hardware and servers don't support IPv6.
Tunneling is a feature that is used to transport packets from one type of network over a
network of a different type.
The most common type is 6to4 tunneling. This type of tunneling allows for IPv6
packets to be transported over an IPv4 network through encapsulation.
6to4 tunneling was created to support both IP types during the transition from IPv4
to IPv6. A less common type of tunneling is 4to6 tunneling.
15
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
This type of tunneling allows for IPv4 packets to be transported over an IPv6
network.
This article explains how to configure tunneling on the RV215W.
Tunneling 6 to 4 Tunneling:
allows for the transmission of IPv6 packets over an IPv4 network.
is achieved by encapsulating the IPv6 packet into an IPv4 packet.
Once the packet is received by the remote IPv6 network,
the packet is de-capsulated back to an IPv6 packet.
This type of tunneling is used if your ISP does not provide 6RD (Rapid
Deployment) tunneling.
Step 1. Log in to the web configuration utility and choose
Networking > IPv6 > Tunneling. The Tunneling page opens:
16
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
6RD Tunneling
6 Rapid Deployment (6RD) is a more secure version of 6to4 tunneling.
In 6RD each ISP provides its own unique IPv6 prefix instead of the standard 2002::/16
6to4 prefix.
This allows the ISP to control QoS of the tunnel and who gets to use the relay servers.
Quality of Service (QOS) in IPv6. Several features are added to IPv6 specification in
addition to 128-bits addressing as the IPv6 specification made its way through the IETF
committee process. ... Quality of Service (QOS) is an important term and an emerging
feature of modern networks
Step 1. Log in to the web configuration utility and choose Networking > IPv6 >
Tunneling.
The Tunneling page opens:
17
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
• IPv4 Mask Length — Enter the IPv4 mask length of the remote end point.
Step 6. Click Save.
4 to 6 Tunneling
4to6 tunneling allows for the transmission of IPv4 packets over an IPv6 network.
This feature is used when the local IPv4 network sends packets across an IPv6
inter-network to a remote IPv4 network.
Step 1. Log in to the web configuration utility and
choose Networking > IPv6 > Tunneling.
The Tunneling page opens:
18
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
19
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
20
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
AUTOCONFIGURATION
When a host in IPv6 joins a network, it can configure itself using the following
process:
1. The host first creates a link local address for itself. This is by taking the 10-bit
link Local prefix (1111 1110 10), adding 54 zeros, and adding the 64-bit
interface identifier, which any host knows how to generate it from its interface
card. The result is a 128-bit link local address.
2. The host then tests to see if this link local address is unique and not used by
other
hosts. Since the 64-bit interface identifier is supposed to be unique, the link
local address generated is unique with a high probability. However, to be sure,
the host sends a neighbor solicitation message (see Chapter 28) and waits for
neighbor advertisement message. If any host in the subnet is using this link local
address, the process fails and the host cannot auto-configure itself; it needs to
use other means such as DHCP protocol for this purpose.
3. If the uniqueness of the link local address is passed, the host stores this address
as its link-local address (for private communication), but it still needs a global
unicast address. The host then sends a router solicitation message (see Chapter
28) to a local router. If there is a router running on the network, the host
receives a router advertisement message that includes the global unicast prefix
and the subnet prefix that the host needs to add to its interface identifier to
generate its global unicast address. If the router cannot help the host with the
configuration, it informs the host in the router advertisement message (by
setting a flag). The host then needs to use other means for configuration.
Example:
Assume a host with Ethernet address ( F5-A9-23-11-9B-E2) has joined the network.
What would be its global unicast address if the global unicast prefix of the organization
is 3A21:1216:2165 and the subnet identifier is A245:1232.
Solution
21
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
RENUMBERING:
To allow sites to change the service provider, renumbering of the address
prefix ( ) was built into IPv6 addressing.
Each site is given a prefix by the service provider to which it is connected.
If the site changes the provider, the address prefix needs to be changed.
A router to which the site is connected can advertise a new prefix and
let the site use the old prefix for a short time before disabling it.
In other words, during the transition period, a site has two prefixes.
The main problem in using the renumbering mechanism is the support of the
DNS, which needs to propagate the new addressing associated with a domain
name.
A new protocol for DNS, called Next Generation DNS, is under study to provide
support for this mechanism.
Dual Stack
It is recommended that all hosts, before migrating completely to version 6,
have a dual stack of protocols.
In other words, a station must run IPv4 and IPv6 simultaneously until all
the Internet uses IPv6. The layout of a dual-stack configuration is :
22
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Header Translation
is necessary when the majority of the Internet has moved to IPv6 but some
systems still use IPv4.
The sender wants to use IPv6, but the receiver does not understand IPv6.
Tunneling does not work in this situation because the packet must be in the
IPv4 format to be understood by the receiver.
In this case, the header format must be totally changed through header
translation.
The header of the IPv6 packet is converted to an IPv4 header
Header translation uses the mapped address to translate an IPv6 address to an IPv4 address.
The following lists some rules used in transforming an IPv6 packet header to an IPv4 packet
header.
The IPv6 mapped address is changed to an IPv4 address by extracting the rightmost 32 bits.
The value of the IPv6 priority field is discarded.
23
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
IPv6 protocol responds to the above issues using the following main changes in the protocol:
PACKET FORMAT
24
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Base Header
Hop limit. This 8-bit hop limit field serves the same purpose as the TTL field in
IPv4.
Source address. The source address field is a 16-byte (128-bit) Internet address
that identifies the original source of the datagram.
Destination address. The destination address field is a 16-byte (128-bit) Internet
address that usually identifies the final destination of the datagram. However, if
source routing is used, this field contains the address of the next router.
Comparison between IPv4 and IPv6 Headers
25
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
The header length field is eliminated in IPv6 because the length of the header is fixed in
this version.
The service type field is eliminated in IPv6.
The traffic class and flow label fields together take over the function of the service type
field.
The total length field is eliminated in IPv6 and replaced by the payload length field.
The identification, flag, and offset fields are eliminated from the base header in IPv6.
They are included in the fragmentation extension header.
The TTL field is called hop limit in IPv6.
The protocol field is replaced by the next header field.
The header checksum is eliminated because the checksum is provided by upper layer
protocols; hence not needed at this level.
The option fields in IPv4 are implemented as extension headers in IPv6.
Extension Headers
26
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
is used when the source needs to pass information to all routers visited by
the datagram.
For example, perhaps routers must be informed about certain
management, debugging, or control functions. Or, if the length of the
datagram is more than the usual 65,535 bytes, routers must have this
information. Figure 27.5 shows the format of the hop-by-hop option
header.
The first field defines the next header in the chain of headers.
The header length defines the number of bytes in the header (including
the next header field).
The rest of the header contains different options.
So far, only three hop-by-hop options have been defined:
Pad1,
PadN,
jumbo payload.
27
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
PadN.
PadN is similar in concept to Pad1. The difference is that PadN is used when 2
or more bytes are needed for alignment.
This option consists of 1 byte of option code, 1 byte of the option length, and a
variable number of zero padding bytes.
The value of the option code is 1 (action is 00, the change bit is 0, and type is
00001).
The option length contains the number of padding bytes. See Figure 27.8.
Jumbo payload.
The length of the payload in the IP datagram can be a maximum of 65,535
bytes.
if for any reason a longer payload is required, we can use the jumbo payload
option to define this longer length.
The jumbo payload option must always start at a multiple of 4 bytes plus 2 from
the beginning of the extension headers. The jumbo payload option starts at the
(42) byte, where n is a small integer n. See Figure 27.9
Destination Option
28
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
is used when the source needs to pass information to the destination only.
Intermediate routers are not permitted access to this information.
The format of the destination option is the same as the hop-by-hop option (refer
back to Figure 27.5).
So far, only the Pad1 and PadN options have been defined.
Source Routing
The source routing extension header combines the concepts of the strict source
route and the loose source route options of IPv4.
The source routing header contains a minimum of seven fields (see Figure
27.10).
The first two fields, next header and header length, are identical to that of
the hop-by-hop extension header.
The type field defines loose or strict routing. The addresses left field indicates the
number of hops still needed to reach the destination.
The strict/loose mask field determines the rigidity of routing.
If set to strict, routing must follow exactly as indicated by the source. If, instead,
the mask is loose, other routers may be visited in addition to those in the header.
The destination address in source routing does not conform to our previous
definition (the final destination of the datagram). Instead, it changes from router
to router.
29
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Fragmentation
The concept of fragmentation is the same as that in IPv4. However, the place
where fragmentation occurs differs.
In IPv4, the source or a router is required to fragment if the size of the datagram
is larger than the MTU of the network over which the datagram travels.
In IPv6, only the original source can fragment.
A source must use a Path MTU Discovery technique to find the smallest MTU
supported by any network on the path.
The source then fragments using this knowledge.
If the source does not use a Path MTU Discovery technique, it fragments the
datagram to a size of 1,280 bytes or smaller.
This is the minimum size of MTU required for each network connected to the
Internet. Figure 27.12 shows the format of the fragmentation extension
header.
Authentication
The authentication extension header has a dual purpose:
it validates the message sender and
ensures the integrity of data.
The former is needed so the receiver can be sure that a message is from the
genuine sender and not from an imposter.
The latter is needed to check that the data is not altered in transition by some
hacker.
The format of the authentication extension header is shown in Figure 27.13.
The security parameter index field defines the algorithm used for
authentication.
The authentication data field contains the actual data generated by the
algorithm.
Many different algorithms can be used for authentication.
Figure 27.14 outlines the method for calculating the authentication data field.
The sender passes a 128-bit security key, the entire IP datagram, and the 128-
bit security key again to the algorithm.
Those fields in the datagram with values that change during transmission (for
example, hop count) are set to zero.
The datagram passed to the algorithm includes the authentication header
extension, with the authentication data field set to zero.
The algorithm creates authentication data which is inserted into the extension
header prior to datagram transmission.
The receiver functions in a similar manner.
It takes the secret key and the received datagram (again, with changeable fields
set to zero) and passes them to the authentication algorithm.
If the result matches that in the authentication data field, the IP datagram is
authentic; otherwise, the datagram is discarded.
30
Class: CO5I-A-B Adv. Computer Network (22520)Year:2019-20-21
Subject Teacher: Manish V. Salvi. (Computer Engineering)
Comparison between IPv4 and IPv6
The following shows a quick comparison between the options used in IPv4 and the
options used in IPv6 (as extension headers).
The no-operation and end-of-option options in IPv4 are replaced by Pad1 and
PadN options in IPv6.
The record route option is not implemented in IPv6 because it was not used.
The timestamp option is not implemented because it was not used.
The source route option is called the source route extension header in IPv6.
The fragmentation fields in the base header section of IPv4 have moved to the
fragmentation extension header in IPv6.
The authentication extension header is new in IPv6.
The encrypted security payload extension header is new in IPv6.
31