Unit 4
Unit 4
Unit IV
• The initial design did not anticipate today's Internet scale and size.
Exhausting IPv4 address space
Large routing tables
Simpler management of IPv4 addresses
Security at IP level
QoS requirements
• Flexible Header Format: IPv6 uses an entirely new and incompatible datagram
format. Unlike the IPv4 fixed-format header, IPv6 defines a set of optional headers.
• Improved Options: Like IPv4, IPv6 allows a datagram to include optional control
information. IPv6 includes new options that provide additional facilities not available
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 4
in IPv4.
IPv6 Features
• Provision For Protocol Extension: Perhaps the most significant change in IPv6 is a
move away from a protocol that fully specifies all details to a protocol that can permit
additional features. The extension capability has the potential to allow the IETF to
adapt the protocol to changes in underlying network hardware or to new applications.
•
• Support For Auto configuration And Renumbering: IPv6 provides facilities that
allow computers on an isolated network to assign themselves addresses and begin
communicating without depending on a router or manual configuration. The protocol
also includes a facility that permits a manager to renumber networks dynamically.
• Support For Resource Allocation: IPv6 has two facilities that permit pre-allocation
of network resources: a flow abstraction and a differentiated service specification.
The latter will use the same approach as IPv4's differentiated services.
• Multicast Identifies a group of interfaces, usually on different nodes. Packets that are
sent to the multicast address go to all members of the multicast group.
• Anycast Identifies a group of interfaces, usually on different nodes. Packets that are
sent to the anycast address go to the anycast group member node that is physically
closest to the sender.
• The next field is the 16-bit subnet ID, which you (or another administrator) allocate
for your site. The subnet ID describes the private topology, also known as the site
topology, because it is internal to your site.
• The rightmost four fields (64 bits) contain the interface ID, also referred to as
a token. The interface ID is either automatically configured from the interface's MAC
address or manually configured in EUI-64 format.
• This example shows all 128 bits of an IPv6 address. The first 48
bits, 2001:0db8:3c4d, contain the site prefix, representing the public topology. The
next 16 bits, 0015, contain the subnet ID, representing the private topology for the
site. The lower order, rightmost 64 bits, 0000:0000:1a2f:1a2b, contain the interface
ID.
• Leading zeroes in any 16-bit field can be dropped, but each block you do this with must
have at least one number remaining. If the block is all zeroes, you have to leave one
zero. This is leading zero compression.
• FF02:0:0:0:0:0:0:2 FF02::2 The key rule: you can only do this zero compression once in an IPv6 address.
• loopback address Example:
Leading zeroes in any 16-bit field can be dropped, but each block you do this with must have at least one
number remaining. If the block is all zeroes, you have to leave one zero. This is leading zero compression.
Example:
Original format:
1234:0000:1234:0000:1234:0000:0123:1234
1234:0:1234:0:1234:0:123:1234
Recap..
• For example
1. FF02::2
2. two blocks - “FF02” block and “2” block.
3. The number of bits expressed by the “::” is 96 (96 = (8 – 2)16).
Solution
a. 0000:0000:0000:0000:FFFF:FFFF:FFFF:FFFF
b. 0000:0000:0000:0000:0000:0000:0000:0000
c. FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
d. AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA
The following shows the zero contraction version of addresses in Example 1 (part c and
d cannot be abbreviated)
a. :: FFFF:FFFF:FFFF:FFFF
b. ::
c. FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
d. AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA
a. 1111::2222
b. ::
c. 0:1::
d. AAAA:A:AA::1234
Solution
a. 1111:0000:0000:0000:0000:0000:0000:2222
b. 0000:0000:0000:0000:0000:0000:0000:0000
c. 0000:0001:0000:0000:0000:0000:0000:0000
d. AAAA:000A:00AA:0000:0000:0000:0000:1234
• Prefixes for IPv6 subnets, routes, and address ranges are expressed in the same way as
Classless Inter-Domain Routing (CIDR) notation for IPv4.
Three major categories of IPv6 addresses: Physical media refers to the physical materials that are
used to store or transmit information in data
• Unicast—For a single interface. communications
• Multicast—For a set of interfaces on the same physical medium. A packet is sent to all
interfaces associated with the address.
• Anycast—For a set of interfaces on different physical media. A packet is sent to only one
of the interfaces associated with this address, not to all the interfaces.
address
groups of Private carry an IPv4
resolution global
devices used addressing address in the
to reach the routing
by Operating within a low-order 32
neighboring table(ISP)
System and campus bits of the
nodes
same interface address
attached to the
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 24
same link
Unicast Addresses
• A unicast address identifies a single interface. A network interface is the point of interconnection between
a computer and a private or public network
A unicast address is used to refer to a single host. It is meant to send data to a single destination.
• When a network device sends a packet to a unicast address, the packet goes only to the
specific interface identified by that address.
• Unicast addresses support a global address scope and two types of local address
scopes.
• A unicast address consists of n bits for the prefix, and 128 – n bits for the interface ID.
In the IPv6 implementation for a subscriber access network, the following types of
unicast addresses can be used:
• Global unicast address - A unique IPv6 address assigned to a host interface. These
addresses have a global scope and essentially the same purposes as IPv4 public
addresses. Global unicast addresses are routable on the Internet.
• Loopback IPv6 address - An IPv6 address used on a loopback interfaces. The IPv6
loopback address is 0:0:0:0:0:0:0:1, which can be notated as ::1/128.
• A multicast address identifies a set of interfaces that typically belong to different nodes.
• When a network device sends a packet to a multicast address, the device broadcasts the
packet to all interfaces identified by that address.
• IPv6 does not support broadcast addresses, but instead uses multicast addresses in this
role.
• Multicast addresses support 16 different types of address scope, including node, link,
site, organization, and global scope.
• An anycast address identifies a set of interfaces that typically belong to different nodes.
• Anycast addresses are similar to multicast addresses, except that packets are sent only to one
interface, not to all interfaces.
• The routing protocol used in the network usually determines which interface is physically closest
within the set of anycast addresses and routes the packet along the shortest path to its destination.
• There is no difference between anycast addresses and unicast addresses except for the subnet-router
address.
• For an anycast subnet-router address, the low-order bits, typically 64 or more, are zero.
• Figure Address space allocation shows that only a portion of the address space can be
used for global unicast communication. How many addresses are in this block?
Solution
• This block occupies only one-eighth of the address spaces. To find the number of
addresses, we can divide the total address space by 8 or 23 . The result is (2128)/(23) =
2125 —a huge block.
• Global unicast address objective is to reach any host globally across the internet uniquely
• CIDR Notation for the block is 2000::/3, where 3 refers to that 3 leftmost bit is common for all
address in this block (001)
• The size of the address space is 2125 which is more than for expansion of internet in many
years
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 35
Global Unicast Addresses
• The first 48 bits of a global unicast address are called global routing prefix.
• They are used to route the packet through the Internet to the organization site such
as ISP that owns the block.
• The first three bits in this part is fixed (001), Remaining 45 bits can defined up to
245 sites
• The global routers in the Internet route a packet to its destination site based on the
value of n.
Subnet Identifier :
Interface Identifier :
• Last 64 bits refers to the interface identifier. It is similar to the hostId in IPV4 scheme.
• In IPV4 addressing, there is no relation between the hostid (32 bits) and MAC(48 bits) due to the
difference in length.
• Physical address whose length is less than 64 bits can be embedded as the whole or part of the
interface identifier, eliminating the mapping process with the help of IPv6.
• Two common physical addressing scheme can be considered for this purpose: the 64-bit extended
unique identifier (EUI-64) defined
Unit IV – by IEEE
18CSC302J and the
– Computer 48-bit
Networks ODD) address defined by Ethernet.
physical
(2022-2023 38
Mapping EUI-64
To map a 64-bit physical address, the global/local bit of this format needs to be changed
from 0 to 1 (local to global) to define an interface address
Soln : To map the EUI to interface identifier we need to invert the seventh bit of first octet. The
first octet value
F5 -> (11110101)
F7 -> (11110111)
Interface identifier is F7-A9-23-EF-07-14-7A-D2
Soln : To map the Ethernet address to interface identifier, we need to invert the seventh bit of first
octet and FFFE has to be inserted after the 3 octet.
F5-A9-23-14-7A-D2 (11110101)
F7-A9-23-FF-FE-14-7A-D2 (11110111)
• The DHCPv6 server keeps a list of nodes to which it supplies configuration information.
• It also maintains state information so the server knows how long each address is in use, and
when it might be available for reassignment.
IPV6 Auto configuration
b) Stateless Auto-configuration.
• This is suitable for small organizations and individuals.
• Each host determines its addresses from the contents of received router advertisements.
• Using the IEEE EUI-64 standard to define the network ID portion of the address, it is
reasonable to assume the uniqueness of the host address on the link.
Dynamic Addressing
• Router Advertisement (RA) Messages are sent periodically or any time after receiving
a Solicitation Message. Routers answers in four ways for this RA messages:
1) SLAAC (Stateless) - Use only router advertisements
2) SLAAC + DHCPv6 (Stateless) - Use router advertisements and DHCPv Server
3) DHCPv6 (Statefull) - Use DHCP server Only
4) DHCPv6 (Statefull + Stateless) - Use DHCP server Only but we can use stateless also
The ICMP Router Solicitation message is sent from a computer host to any routers on the local area network to request that they advertise their
presence on the network.
• In IPV4 usually the network manager will assign the address (static) for each host in the
network in-case if the network uses DHCP (dynamic host configuration protocol) the host
will be assign a dynamic address when the host join the network and it keeps changing
every time it joins the network.
1. Host create a link local address by taking 10 bit local prefix (1111 1110 10) and add
54 zeros and adding 64 bits interface identifier of its own from the interface card
which makes as 128 bit link local address.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 47
Auto Configuration
2. The host verifies the uniqueness of the link local address by sending the neighbour
solicitation message and waits for the neighbour advertisement message. Incase if
any of the host address matches then auto configuration process results in failure
which can be counter by either DHCP or manual configuration
3. If the uniqueness test for link local address is successful, then the host send router
solicitation message to the local router. If the local router running in the network
sends a router advertisement message from which thee host extract the global unicast
prefix and the subnet prefix and append the same with local link to complete the
address. Incase if the router cant help for auto configuration it inform the host by
setting the flag in the advertisement message.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 48
Computing the global unicast address
1. Assume a host with Ethernet address (F5-A9-23-11-9B-E2)16 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.
Soln:
Step 1 : Creating a local link address by adding 10 bit prefix (1111 1110 10) and 54 zeros and append its 64 bit interface
ID extracted from the Ethernet address :
FE80 : :F7A9-23FF-FE11-9BE2 (by inverting the seventh bit of 1st octet and adding FFFE after the third octet)
Step 2 : On assuming this uniqueness it send the router solicitation message upon receiving the advertisement message it
complete the auto configuration process by extracting the global unicast prefix and subnet identifier from the message as
follows 3A21:1216:2165:A245:1232 and append it to the local link address
3A21:1216:2165:A245:1232: F7A9-23FF-FE11-9BE2
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 49
Renumbering
• Renumbering allow the site to change the service provider and reconfigure the IPV6 address.
• If the site changes the service provider the address prefix needs to be changed.
• Once the service provider changes the router advertises the new prefix and the site uses the old
prefix before its disabling.
• The main hindrance in renumbering is support of the DNS, which needs to propagate the new
addressing associated with a domain name. Anew protocol called Next generation DNS in
exploration.
1. Address depletion
2. slowness of the process due to some unnecessary processing, and support for multimedia and security.
• Larger address space. Instead of 32bit addressing scheme it uses 128 bit addressing format.
• Better header format. Options are flexible i.e., removed from base header and inserted when needed which speed up the routing
process.
• New options. IPv6 has new options to allow for additional functionalities.
• Allowance for extension. IPv6 is designed to allow the extension of the protocol if required by new technologies or applications.
• Support for resource allocation. In place of type-of-service field two new fields, traffic class and flow label have been added to
enable the source to request special handling of the packet which enable the support for multimedia transmission
• Support for more security. The encryption and authentication options in IPv6 provide confidentiality and integrity of the packet.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 52
IPV6 Routing Protocols
Same Protocols as in IPv4
Static
RIPng (Routing Information Protocol Next Generation)
OSPFv3 ( Open Shortest Path First version 3 )
MP-BGP4 (Modified Protocol Border Gateway Protocol)
ARP
ICMP redirect
Redirect:
Used by a router to inform a host of a better route to a given destination
• Router consider the flow as a sequence of packet share the same characteristics such as path, resources,
and security.
• Router support the handling of flow label table which has entry for each active flow. When a router
receives a packet it check the flow label table for the entry and provides the service mentioned. The
information is provided by other means such as the hop-by-hop options or other protocols.
• Flow label objective is to speed up the processing of packet i.e. while receiving a packet instead checking
the routing table it consults the flow label table to find the next hop.
• A flow label used to support the transmission of real-time audio and video. Real-time audio or video,
particularly in digital form
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 62
Flow Label
Rules for flow label:
• Flow label is defined by source host which takes a random number form 1 to 224 -1 and it must
be unique one.
• If host doesn’t support the feature its set to zero and if router doesn’t support it simply ignore
the field.
• All the packets belong to the same flow has same source, same destination, same priority and
same option
.
. Extension Header
.
Source
Hop-by-Hop Destination Fragmentation Authentication ESP
Routing
• Hop-by-Hop is used when source needs to send information to all routers along the path. Used to specify information
such as management, debugging and control function also used too specify when datagram size exceeds 65535 bits.
• The first field defines the header and next fields defines the length and rest of the field makes options. Only 3 options
have been defined are Pad1, PadN, and jumbo Payload.
Type
• Pad1 – used for alignment purpose. Options need to start at specific bit of 32 bit word, if it fall short by 1 bit Pad1 is used. Pad1
excludes the length of option and data field. Pad1 can be inserted anywhere in hop-by-hop
Options
Code pad1
00000
Rest of– 18CSC302J
Unit IV the payload
– Computer Networks (2022-2023 ODD)
b. Used for padding
66
a. Pad1
Options in Hop-by-Hop header
code length Data
Code Code
Jumbo Payload
11000010 00000100
Length of Jumbo payload ( 4 bytes)
Type
• Jumbo payload. Payload in the IP datagram can be a maximum of 65,535 bytes in length, if for any reason payload length is larger
than prefer 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 (4n + 2) byte, where n is a small integer.
Source Routing: Combines the concept of strict and loose routing and minimum of 7 fields length.
Next Header Header Length Code Address left • Next Header and Header length are same as in Hop-by-Hop
Reserved Strict/loose mask • Type field defines strict or loose routing.
• Address left represents the host need to reach the destination.
First Address
• strict/loose mask field determines the rigidity of routing.
Second Address
• If set to strict, routing must follow the source specification
:
• If set to loose, it may visit other routers
:
Last address
Note : Destination address in source routing does not refer to the final destination of the datagram instead, it changes from router to router.
The addresses in the extension headers also changeUnit
fromIV – router to –router.
18CSC302J Computer Networks (2022-2023 ODD) 68
Source Routing Example
If source A wants to send a packet to destination B then, the routing info
• In IPV6 only the source performs the fragmentation by using Path MTU discovery technique in-order to find the smallest MTU on the
path. If the source doesn’t use MTU discovery, it fragment the packet into size of 1280 bytes or smaller
Authentication:
• Validates the sender and ensure integrity of data. Validation of sender to insure the message comes for genuine source not from intruder
The integrity is verify the original transmitted message reaches the receiver end.
• Security parameter index defines the algorithm used for authentication and the data field contain the actual data generated by the
algorithm. Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 70
Authentication of data
128-bit security key
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 on receiving the message passes the datagram and the secret to the algorithm and compare the result, if it matches
the datagram is accepted else discarded.Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 71
Extension Header – ESP
Encrypted Security Payload (ESP)
IPV4 IPV6
Header length Field Header length field is eliminated
Service type field Traffic class and flow label
Total length field Payload length field
Identification , flag, offset Fragmentation extension header
TTL Hop-limit
Protocol Next Header
Header Checksum No Checksum
Option fields Extension Headers
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 73
Transition from IPV4 to IPV6
Three strategies used are:
• Dual stack
• Tunnelling
• Header translation
Dual Stack: Before complete migration all station must run in dual mode i.e. Both IPV4 and IPV6
IPV4 IPV6
To IPV4 To IPV6
Before sending a packet to the destination the source queries the DNS, if it returns IPV4 then source sends IPV4
packet else send IPV6 packet. Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 74
Transition from IPV4 to IPV6 : Tunnelling
Tunnelling : Process happens when two IPV6 host wants to communicate through a IPV4
Channel, to pass through this channel it requires a IPV4 address. So IPV6 packet is encapsulated
in a IPV4 packet and enter the region.
IPV4 Header IPV6 Host
IPV6 Host
IPV6 Header
Payload
IPV4 Region
IPv4 packet is carrying an IPv6 packet as data, the protocol value is set to 41
Header translation
done here
IPV6 Host IPV4 Host
IPV4 Region
IPV6 Region
Header translation uses the mapped address to translate an IPv6 address to an IPv4 address. Rules for Translation:
The IPv6 mapped address is changed to an IPv4 address by extracting the right-most 32 bits.
The value of the IPv6 priority field is discarded. The type of service field in IPv4 is set to zero.
The checksum for IPv4 is calculated and inserted in the corresponding field. The IPv6 flow label is ignored.
Compatible extension headers are converted to options and inserted in the IPv4 header. Some may have to be dropped.
The length of IPv4 header is calculated and inserted into the corresponding field.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 76
The total length of the IPv4 packet is calculated and inserted in the corresponding field.
NAT Protocol
Network Address Translation
• To access the Internet one public IP address is needed but we can use a private IP
address in our private network.
• The idea of NAT is to allow multiple devices to access the Internet through a single
public address.
• The technology allows a site to use a set of private addresses for internal
communication and a set of global Internet addresses (at least one) for communication
with the rest of the world.
• The site must have only one single connection to the global Internet through a NAT-
capable router that runs NAT software.
• When a packet enters the local network, the global (public) IP address is converted to a local
(private) IP address.
• If NAT run out of addresses, i.e., no address is left in the pool configured then the packets will
be dropped and an Internet Control Message Protocol (ICMP) host unreachable packet to the
destination is sent.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 81
Types of NAT
There are 3 ways to Configure NAT :
• Static NAT – In this, a single unregistered (Private) IP address is mapped with a legally
registered (Public) IP address i.e one-to-one mapping between local and global address.
• Dynamic NAT – In this type of NAT, an unregistered IP address is translated into a registered
(Public) IP address from a pool of public IP address.
• Port Address Translation (PAT) – This is also known as NAT overload. In this, many local
(private) IP addresses can be translated to a single registered IP address. Port numbers are used
to distinguish the traffic i.e., which traffic belongs to which IP address.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 82
Advantages of NAT
• Also, router being a network layer device, should not tamper with port
numbers(transport layer) but it has to do so because of NAT.
• As soon as, the same host changes its physical location, that is, moves into another
area / subnet / network / link, its IP address changes accordingly, and all the
communication taking place on the host using old IP address, goes down.
• IPv6 mobility provides a mechanism for the host to roam around different links
without losing any communication/connection and its IP address.
• Home Link: This link is configured with the home subnet prefix and this is where the Mobile
IPv6 device gets its Home Address.
• Home Address: This is the address which the Mobile Node acquires from the Home Link.
This is the permanent address of the Mobile Node.
• If the Mobile Node remains in the same Home Link, the communication among various
entities take place as usual.
• Home Agent: This is a router that acts as a registrar for Mobile Nodes. Home Agent is
connected to Home Link and maintains information about all Mobile Nodes, their Home
Addresses, and their present IP addresses.
• Foreign Link: Any other Link that is not Mobile Node’s Home Link.
• Care-of Address: When a Mobile Node gets attached to a Foreign Link, it acquires a
new IP address of that Foreign Link’s subnet.
• Correspondent Node: Any IPv6 enabled device that intends to have communication
with Mobile Node.
• After getting connected to a Foreign Link, the Mobile Node acquires an IPv6 address from
the Foreign Link. This address is called Care-of Address.
• The Mobile Node sends a binding request to its Home Agent with the new Care-of Address.
• The Home Agent binds the Mobile Node’s Home Address with the Care-of Address,
establishing a Tunnel between both.
• Whenever a Correspondent Node tries to establish connection with the Mobile Node (on its
Home Address), the Home Agent intercepts the packet and forwards to Mobile Node’s Care-
of Address over the Tunnel which was already established.
Unit IV – 18CSC302J – Computer Networks (2022-2023 ODD) 90
Route Optimization
• In Route Optimization mode, when the Mobile Node receives a packet from the
Correspondent Node, it does not forward replies to the Home Agent.
• Rather, it sends its packet directly to the Correspondent Node using Home Address as Source
Address.
• This protocol is used for diagnostic functions, error and information message,
statistical purposes.
• ICMPv6’s Neighbor Discovery Protocol replaces ARP and helps discover neighbor
and routers on the link.
• Though IPv6 enabled hosts do not require any DHCPv6 Server to acquire IP address
as they can be auto-configured.
• Neither do they need DHCPv6 to locate DNS server because DNS can be discovered
and configured via ICMPv6 Neighbor Discovery Protocol.
• There has been no new version of DNS but it is now equipped with extensions to
provide support for querying IPv6 addresses.
• A new AAAA (quad-A) record has been added to reply IPv6 query messages.
• Now DNS can reply with both IP versions (4 & 6) without any change in query
format.