0% found this document useful (0 votes)
2 views60 pages

Unit 4 Rahul

The document discusses the network layer of the OSI Model, which is responsible for packet delivery across multiple networks and includes devices like routers and switches. It explains IPv4 addressing, including its classes (A, B, C, D, E), fragmentation, and the transition to Classless Inter-Domain Routing (CIDR) to address the inefficiencies of classful addressing. Additionally, it covers subnetting, the importance of maximum transmission units (MTU), and the issues related to datagram fragmentation and delays in network communication.

Uploaded by

Komal Walia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views60 pages

Unit 4 Rahul

The document discusses the network layer of the OSI Model, which is responsible for packet delivery across multiple networks and includes devices like routers and switches. It explains IPv4 addressing, including its classes (A, B, C, D, E), fragmentation, and the transition to Classless Inter-Domain Routing (CIDR) to address the inefficiencies of classful addressing. Additionally, it covers subnetting, the importance of maximum transmission units (MTU), and the issues related to datagram fragmentation and delays in network communication.

Uploaded by

Komal Walia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COMPUTER NETWORK

U N I T- 4
N E T W O R K L AY E R
The network layer is the third layer (from bottom) in the OSI Model. The network layer is
concerned with the delivery of a packet across multiple networks. The network layer is
considered the backbone of the OSI Model. It selects and manages the best logical path
for data transfer between nodes. This layer contains hardware devices such as routers,
bridges, firewalls, and switches, but it actually creates a logical image of the most
efficient communication route and implements it with a physical medium. Network layer
protocols exist in every host or router. The router examines the header fields of all the IP
packets that pass through it. Internet Protocol and Netware IPX/SPX are the most
common protocols associated with the network layer. In the OSI model, the network layer
responds to requests from the layer above it (transport layer) and issues requests to the
layer below it (data link layer).
There are two types of network transmission techniques, circuit switched network and packet
switched network. Circuit Switch vs Packet Switch. In circuit switched network, a single
path is designated for transmission of all the data packets. Whereas in case of a packet-
switched network, each packet may be sent through a different path to reach the destination.
In a circuit switched network, the data packets are received in order whereas in a packet
switched network, the data packets may be received out of order. The packet switching is
further subdivided into Virtual circuits and Datagram.
IPv4: IPv4 is a connectionless protocol used for packet-switched networks. It operates
on a best-effort delivery model, in which neither delivery is guaranteed, nor proper
sequencing or avoidance of duplicate delivery is assured. Internet Protocol Version 4
(IPv4) is the fourth revision of the Internet Protocol and a widely used protocol in data
communication over different kinds of networks. IPv4 is a connectionless protocol
used in packet-switched layer networks, such as Ethernet. It provides a logical
connection between network devices by providing identification for each device.
There are many ways to configure IPv4 with all kinds of devices – including manual
and automatic configurations – depending on the network type. IPv4 is defined and
specified in IETF publication RFC 791. IPv4 uses 32-bit addresses for Ethernet
communication in five classes: A, B, C, D and E.
Class D addresses are reserved for multicasting, while class E addresses are reserved
for military purposes. IPv4 uses 32-bit (4-byte) addressing, which gives 232 addresses.
IPv4 addresses are written in the dot-decimal notation, which comprises of four octets
of the address expressed individually in decimal and separated by periods, for instance,
[Link]
IPV4
D A TA G R A M
HEADER SI
ZE OF THE
HEADER IS
20 TO 60
BY TE S .
VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The
minimum value for this field is 5 and the maximum is 15.
Type of service: Low Delay, High Throughput, Reliability (8 bits)
Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and
the maximum is 65,535 bytes.
Identification: Unique Packet Id for identifying the group of fragments of a single IP
datagram (16 bits)
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments
flag (same order)
Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the
particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of
65,528 bytes.
Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network
by restricting the number of Hops taken by a Packet before delivering to the Destination.
Protocol: Name of the protocol to which the data is to be passed (8 bits)
Header Checksum: 16 bits header checksum for checking errors in the datagram header
Source IP address: 32 bits IP address of the sender
Destination IP address: 32 bits IP address of the receiver
Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.
Introduction of Classful IP Addressing

