Noida Institute of Engineering and Technology, Greater Noida
Network layer
Unit: 3
Communication Networks
(ACSE0602)
Dr. Prasanna Kumar Singh
Associate Professor
B Tech (CS) 6th Sem
Department of
Electronics and Communication
Engineering
Dr. Prasanna Singh CN CS Unit-3 1
4/7/2023
Evaluation Scheme
4/7/2023 2
Dr. Prasanna Singh CN CS Unit-3
Syllabus by University
Course Contents / Syllabus
UNIT-I Introduction 8 Hr
Goals and applications of networks, Categories of networks, Organization of the
Internet, ISP, The OSI reference model, TCP/IP protocol suite, Network devices
and components, Mode of communications
Physical Layer: Network topology design, Types of connections, LAN, MAN and
MAN Transmission media, Signal transmission and encoding, Network
performance and transmission impairments, Switching techniques and
multiplexing, IEEE standards.
UNIT-II Data Link layer 8 Hr
Framing, Error Detection and Correction, Flow control (Elementary Data Link
Protocols, Sliding Window protocols). Medium Access Control and Local Area
Networks: Channel allocation, Multiple access protocols, LAN standards, Link
layer switches & bridges.
Dr. Prasanna Singh CN CS Unit-3 3
4/7/2023
Syllabus by University
Course Contents / Syllabus
UNIT-III Network Layer 8 Hr
Point-to-point networks, Logical addressing, Basic internetworking (IP, CIDR,
ARP, RARP, DHCP, ICMP), IPv4, Routing, forwarding and delivery, Static and
dynamic routing, Routing algorithms and protocols, Congestion control
algorithms, IPv6.
UNIT-IV Transport Layer 8 Hr
Process-to-process delivery, Transport layer protocols (UDP and TCP),
Connection management, Flow control and retransmission, Window
management, TCP Congestion control, Quality of service.
UNIT-V Application Layer 8 Hr
Domain Name System, World Wide Web and Hyper Text Transfer Protocol,
Electronic mail, File Transfer Protocol, Remote login, Network management,
Data compression, VPN, Cryptography – basic concepts, Firewalls.
Dr. Prasanna Singh CN CS Unit-3 4
4/7/2023
References
• Text Books:
1. B. A. Forouzan, “Data Communications and Networking”, 5th
Edition, TMH, 2017.
• Reference Books:
1. S. Tanenbaum, “Computer Networks”, 4th Edition, Pearson,
2013.
2. W. Stallings, “Data and Computer Communication”, 8th
Edition, Pearson, 2007.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 5
Branch Wise Applications
• Fiber optic cables find many uses in a wide variety of industries and applications.
Some uses of fiber optic cables include:
• Medical
Used as light guides, imaging tools and also as lasers for surgeries
• Defense/Government
Used as hydrophones for seismic waves and SONAR , as wiring in aircraft,
submarines and other vehicles and also for field networking
• Data Storage
Used for data transmission
• Telecommunications
Fiber is laid and used for transmitting and receiving purposes
• Networking
Used to connect users and servers in a variety of network settings and help increase
the speed and accuracy of data transmission
• Industrial/Commercial
Used for imaging in hard to reach areas, as wiring where EMI is an issue, as
sensory devices to make temperature, pressure and other measurements, and as
wiring in automobiles and in industrial settings
• Broadcast/CATV
Broadcast/cable companies are using fiber optic cables for wiring CATV, HDTV,
internet, video on-demand and other applications
4/7/2023 6
Dr. Prasanna Singh CN CS Unit-3
Course Objective
The objective of this course is to understand introduction of
computer networks with suitable transmission media and
different networking devices. Network protocols which are
essential for the computer network are need to explain such as
data link layer protocols and routing protocols.
A detail explanation of IP addressing , TCP/IP protocols and
application layer protocols are covered in this course.
Dr. Prasanna Singh CN CS Unit-3
4/7/2023 7
Course Outcome
Outcomes
Cos
After Completion of the Course Student will be able to
Explain basic concepts, OSI reference model, services and role of each layer of
CO1 OSI model and TCP/IP, networks devices and transmission media, Analog and
digital data transmission.
CO2 Apply channel allocation, framing, error and flow control techniques and
describe the functions of Network Layer i.e. Logical addressing, subnetting &
Routing Mechanism.
CO3 Explain the different Transport Layer function i.e. Port addressing, Connection
Management, Error control and Flow control mechanism.
CO4 Explain the functions offered by session and presentation layer and their
Implementation.
CO5 Explain the different protocols used at application layer i.e. HTTP, SNMP, SMTP,
FTP,TELNET and VPN.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 8
Program Outcomes
1. Engineering knowledge
2. Problem analysis
3. Design/development of solutions
4. Conduct investigations of complex problems
5. Modern tool usage
6. The engineer and society
7. Environment and sustainability
8. Ethics
9. Individual and team work
10. Communication
11. Project management and finance
12. Life-long learning
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 9
CO-PO Mapping
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 2 2 2 2 2 3
CO2 3 3 2 3
CO3 3 3 3 3 2 2 2 3
CO4 3 2 2 2 3
CO5 3 3 2 2 3 2 3
Avg. 3 2.6 2.2 0.6 1.6 0.6 0 0.4 0.8 0 0.8 3
*3= High *2= Medium *1=Low
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 10
CO-PSO Mapping
Course Outcome
Program Specific
Outcomes CO1 CO2 CO3 CO4 C05
2 2 2 2 2
PSO1
2 2 2 2
PSO2
2
2 2 2 3 2
PSO3
AVERAGE 2 2 2 2.3 2
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 11
Prerequisite and Recap
• Basics of Digital communication
• Knowledge of Computer.
• Fundamental of Digital logic design
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 12
Brief Introduction About Subject with videos
An introduction to Computer networks and covers fundamental topics
like data, information to the definition of communication and computer
networks.
The main objective of data communication and networking is to enable
seamless exchange of data between any two points in the world.
This exchange of data takes place over a computer network.
https://www.youtube.com/watch?v=O--
rkQNKqls&list=PLbRMhDVUMngf-peFloB7kyiA40EptH1up
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 13
Content
• Vision & Mission of Institute & Department
• Course Objective & Course Outcome
• CO-PO & PSO Mapping
• Prerequisite and Recap
• Topic Objective & Mapping
• Introduction
• Networks
• LAN,WAN,MAN
• Goals and Application of Networks
• Network Protocols & Communication
• TCP & OSI Model & Line Coding Review
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 14
Content(Continue….)
• Quizzes, MCQs & Weekly Assignment
• Video Links
• University Question Paper
• Expected Questions for University Exam
• Summary
• Reference
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 15
Content
• Design Issues.
• Routing Algorithms.
• Congestion control Algorithms.
• Internetworking –TCP/IP, IP Packet, IPv4 and IPv6
Protocols,
• IPV4 Addresses,
• Connecting Devices,
• Virtual LAN IPV6 Addresses.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 16
Course Objective
After completion of the course, student will be able to:
• CO1: Understand basic terminology of networking.
• CO2: Evaluate the functions of various layers and their
roles.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 17
Course Outcome
At the end of this course students will able to:
• Identify the issues and challenges in the Architecture of a
network
• Understand the ISO/OSI seven layers in a network.
• Realize protocols at different layers of a network
hierarchy.
• Understand the various multiple access techniques and
channelization.
• Recognize security issues in a network.
4/7/2023 REC-080
Dr. Prasanna
ElectronicSingh
Switching
CN CS Unit-3 Unit1 18
CO-PO and PSO Mapping
Sr. Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
No Outcome
1 CO 1 2 2 2 2 1 2 - - 1 - - 1
2 CO 2 2 2 2 1 1 1 - - - 1 1 2
3 CO 3 2 2 2 1 1 1 - - 1 - 1 2
4 CO 4 2 1 2 1 2 2 - - 1 1 - 2
5 CO 5 2 2 2 2 2 2 1 - - 1 - 1
AVERAGE 2 1.8 2 1.4 1.4 1.6 0.2 0 0.6 0.6 0.4 1.6
Course Outcome
Program Specific Outcomes
CO1 CO2 CO3 CO4 CO5
PSO1 2 1 1 1 2
PSO2 1 2 2 2 1
PSO3 - - - - -
AVERAGE 1 1 1 1 1
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 19
Prerequisite and Recap
• Basics of networking and telecommunication is required.
• Read unit 1,2 and 3 complete to start this.
Recap :
• Introduction to data communication
• Network structure
• Multiple access techniques
• OSI model
• Physical layer
• Data link layer
• Network layer
• Transport layer
• Session layer
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 20
TCP/IP Layers with OSI model
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 21
Layer Protocols
Address Resolution Protocol (ARP
Internet Group Management Protocol (IGMP)
Internet Control Message Protocol (ICMP)
Reverse Address Resolution Protocol (RARP)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 22
Protocols and Network in TCP/IP Model
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 23
Position of Network Layer
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 24
Network Layer
Network Layer:
Responsibilities
Host to Host delivery
Logical Addressing
Routing
Fragmentation
Congestion control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 25
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 26
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 27
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 28
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 29
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 30
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 31
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 32
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 33
Network layer is the third layer in the OSI model and here are some of the
functionalities of the network layer:
Logical Addressing
In the internet world, there are two kinds of addressing, data link layer
addressing and logical addressing at the network layer. While physical
addressing at the data link layer is defined by the MAC address of a device,
on the other hand, IP addressing is defined at the network layer of the OSI
model. IP addressing is also known as logical addressing.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 34
Routing
Routing is a method to route a data packet from source to destination. We can
think of routing as follows:
When you want to access some data from Facebook, you open your laptop,
type Facebook's URL and send an HTTP request to facebook.com for some
data.
Since Facebook's server is situated outside your local area network, your
request is forwarded to Facebook through the default gateway or router of your
institution.
This forwarding of a data request to the destined server or user is known as
routing.
This functionality is done at the network layer of the OSI model.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 35
Fragmentation and Reassembly
The network layer must send messages down to the data link layer for
transmission. The data that network layer receives is in the form of a
packet and the data that data link layer forwards is called a frame
Fragmentation and reassembly have to be done by the network layer
because some data link layer technologies have limits on the length of
any message that can be sent. If the packet that the network layer wants
to send is too large, the network layer must split the packet up, send each
piece to the data link layer, and then have pieces reassembled once they
arrive at the network layer on the destination machine.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 36
Path determination
Between two computers on the internet, thousands of path topology may
exist to connect the one device to another. Some of the networks might be
private networks; to use some of the networks to send your data you
might have to pay; some of the networks en route might be very busy. But
network layer is so smart to find out these things within milliseconds.
Some of the other functionalities of the network layer which can be
regulated using different protocols working at the network layer are:
ICMP (Internet Control Message Protocol): It is used by network
devices, like routers, to send error messages indicating, for example,
that a requested service is not available or that a host or router could
not be reached.
IGMP (Internet Group Management Protocol): IGMP protocol is
used by hosts and adjacent routers on IPv4 networks to establish
multicast group memberships
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 37
IPsec (Internet Protocol Security): Internet Protocol Security is a
protocol suite for secure Internet Protocol (IP) communications by
authenticating and encrypting each IP packet of a communication
session.
RIP (Routing Information Protocol): The Routing Information Protocol
(RIP) is a routing protocol which employs the hop count as a routing
metric.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 38
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 39
Network Layer Protocols
There are several network layer protocols in existence; however,
only the following two are commonly implemented:
• Internet Protocol version 4 (IPv4)
• Internet Protocol version 6 (IPv6)
Other legacy network layer protocols that are not widely used
include:
• Novell Internetwork Packet Exchange (IPX)
• AppleTalkConnectionless Network Service (CLNS/DECNet)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 40
IP Datagram
• The term 'datagram' or 'packet' is used to describe a chunk
of IP data.
• Each IP datagram contains a specific set of fields in a
specific order so that the reader knows how to decode and
read the stream of data received.
• The description of the IP datagram format in this tutorial is
suitable for most purposes.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 41
IPv4 Datagram Header
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 42
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 43
IPv4
• The Internet Protocol version 4 (IPv4) is a delivery
mechanism used by the TCP/IP protocols.
• IPv4 is an unreliable and connectionless datagram protocol-
which operates on a best effort delivery model.
• The term best-effort means that IPv4 provides no error
control or flow control.
• If reliability is important, IPv4 must be paired with a reliable
protocol such as TCP.
• IPv4 uses 32-bit (4 bytes) addressing, which gives
232 addresses and IPv4 addresses are written in the dot-
decimal notation, for example: 192.168.1.5.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 44
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 45
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 46
IP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 47
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 48
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 49
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 50
IP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 51
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 52
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 53
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 54
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 55
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 56
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 57
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 58
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 59
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 60
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 61
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 62
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 63
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 64
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 65
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 66
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 67
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 68
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 69
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 70
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 71
Example 19.6
IPv4 address : classless addressing
Classless
addressing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 72
IPv4 address : classless addressing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 73
IPv4 address : classless addressing
No .of Host id= 2^(32-n) bits
Let n=28, Block id=28 bits
and Host id=32-28 bits=4 bits
(32-n) bits No .of Host id= 2^(4) bits
(n always be n bits =16 bits
fixed ) (28) (4)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 74
IPv4 address : classless addressing
Host id
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 75
How to find Home Network
One of the IP add. in a network
Host id bits
Mask Mask
255.255.224.0
Perform
AND
Host id bits
operation
(Home Network or Block Id)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 76
IPv4 address : classless addressing
Three-level hierarchy in an IPv4 address
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 77
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 78
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 79
(Dividing into small
networks)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 80
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 81
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 82
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 83
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 84
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 85
IP -Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 86
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 87
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 88
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 89
Subnetting
Class A- 11111111 /8 CIDR -By default
Class A- 11111111 11000000 /10 Subnetting
Class B- 11111111 11111111 /16 CIDR -By default
Class B- 11111111 11111111 11110000 /20 Subnetting
Class C- 11111111 11111111 11111111 /24 CIDR -By default
Class C- 11111111 11111111 11111111 11110000 /28 Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 90
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 91
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 92
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 93
Subnetting
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 94
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 95
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 96
AND operation
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 97
AND operation
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 98
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 99
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 100
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 101
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 102
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 103
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 104
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 105
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 106
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 107
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 108
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 109
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 110
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 111
IPv4 address
Addresses in a NAT
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 112
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 113
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 114
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 115
IPv6 address
Objective: Study about basic concept of IPv6 and its function
Despite all short-term solutions, address depletion is still a long-term
problem for the Internet. This and other problems in the IP protocol
itself have been the motivation for IPv6
An IPv6 address is 128 bits long.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 116
IPv6 address
IPv6 address in binary and hexadecimal colon notation
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 117
IPv6
• IP version 6 is the new version of Internet Protocol, which is
way better than IP version 4 in terms of complexity and
efficiency.
• Range increased from 32 bits to 128 bits.
• 2^128
• A new type of address called an “Any cast address" is
defined,
• It is used to send a packet to any one of a group of nodes.
• Authentication and Privacy Capabilities Extensions to
support authentication, data integrity, and (optional) data
confidentiality are specified for IPv6.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 118
IPv6 Header Format
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 119
IPv6 address
Expand the address 0:15::1:12:1213 to its original.
Solution
We first need to align the left side of the double colon to the left of the
original pattern and the right side of the double colon to the right of the
original pattern to find how many 0s we need to replace the double
colon.
This means that the original address is.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 120
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 121
Routing Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 122
Routing Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 123
Routing Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 124
Routing Algorithm
Routing Algorithms-
•Routing algorithms are meant for determining the routing of packets in a node.
•Routing algorithms are classified as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 125
Routing Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 126
(Border
Gateway
Protocol)
(Routing Information Protocol) (Open Shortest Path First)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 127
Routing Algorithm
Desired Properties of Routing Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 128
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 129
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 130
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 131
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 132
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 133
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 134
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 135
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 136
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 137
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 138
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 139
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 140
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 141
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 142
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 143
Routing
It solves the problem of count to infinity of Distance vector Algorithm
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 144
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 145
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 146
’s
(Single Source Shortest Path)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 147
Relaxation
• Maintaining this shortest discovered distance d[v] is called
relaxation:
Relax (u, v, w)
{
if (d[v] > d[u]+w) then
d[v]=d[u]+w;
}
where, w= c(u,v)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 148
Dijkstra’s Algorithm
• In Dijkstra’s algorithm, take the next unvisited vertex which
has the current shortest path from the starting vertex in the
table.
• To keep track of those vertices to which no path has reached,
we can assign those vertices an initial distance of either
• infinity (∞ ),
• a number larger than any possible path, or
• a negative number
• For demonstration purposes, we will use ∞
• As well as finding the length of the shortest path, we’d like to find
the corresponding shortest path
• Each time we update the shortest distance to a particular vertex,
we will keep track of the predecessor used to reach this vertex on
the shortest path.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 149
Example of Dijkstra’s algorithm
Graph with 2
B D
edge weights: 10
8
A 1 4 7 9
Dijkstra’s Algorithm:-
3
C 2 E
• Minimization Method- Optimization
• Optimization problem can be solve by Greedy Approach gives Optimum result
• So, it’s a predefined procedure – solve in stages like vertex to vertex approach
• Shortest path from One vertex to every vertices either direct path or via other
vertices
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 150
Example of Dijkstra’s algorithm
Initialize: 2
Note- Select any vertex as source one B D
10
Let A be the source vertex
8
0 A 1 4 7 9
Source Destination
3
Q: A B C D E C 2 E
0
S: {}
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 151
Example of Dijkstra’s algorithm
“A” EXTRACT-MIN(Q): 2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0
S: { A }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 152
Example of Dijkstra’s algorithm
10
Relax all edges leaving A: 2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3
10 3
S: { A }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 153
Example of Dijkstra’s algorithm
10
“C” EXTRACT-MIN(Q): 2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3
10 3
S: { A, C }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 154
Example of Dijkstra’s algorithm
Relax all edges leaving C: 7 11
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
S: { A, C }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 155
Example of Dijkstra’s algorithm
“E” EXTRACT-MIN(Q): 7 11
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
S: { A, C, E }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 156
Example of Dijkstra’s algorithm
Relax all edges leaving E: 7 11
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
7 11 S: { A, C, E }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 157
Example of Dijkstra’s algorithm
“B” EXTRACT-MIN(Q): 7 11
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
7 11 S: { A, C, E, B }
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 158
Example of Dijkstra’s algorithm
Relax all edges leaving B: 7 9
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
7 11 S: { A, C, E, B }
9
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 159
Example of Dijkstra’s algorithm
“D” EXTRACT-MIN(Q): 7 9
2
B D
10
8
0 A 1 4 7 9
3
Q: A B C D E C 2 E
0 3 5
10 3
7 11 5
7 11 S: { A, C, E, B, D }
9
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 160
Summary
• Given a weighted directed graph, we can find the shortest
distance between two vertices by:
– starting with a trivial path containing the initial vertex
– growing this path by always going to the next vertex which
has the shortest current path
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 161
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 162
Routing
Forming shortest path three for router A in a graph
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 163
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 164
Routing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 165
Routing
To show that the shortest path tree for each node is different, we found
the shortest path tree as seen by node C.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 166
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 167
Routing
(Border
(Routing (Open Shortest Path First)
Gateway
Information
Protocol)
Protocol)
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 168
Distance Vector Routing Algorithm
Distance Vector Routing is a dynamic routing algorithm.
(Updating of Routing table )
It works in the following steps-
Step-01:
Each router prepares its routing table. By their local knowledge. each router knows
about-
•All the routers present in the network
•Distance to its neighboring routers
Step-02:
•Each router exchanges its distance vector with its neighboring routers.
•Each router prepares a new routing table using the distance vectors it has
obtained from its neighbors.
•This step is repeated for (n-2) times if there are n routers in the network.
•After this, routing tables converge / become stable.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 169
Distance Vector Routing
Distance Vector Routing Example-
Consider-
•There is a network consisting of 4 routers.
•The weights are mentioned on the edges.
•Weights could be distances or costs or delays.
At Router A- At Router B-
Destination Distance Next Hop Destination Distance Next Hop
A 0 A A 2 A
B 2 B B 0 B
C ∞ – C 3 C
D 1 D D 7 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 170
Distance Vector Routing
Step-01:
Each router prepares its routing table using its local knowledge.
Routing table prepared by each router is shown below-
At Router A-
At Router B-
Destination Distance Next Hop Destination Distance Next Hop
A 0 A A 2 A
B 2 B B 0 B
C ∞ – C 3 C
D 1 D D 7 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 171
Distance Vector Routing
At Router C- At Router D-
Destination Distance Next Hop Destination Distance Next Hop
A ∞ – A 1 A
B 3 B B 7 B
C 0 C C 11 C
D 11 D D 0 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 172
Distance Vector Routing
Step-02:
•Each router exchanges its distance vector obtained in Step-01 with its neighbors.
•After exchanging the distance vectors, each router prepares a new routing table.
This is shown below-
At Router A-
•Router A receives distance vectors from its neighbors B and D.
•Router A prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 173
Distance Vector Routing
•Cost of reaching destination B from router A = min { 2+0 , 1+7 } = 2 via B.
•Cost of reaching destination C from router A = min { 2+3 , 1+11 } = 5 via B.
•Cost of reaching destination D from router A = min { 2+7 , 1+0 } = 1 via D.
Explanation For Destination B
•Router A can reach the destination router B via its neighbor B or neighbor D.
•It chooses the path which gives the minimum cost.
•Cost of reaching router B from router A via neighbor B = Cost (A→B) + Cost
(B→B)= 2 + 0 = 2
•Cost of reaching router B from router A via neighbor D = Cost (A→D) + Cost (D→B)
=1+7=8
•Since the cost is minimum via neighbor B, so router A chooses the path via B.
•It creates an entry (2, B) for destination B in its new routing table.
•Similarly, we calculate the shortest path distance to each destination router at every
router.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 174
Distance Vector Routing
Thus, the new routing table at router A is-
Destination Distance Next Hop
A 0 A
B 2 B
C 5 B
D 1 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 175
Distance Vector Routing
At Router B-
•Router B receives distance vectors from its neighbors A, C and D.
•Router B prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 176
Distance Vector Routing
•Cost of reaching destination A from router B = min { 2+0 , 3+∞ , 7+1 } = 2 via A.
•Cost of reaching destination C from router B = min { 2+∞ , 3+0 , 7+11 } = 3 via C.
•Cost of reaching destination D from router B = min { 2+1 , 3+11 , 7+0 } = 3 via A.
Thus, the new routing table at router B is-
Destination Distance Next Hop
A 2 A
B 0 B
C 3 C
D 3 A
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 177
Distance Vector Routing
At Router C-
•Router C receives distance vectors from its neighbors B and D.
•Router C prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 178
Distance Vector Routing
•Cost of reaching destination A from router C = min { 3+2 , 11+1 } = 5 via B.
•Cost of reaching destination B from router C = min { 3+0 , 11+7 } = 3 via B.
•Cost of reaching destination D from router C = min { 3+7 , 11+0 } = 10 via B.
Thus, the new routing table at router C is-
Destination Distance Next Hop
A 5 B
B 3 B
C 0 C
D 10 B
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 179
Distance Vector Routing
At Router D-
•Router D receives distance vectors from its neighbors A, B and C.
•Router D prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 180
Distance Vector Routing
•Cost of reaching destination A from router D = min { 1+0 , 7+2 , 11+∞ } = 1 via A.
•Cost of reaching destination B from router D = min { 1+2 , 7+0 , 11+3 } = 3 via A.
•Cost of reaching destination C from router D = min { 1+∞ , 7+3 , 11+0 } = 10 via B.
Thus, the new routing table at router D is-
Destination Distance Next Hop
A 1 A
B 3 A
C 10 B
D 0 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 181
Distance Vector Routing
Step-03:
•Each router exchanges its distance vector obtained in Step-02 with its neighboring
routers.
•After exchanging the distance vectors, each router prepares a new routing table.
This is shown below-
At Router A-
•Router A receives distance vectors from its neighbors B and D.
•Router A prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 182
Distance Vector Routing
•Cost of reaching destination B from router A = min { 2+0 , 1+3 } = 2 via B.
•Cost of reaching destination C from router A = min { 2+3 , 1+10 } = 5 via B.
•Cost of reaching destination D from router A = min { 2+3 , 1+0 } = 1 via D.
Thus, the new routing table at router A is-
Destination Distance Next Hop
A 0 A
B 2 B
C 5 B
D 1 D
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 183
Distance Vector Routing
At Router B-
•Router B receives distance vectors from its neighbors A, C and D.
•Router B prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 184
Distance Vector Routing
•Cost of reaching destination A from router B = min { 2+0 , 3+5 , 3+1 } = 2 via A.
•Cost of reaching destination C from router B = min { 2+5 , 3+0 , 3+10 } = 3 via C.
•Cost of reaching destination D from router B = min { 2+1 , 3+10 , 3+0 } = 3 via A.
Thus, the new routing table at router B is-
Destination Distance Next Hop
A 2 A
B 0 B
C 3 C
D 3 A
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 185
Distance Vector Routing
At Router C-
•Router C receives distance vectors from its neighbors B and D.
•Router C prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 186
Distance Vector Routing
•Cost of reaching destination A from router C = min { 3+2 , 10+1 } = 5 via B.
•Cost of reaching destination B from router C = min { 3+0 , 10+3 } = 3 via B.
•Cost of reaching destination D from router C = min { 3+3 , 10+0 } = 6 via B.
Thus, the new routing table at router C is-
Destination Distance Next Hop
A 5 B
B 3 B
C 0 C
D 6 B
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 187
Distance Vector Routing
At Router D-
•Router D receives distance vectors from its neighbors A, B and C.
•Router D prepares a new routing table as-
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 188
Distance Vector Routing
•Cost of reaching destination A from router D = min { 1+0 , 3+2 , 10+5 } = 1 via A.
•Cost of reaching destination B from router D = min { 1+2 , 3+0 , 10+3 } = 3 via A.
•Cost of reaching destination C from router D = min { 1+5 , 3+3 , 10+0 } = 6 via A.
Thus, the new routing table at router D is-
Destination Distance Next Hop
A 1 A
B 3 A
C 6 A
D 0 D
These will be the final routing tables at each router.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 189
Distance Vector Routing
Identifying Unused Links-
After routing tables converge (becomes stable),
•Some of the links connecting the routers may never be used.
•In the above example, we can identify the unused links as-
We have-
•The value of next hop in the final routing table of router A suggests that only edges
AB and AD are used.
•The value of next hop in the final routing table of router B suggests that only edges
BA and BC are used.
•The value of next hop in the final routing table of router C suggests that only edge
CB is used.
•The value of next hop in the final routing table of router D suggests that only edge
DA is used.
Thus, edges BD and CD are never used.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 190
Distance Vector Routing
Important Notes-
Note-01:
n Distance Vector Routing,
Only distance vectors are exchanged.
“Next hop” values are not exchanged.
This is because it results in exchanging the large amount of data which consumes more
bandwidth.
Note-02:
While preparing a new routing table-
A router takes into consideration only the distance vectors it has obtained from its
neighboring routers.
It does not take into consideration its old routing table.
Note-03:
The algorithm is called so because-
It involves exchanging of distance vectors between the routers.
Distance vector is nothing but an array of distances.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 191
Distance Vector Routing
Note-04:
The algorithm keeps on repeating periodically and never stops.
This is to update the shortest path in case any link goes down or topology changes.
Note-05:
Routing tables are prepared total (n-1) times if there are n routers in the given
network.
This is because shortest path between any 2 nodes contains at most n-1 edges if there
are n nodes in the graph.
Note-06:
Distance Vector Routing suffers from count to infinity problem.
Distance Vector Routing uses UDP at transport layer.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 192
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 193
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 194
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 195
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 196
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 197
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 198
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 199
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 200
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 201
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 202
DHCP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 203
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 204
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 205
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 206
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 207
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 208
ARP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 209
NAT
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 210
NAT
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 211
NAT
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 212
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 213
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 214
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 215
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 216
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 217
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 218
ICMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 219
NAT
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 220
Congestion Control
• Congestion is an important issue that can arise in packet
switched network.
• Congestion is a situation in Communication Networks in
which too many packets are present in a part of the
subnet, performance degrades.
• Congestion in a network may occur when the load on the
network (i.e. the number of packets sent to the network)
is greater than the capacity of the network (i.e. the
number of packets a network can handle.).
• Network congestion occurs in case of traffic overloading.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 221
Congestion Control
Congestion in a network may occur if the load on the network—
the number of packets sent to the network—is greater than the
capacity of the network—the number of packets a network can
handle. Congestion control refers to the mechanisms and
techniques to control the congestion and keep the load below
the capacity.
Queues in a router
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 222
Congestion Control
Packet delay and throughput as functions of load
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 223
Congestion Control
Factor that causes Congestion
• Packet arrival rate exceeds the outgoing link capacity.
• Insufficient memory to store arriving packets.
• Bursty traffic.
• Slow processor.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 224
Congestion Control Techniques
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 225
Congestion Control
Congestion control categories
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 226
Congestion Control
Open- Loop Congestion Control
Open loop congestion control policies are applied to
prevent congestion before it happens. The congestion
control is handled either by the source or the destination.
Policies adopted by open loop congestion control
• Retransmission Policy
• Window Policy
• Discarding Policy
• Acknowledgment Policy:
• Admission Policy
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 227
Congestion Control
Closed- Loop Congestion Control
Closed loop congestion control technique is used to treat
or alleviate congestion after it happens.
Several techniques are used by different protocols; some
of them are:
• Backpressure
• Choke packet technique
• Implicit Signaling
• Explicit Signaling
• Forward Signaling
• Backward Signaling
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 228
Congestion Control
Backpressure method for alleviating congestion
Choke packet
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 229
Congestion Control
Closed- Loop Congestion Control
Backpressure:
• Backpressure is a technique in which a congested node
stop receiving packet from upstream node.
• This may cause the upstream node or nodes to become
congested and rejects receiving data from above nodes.
• Backpressure is a node-to-node congestion control
technique that propagates in the opposite direction of
data flow.
• The backpressure technique can be applied only to virtual
circuit where each node has information of its above
upstream node.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 230
Congestion Control
Closed- Loop Congestion Control
Backpressure:
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 231
Congestion Control
Closed- Loop Congestion Control
Choke packet technique:
• It is applicable to both virtual networks as well as
datagram subnets.
• A choke packet is a packet sent by a node to the source
to inform it of congestion.
• Each router monitors its resources and the utilization at
each of its output lines.
• Whenever the resource utilization exceeds the threshold
value which is set by the administrator, the router directly
sends a choke packet to the source giving it a feedback
to reduce the traffic.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 232
Congestion Control
Closed- Loop Congestion Control
Choke packet technique:
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 233
Congestion Control
• `
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 234
Congestion Control
• `
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 235
Congestion Control
• `
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 236
Congestion Control
• `
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 237
Congestion Control
• `
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 238
Congestion Control
FIFO queue
Priority queuing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 239
Congestion Control
Weighted fair queuing
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 240
Congestion Control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 241
Congestion Control
Leaky bucket
A leaky bucket
algorithm
shapes busty
traffic into
fixed-rate
traffic by
averaging the
data rate. It
Leaky bucket implementation
may drop the
packets if the
bucket is full.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 242
Congestion Control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 243
Congestion Control
Token bucket
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 244
Congestion Control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 245
Congestion Control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 246
Congestion Control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 247
Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details
• YouTube/ other Video Links:
https://www.youtube.com/watch?v=ThdO9beHhpA : IP address
https://www.youtube.com/watch?v=Vdc8TCESIg8 : TCP and UDP
https://www.youtube.com/watch?v=G5bhSs-s1cw: TCP/IP
https://www.youtube.com/watch?v=PT06TsYJDsM&t=17s: ATM
https://www.youtube.com/watch?v=ef4ztFwzBW0: ATM layers
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 248
Daily Quiz
• The network layer is concerned with __________ of data.
a) bits
b) frames
c) packets
d) bytes
• Which one of the following is not a function of network layer?
a) routing
b) inter-networking
c) congestion control
d) error control
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 249
Daily Quiz
• A 4 byte IP address consists of __________
a) only network address
b) only host address
c) network address & host address
d) network address & MAC address
• The network layer protocol for internet is __________
a) Ethernet
b) internet protocol
c) hypertext transfer protocol
d) file transfer protocol
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 250
Daily Quiz
• Which one of the following algorithm is not used for
congestion control?
a) traffic aware routing
b) admission control
c) load shedding
d) routing information protocol
• Which of the following are transport layer protocols used in
networking?
a) TCP and FTP
b) UDP and HTTP
c) TCP and UDP
d) HTTP and FTP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 251
Weekly Assignment
• Explain IPv4 and IPv6 addressing.
• What is the difference between network layer delivery and
transport layer delivery?
• Explain the congestion control techniques.
• Define connectionless and connection oriented services.
Explain header format of TCP protocol.
• What do you understand by ATM(Asynchronous Transfer
Machine)? Explain cell header format in ATM and briefly
describe the four services classes of ATM.
• Can a host have more than one IP Address? Explain.
• List the features of UDP & Calculate the size of largest
possible UDP message.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 252
MCQ s
• Transmission control protocol ___________
a) is a connection-oriented protocol
b) uses a three way handshake to establish a connection
c) receives data from application as a single stream
d) all of the mentioned
• Which of the following is not applicable for IP?
a) Error reporting
b) Handle addressing conventions
c) Datagram format
d) Packet handling conventions
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 253
MCQ s
• Which one of the following is a version of UDP with
congestion control?
a) datagram congestion control protocol
b) stream control transmission protocol
c) structured stream transport
d) user congestion control protocol
• Which of the following field in IPv4 datagram is not related to
fragmentation?
a) Flags
b) Offset
c) TOS
d) Identifier
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 254
MCQ s
• Transport layer protocols deals with ____________
a) application to application communication
b) process to process communication
c) node to node communication
d) man to man communication
• The size of an IP address in IPv6 is _________
a) 4 bytes
b) 128 bits
c) 8 bytes
d) 100 bits
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 255
MCQ s
• The header length of an IPv6 datagram is ___________
a) 10bytes
b) 25bytes
c) 30bytes
d) 40bytes
• If the value in protocol field is 17, the transport layer protocol
used is _____________
a) TCP
b) UDP
c) ICMP
d) IGMP
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 256
Old Question Papers
• Describe the ATM protocol layers and compare them to OSI protocol
hierarchy.
• Explain the frame format of IPv4? What are the advantages of IPv6 and
IPv4?
• Explain the header format of TCP? How connection is established in TCP?
• Explain the following?
(i) Leaky bucket algorithm (ii) User Datagram Protocol (UDP)
• What are the various causes of Congestion?
• What are the desired properties of routing algorithm?
• Compare IPv4 and IPv6.
• What do you understand by TCP and UDP . Explain.
• Define the terms: MAC address, IP address, Hardware/ Physical address
• What do you understand by ATM? Explain cell header format in ATM and
briefly Describe the four services classes of ATM
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 257
Expected Questions for University Exam
• What do you understand by ATM? Explain cell header format
in ATM and briefly Describe the four services classes of ATM.
• Explain the Transmission control protocol with their header
format.
• What is IP datagram? In how many categories IP address are
defined. Explain them.
• Differentiate between TCP and UDP
• What do you mean by Congestion control? Explain the
various Congestion control techniques.
• List the various design issues related to session layer.
• List the features of UDP & Calculate the size of largest
possible UDP message.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 258
Summary
This unit is devoted to network layer, transport layer and
session layer of Internet model. This unit covers IP
addresses : IPv4 and IPv6 and various network layer
protocols such as IP, ARP, ICMP, IGMP for the delivery
and routing of packets over the internet. Overview of
transport layer services and protocols used in this layer:
UDP and TCP are also covered in this unit. A brief
introduction of ATM, congestion control, quality of service
and issues related to session layer is also presented in
this unit.
.
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 259
References
• Forouzan, Data Communication & Networking, McGrawhill
Education
• Lathi, B. P. & Ding, Z., (2010), Modern Digital and Analog
Communication Systems,Oxford University Press
• Stallings, W., (2010), Data and Computer Communications,
Pearson.
• Andrew S. Tanenbaum, “Computer Networks” Pearson.
• Ajit Pal, “Data Communication and Computer Networks”,
PHI
• Dimitri Bertsekas, Robert G. Gallager, “Data Networks”,
Prentice Hall, 1992
4/7/2023 Dr. Prasanna Singh CN CS Unit-3 260