An IP address is an address having information about how to reach a specific host, especially
outside the LAN. An IP address is a 32-bit unique address having an address space of 232.
Generally, there are two notations in which the IP address is written, dotted decimal notation and
hexadecimal notation.
• Dotted Decimal Notation
HEXADECIMAL
N O TA T I O N
Some points to be noted about dotted decimal notation:
[Link] value of any segment (byte) is between 0 and 255 (both
included).
[Link] zeroes are preceding the value in any segment (054 is wrong, 54
is correct)

•Class A
•Class B
•Class C
•Class D
•Class E
Each of these classes has a valid range of IP addresses. Classes D and E are reserved for
multicast and experimental purposes respectively. The order of bits in the first octet determines
the classes of the IP address. The IPv4 address is divided into two parts:
•Network ID
•Host ID
The class of IP address is used to determine the bits used for network ID and host ID and the
number of total networks and hosts possible in that particular class. Each ISP or network
administrator assigns an IP address to each device that is connected to its network.
Note:

[Link] addresses are globally managed by Internet Assigned Numbers Authority(IANA) and

regional Internet registries(RIR).

[Link] finding the total number of host IP addresses, 2 IP addresses are not counted and

are therefore, decreased from the total count because the first IP address of any network is

the network number and whereas the last IP address is reserved for broadcast IP.
Class A
IP addresses belonging to class A are assigned to the networks that contain a large number of
hosts.
•The network ID is 8 bits long.
•The host ID is 24 bits long.
The higher-order bit of the first octet in class A is always set to 0. The remaining 7 bits in the first
octet are used to determine network ID. The 24 bits of host ID are used to determine the host in
any network. The default subnet mask for Class A is 255.x.x.x. Therefore, class A has a total of:
•2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from [Link] – [Link].
Class B
IP address belonging to class B is assigned to networks that range from medium-sized to large-sized
networks.
•The network ID is 16 bits long.
•The host ID is 16 bits long.
The higher-order bits of the first octet of IP addresses of class B are always set to 10. The remaining 14 bits
are used to determine the network ID. The 16 bits of host ID are used to determine the host in any network.
The default subnet mask for class B is 255.255.x.x. Class B has a total of:
•2^14 = 16384 network address
•2^16 – 2 = 65534 host address
IP addresses belonging to class B range from [Link] – [Link].
Class C
IP addresses belonging to class C are assigned to small-sized networks.
•The network ID is 24 bits long.
•The host ID is 8 bits long.
The higher-order bits of the first octet of IP addresses of class C is always set to 110. The remaining 21
bits are used to determine the network ID. The 8 bits of host ID are used to determine the host in any
network. The default subnet mask for class C is 255.255.255.x. Class C has a total of:
•2^21 = 2097152 network address
•2^8 – 2 = 254 host address
IP addresses belonging to class C range from [Link] – [Link].
Class D

IP address belonging to class D is reserved for multi-casting. The higher-order bits of the first

octet of IP addresses belonging to class D is always set to 1110. The remaining bits are for the

address that interested hosts recognize.

Class D does not possess any subnet mask. IP addresses belonging to class D range from

[Link] – [Link].
Class E

IP addresses belonging to class E are reserved for experimental and research purposes. IP

addresses of class E range from [Link] – [Link]. This class doesn’t have any subnet

mask. The higher-order bits of the first octet of class E are always set to 1111.
[Link] – [Link] : Loop-back addresses
[Link] – [Link]: used to communicate within the current network.
Problems with Classful Addressing

The problem with this classful addressing method is that millions of class A addresses are wasted, many of

the class B addresses are wasted, whereas, the number of addresses available in class C is so small that it

cannot cater to the needs of organizations. Class D addresses are used for multicast routing and are therefore

available as a single block only. Class E addresses are reserved.

Since there are these problems, Classful networking was replaced by Classless Inter-Domain Routing

(CIDR) in 1993. We will be discussing Classless addressing in the next post.

•The network ID is 24 bits long.

•The host ID is 8 bits long.

•2^21 = 2097152 network address

•2^8 – 2 = 254 host address


Problems with Classful Addressing
•Within any network, the host ID must be unique to that network.
•Host ID in which all bits are set to 0 cannot be assigned because this host ID is used to represent
the network ID of the IP address.
•Host ID in which all bits are set to 1 cannot be assigned because this host ID is reserved as a
broadcast address to send packets to all the hosts present on that particular network.
•The network ID cannot start with 127 because 127 belongs to the class A address and is reserved
for internal loopback functions.
•All bits of network ID set to 1 are reserved for use as an IP broadcast address and therefore, cannot
be used.
•All bits of network ID set to 0 are used to denote a specific host on the local network and are not
routed and therefore, aren’t used.
Classless Addressing in IP Addressing

The Network address identifies a network on the internet. Using this, we can find a range
of addresses in the network and total possible number of hosts in the network.
Mask is a 32-bit binary number that gives the network address in the address block when
AND operation is bitwise applied on the mask and any IP address of the block.
The default masks in different classes are :
•Class A – [Link]
•Class B – [Link]
•Class C – [Link]
Subnetting
Dividing a large block of addresses into several contiguous sub-blocks and assigning these sub-blocks to
different smaller networks is called subnetting. It is a practice that is widely used when classless
addressing is done.
A subnet or subnetwork is a network inside a network. Subnets make networks more efficient. Through
subnetting, network traffic can travel a shorter distance without passing through unnecessary routers to
reach its destination.
Classless Addressing
To reduce the wastage of IP addresses in a block, we use sub-netting. What we do is that we use host
id bits as net id bits of a classful IP address. We give the IP address and define the number of bits for
mask along with it (usually followed by a ‘/’ symbol), like, [Link]/28. Here, subnet mask is
found by putting the given number of bits out of 32 as 1, like, in the given address, we need to put 28
out of 32 bits as 1 and the rest as 0, and so, the subnet mask would be [Link]. A classless
addressing system or classless interdomain routing (CIDR or supernetting) is the way to combine two
or more class C networks to create a/23 or a /22 supernet. A classless addressing system or classless
interdomain routing (CIDR) is an improved IP addressing system. In a classless addressing system
the block of IP address is assigned dynamically based on specific rules.
Some Values Calculated in Subnetting:
1. Number of subnets : 2(Given bits for mask – No. of bits in default mask)
2. Subnet address : AND result of subnet mask and the given IP address
3. Broadcast address : By putting the host bits as 1 and retaining the network bits as in
the IP address
4. Number of hosts per subnet : 2(32 – Given bits for mask) – 2
5. First Host ID : Subnet address + 1 (adding one to the binary representation of the
subnet address)
6. Last Host ID : Subnet address + Number of Hosts
IPv4 Datagram Fragmentation and Delays

Why IPv4 Datagram Fragmentation required?

Different Networks may have different maximum transmission unit (MTU), for example due
to differences in LAN technology. When one network wants to transmit datagrams to a
network with a smaller MTU, the routers on path may fragment and reassemble datagrams.
In IPv4, when a packet is larger than the Maximum Transmission Unit (MTU) of the network
link it needs to traverse, it is fragmented into smaller packets. Each of these fragments
contains a portion of the original packet, along with additional information that identifies the
fragment’s position in the original packet and how it fits into the sequence of fragments.
Fragmentation can cause delays and other issues in the network. Here are a few ways in which
this can happen:
[Link] processing overhead: Fragmentation requires additional processing and memory resources
from the network devices involved in the transmission. This can increase the processing overhead and
introduce additional delays into the network.
[Link] likelihood of packet loss: Since each fragment is transmitted separately, there is an
increased likelihood of packet loss or corruption during transmission. If any of the fragments are lost
or corrupted, the entire packet must be retransmitted, which can introduce additional delays and
increase network congestion.
[Link] delays: The receiver of the fragmented packets must reassemble the original packet
before it can be processed. This process can introduce additional delays, particularly if there are delays
in receiving all of the fragments or if the fragments arrive out of order.
To minimize these issues, it is generally recommended to avoid fragmentation whenever

possible by ensuring that packets are appropriately sized for the network links they will

traverse. This can be accomplished through the use of Path MTU Discovery, which allows

devices to determine the maximum packet size that can be transmitted without fragmentation

on a given network path. Additionally, network administrators can implement Quality of

Service (QoS) mechanisms to prioritize traffic and reduce delays caused by congestion.
How is Fragmentation done?

When a packet is received at the router, destination address is examined and MTU is determined. If size
of the packet is bigger than the MTU, and the ‘Do not Fragment (DF)’ bit is set to 0 in header, then the
packet is fragmented into parts and sent one by one. The maximum size of each fragment is the MTU
minus the IP header size (Minimum 20 bytes and Maximum 60 bytes).
Each fragment is converted to a packet and the following changes happen in the datagram header:
[Link] total length field is changed to the size of the fragment.
[Link] More Fragment bit (MF bit) is set for all the fragment packets except the last one.
[Link] fragment offset field is set, based on the number of fragment that is being set and the MTU.
[Link] Checksum is re-calculated.
Example: For a data packet of 4000 bytes and MTU of 1500 bytes, we have actual data
of 3980 bytes that is to be transmitted and 1480 bytes is the maximum data size that is
permissible to be sent. So, there would be 3 fragments:
For the first fragment, data size = 1480 bytes, offset = 0 and MF flag = 1
For the second fragment, data size = 1480 bytes, offset = 185(1480/ 8) and MF flag = 1
For the third fragment, data size = 1020 bytes, offset = 370 (2960/8) and MF flag = 0
An important point to be noted here is that all fragments would be having same
identification number, thus indicating that all the fragments belong to the same parent
data packet.
Delays –
Processing delay: Time taken by the routers to process the data packet header.
Queuing delay: Time taken by the data packet in routing queues.
Transmission delay: Time taken to load a data packet onto the transmission channel Dt = N/R,
N: Number of bits to be transmitted

R: Rate or transmission speed of the channel


Propagation delay – Time taken by the data packet to reach from source to destination
Serialization delay: The time it takes to prepare a packet for transmission, including adding headers and
trailers.
Latency: The time it takes for a packet to travel from the sender to the receiver.
Jitter: The variation in the arrival time of packets, causing a delay between when a packet was expected
and when it was actually received.
Buffer delay: The time a packet spends waiting in a buffer before it can be transmitted. This can
occur when a network device temporarily lacks the resources to process incoming packets.
Store-and-forward delay: The time a packet spends being processed and verified by a network device
before being transmitted to the next hop.
Encapsulation delay: The time it takes to add layer 2 and layer 3 headers to a packet, which is
necessary for transmission over the network.
Retransmission delay: The time it takes to resend a packet that was not successfully transmitted or
received.
Congestion control delay: The time a packet spends waiting due to congestion control mechanisms,
such as flow control or random early detection.
Dp = D/S,
D: Distance between the source and the destination
S: is the speed of propagation
Fragmentation at Network Layer
Prerequisite – IPv4 Datagram Fragmentation and Delays
Fragmentation is done by the network layer when the maximum size of datagram is greater than
maximum size of data that can be held in a frame i.e., its Maximum Transmission Unit (MTU). The
network layer divides the datagram received from the transport layer into fragments so that data flow is
not disrupted.

•Since there are 16 bits for total length in IP header so, the maximum size of IP datagram = 2 16 – 1 =
65, 535 bytes.

•It is done by the network layer at the destination side and is usually done at routers.
•Source side does not require fragmentation due to wise (good) segmentation by transport layer
i.e. instead of doing segmentation at the transport layer and fragmentation at the network layer,
the transport layer looks at datagram data limit and frame data limit and does segmentation in
such a way that resulting data can easily fit in a frame without the need of fragmentation.
•Receiver identifies the frame with the identification (16 bits) field in the IP header. Each
fragment of a frame has the same identification number.
•Receiver identifies the sequence of frames using the fragment offset(13 bits) field in the IP
header
•Overhead at the network layer is present due to the extra header introduced due to
fragmentation.
the need of Fragmentation at Network Layer:
Fragmentation at the Network Layer is a process of dividing a large data packet
into smaller pieces, known as fragments, to improve the efficiency of data
transmission over a network. The need for fragmentation at the network layer
arises from several factors:
[Link] Transmission Unit (MTU): Different networks have different
Maximum Transmission Unit (MTU) sizes, which determine the maximum size
of a data packet that can be transmitted over that network. If the size of a data
packet exceeds the MTU, it needs to be fragmented into smaller fragments that
can be transmitted over the network.
[Link] Performance: Large data packets can consume a significant amount of network
resources and can cause congestion in the network. Fragmentation helps to reduce the impact of
large data packets on network performance by breaking them down into smaller fragments that can
be transmitted more efficiently.
[Link] Utilization: Large data packets may consume a significant amount of network
bandwidth, causing other network traffic to be slowed down. Fragmentation helps to reduce the
impact of large data packets on network bandwidth utilization by breaking them down into smaller
fragments that can be transmitted more efficiently.
Fragmentation at the network layer is necessary in order to ensure efficient and reliable transmission
of data over communication networks.
[Link] Packet Size: In some cases, the size of the packet to be transmitted may be too large for the
underlying communication network to handle. Fragmentation at the network layer allows the large packet to
be divided into smaller fragments that can be transmitted over the network.
[Link] MTU: The Maximum Transmission Unit (MTU) of a network defines the largest packet size that can
be transmitted over the network. Fragmentation at the network layer allows the packet to be divided into
smaller fragments that can be transmitted over networks with different MTU values.
[Link] Transmission: Fragmentation at the network layer increases the reliability of data transmission,
as smaller fragments are less likely to be lost or corrupted during transmission.
Fields in IP header for fragmentation –
•Identification (16 bits) – use to identify fragments of the same frame.
•Fragment offset (13 bits) – use to identify the sequence of fragments in the frame. It generally
indicates a number of data bytes preceding or ahead of the fragment.
Maximum fragment offset possible = (65535 – 20) = 65515
{where 65535 is the maximum size of datagram and 20 is the minimum size of IP header}
So, we need ceil(log265515) = 16 bits for a fragment offset but the fragment offset field has only 13
bits. So, to represent efficiently we need to scale down the fragment offset field by 216/213 = 8 which
acts as a scaling factor. Hence, all fragments except the last fragment should have data in multiples
of 8 so that fragment offset ∈ N.
•More fragments (MF = 1 bit) – tells if more fragments are ahead of this fragment i.e. if MF = 1,
more fragments are ahead of this fragment and if MF = 0, it is the last fragment.
•Don’t fragment (DF = 1 bit) – if we don’t want the packet to be fragmented then DF is set i.e.
DF = 1.
Reassembly of Fragments –
It takes place only at the destination and not at routers since packets take an independent
path(datagram packet switching), so all may not meet at a router and hence a need of
fragmentation may arise again. The fragments may arrive out of order also
Algorithm –
[Link] should identify that datagram is fragmented from MF,
Fragment offset field.
[Link] should identify all fragments belonging to same datagram
from Identification field.
[Link] the 1st fragment(offset = 0).
[Link] subsequent fragments using header length, fragment offset.
[Link] until MF = 0.
Efficiency –

Efficiency (e) = useful/total = (Data without header)/(Data with header) Throughput = e * B { where B is
bottleneck bandwidth }
Example – An IP router with a Maximum Transmission Unit (MTU) of 200 bytes has
received an IP packet of size 520 bytes with an IP header of length 20 bytes. The
values of the relevant fields in the IP header.
Explanation – Since MTU is 200 bytes and 20 bytes is header size so, the maximum
length of data = 180 bytes but it can’t be represented in fragment offset since it is not
divisible by 8 so, the maximum length of data feasible = 176 bytes.
Number of fragments = (520/200) = 3.
Header length = 5 (since scaling factor is 4 therefore, 20/4 = 5)
Efficiency, e = (Data without header)/(Data with header) = 500/560 = 89.2 %
Internet Protocol version 6 (IPv6)
IPv6 was developed by Internet Engineering Task Force (IETF) to deal with the problem of IPv4
exhaustion. IPv6 is a 128-bits address having an address space of 2128, which is way bigger than
IPv4. IPv6 use Hexa-Decimal format separated by colon (:) .
Components in Address format :
[Link] are 8 groups and each group represents 2 Bytes
(16-bits).
[Link] Hex-Digit is of 4 bits (1 nibble)
[Link] used – colon (:)\
Need for IPv6:
The Main reason of IPv6 was the address depletion as the need for electronic devices rose quickly
when Internet Of Things (IOT) came into picture after the 1980s & other reasons are related to the
slowness of the process due to some unnecessary processing, the need for new options, support for
multimedia, and the desperate need for security. IPv6 protocol responds to the above issues using the
following main changes in the protocol:
1. Large address space
An IPv6 address is 128 bits long .compared with the 32 bit address of IPv4, this is a huge(2 raised 96
times) increases in the address space.
2. Better header format
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.
3. New options
IPv6 has new options to allow for additional functionalities.
4. Allowance for extension
IPv6 is designed to allow the extension of the protocol if required by new technologies or applications.
5. Support for resource allocation
In IPv6,the type of service field has been removed, but two new fields , traffic class and flow label have been
added to enables the source to request special handling of the packet . this mechanism can be used to support traffic
such as real-time audio and video.
6. Support for more security
The encryption and authentication options in IPv6 provide confidentiality and integrity of the packet.
In IPv6 representation, we have three addressing methods :
•Unicast
•Multicast
•Anycast
Addressing methods
1. Unicast Address
Unicast Address identifies a single network interface. A packet sent to a unicast address is delivered to
the interface identified by that address.
2. Multicast Address
Multicast Address is used by multiple hosts, called as groups, acquires a multicast destination address.
These hosts need not be geographically together. If any packet is sent to this multicast address, it will
be distributed to all interfaces corresponding to that multicast address. And every node is configured in
the same way. In simple words, one data packet is sent to multiple destinations simultaneously.
3. Anycast Address
Anycast Address is assigned to a group of interfaces. Any packet sent to an anycast address will be
delivered to only one member interface (mostly nearest host possible).
Note: Broadcast is not defined in IPv6.
Types of IPv6 address:
We have 128 bits in IPv6 address but by looking at the first few bits we can identify what type
of address it is.
Prefix Allocation Fraction of Address Space
0000 0000 Reserved 1/256

0000 0001 Unassigned (UA) 1/256

0000 001 Reserved for NSAP 1/128

0000 01 UA 1/64

0000 1 UA 1/32

0001 UA 1/16

001 Global Unicast 1/8

010 UA 1/8

011 UA 1/8

100 UA 1/8

101 UA 1/8

110 UA 1/8

1110 UA 1/16

1111 0 UA 1/32

1111 10 UA 1/64

1111 110 UA 1/128

1111 1110 0 UA 1/512

1111 1110 10 Link-Local Unicast Addresses 1/1024

1111 1110 11 Site-Local Unicast Addresses 1/1024

1111 1111 Multicast Address 1/256


Note: In IPv6, all 0’s and all 1’s can be assigned to any host, there is not any
restriction like IPv4.
Provider-based Unicast address :

These are used for global communication.


The First 3 bits identify it as of this type.
Registry Id (5-bits): Registry Id identifies the region to
which it belongs. Out of 32 (i.e. 2^5), only 4 registry IDs
are being used.
Provider Id: Depending on the number of service providers that operate under a
region, certain bits will be allocated to the Provider Id field. This field need not be
fixed. Let’s say if Provider Id = 10 bits then Subscriber Id will be 56 – 10 = 46 bits.
Subscriber Id: After Provider Id is fixed, the remaining part can be used by ISP as a
normal IP address.
Intra Subscriber: This part can be modified as per the need of the organization that
is using the service.
Geography based Unicast address :
Global routing prefix: Global routing prefix contains all the details of Latitude and
Longitude. As of now, it is not being used. In Geography-based Unicast address
routing will be based on location.
Interface Id: In IPv6, instead of using Host Id, we use the term Interface Id.
Some special addresses:
Unspecified
Loopback

IPv4 Compatible

IPv4 mapped
Advantages of IPv6 :
1. Realtime Data Transmission : Realtime data transmission refers to the process of transmitting data in a
very fast manner or immediately. Example : Live streaming services such as cricket matches, or other
tournament that are streamed on web exactly as soon as it happens with a maximum delay of 5-6 seconds.
2. IPv6 supports authentication: Verifying that the data received by the receiver from the sender is exactly
what the sender sent and came through the sender only not from any third party. Example : Matching the hash
value of both the messages for verification is also done by IPv6.
3. IPv6 performs Encryption: Ipv6 can encrypt the message at network layer even if the protocols of
application layer at user level didn’t encrypt the message which is a major advantage as it takes care of
encryption.
4. Faster processing at Router: Routers are able to process data packets of Ipv6 much faster due to
smaller Base header of fixed size – 40 bytes which helps in decreasing processing time resulting in more
efficient packet transmission. Whereas in Ipv4, we have to calculate the length of header which lies between
20-60 bytes.
Difference Between IPv4 and IPv6
IPv4 IPv6
IPv4 has a 32-bit address length IPv6 has a 128-bit address length

It Supports Manual and DHCP address configuration It supports Auto and renumbering address configuration

In IPv4 end to end, connection integrity is Unachievable In IPv6 end-to-end, connection integrity is Achievable

It can generate 4.29×109 address space The address space of IPv6 is quite large it can produce 3.4×1038 address space

The Security feature is dependent on the application IPSEC is an inbuilt security feature in the IPv6 protocol

Address representation of IPv4 is in decimal Address Representation of IPv6 is in hexadecimal

Fragmentation performed by Sender and forwarding routers In IPv6 fragmentation is performed only by the sender

In IPv6 packet flow identification are Available and uses the flow label field in
In IPv4 Packet flow identification is not available
the header

In IPv4 checksum field is available In IPv6 checksum field is not available

It has a broadcast Message Transmission Scheme In IPv6 multicast and anycast message transmission scheme is available

In IPv6 Encryption and Authentication are provided


In IPv4 Encryption and Authentication facility not provided

IPv6 has a header of 40 bytes fixed


IPv4 has a header of 20-60 bytes.

IPv4 can be converted to IPv6 Not all IPv6 can be converted to IPv4

IPv4 consists of 4 fields which are separated by addresses dot (.) IPv6 consists of 8 fields, which are separated by a colon (:)

IPv4’s IP addresses are divided into five different classes. Class A , Class B,
IPv6 does not have any classes of the IP address.
Class C, Class D , Class E.

IPv4 supports VLSM(Variable Length subnet mask). IPv6 does not support VLSM.

Example of IPv4: [Link] Example of IPv6: [Link]

You might also like