You are on page 1of 132

21CS52 -

COMPUTER NETWORKS
Textbooks:
1. Computer-Networks- Andrew S. Tanenbaum and David J. Wetherall, Pearson Education,
5th-Edition. (www.pearsonhighered.com/tanenbaum)
2. Computer Networking A Top-Down Approach -James F. Kurose and Keith W.
RossPearson Education 7th Edition.
Reference Books:
1. Behrouz A Forouzan, Data and Communications and Networking, Fifth Edition, McGraw
Hill,Indian Edition
2. Larry L Peterson and Brusce S Davie, Computer Networks, fifth edition, ELSEVIER
(As per VTU Syllabus)

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
CREDITS – 4 (3 T + 2 L)
CIE (Continuous Internal Evaluation) MARKS – 50
SEE (Semester End Examination) MARKS – 50

Course Learning Objectives:


CLO1. Fundamentals of data communication networks.

CLO2. Software and hardware interfaces

CLO3. Application of various physical components and protocols

CLO4. Communication challenges and remedies in the networks.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS

Course Outcomes:
CO1. Learn the basic needs of communication system.
CO2. Interpret the communication challenges and its solution.
CO3. Identify and organize the communication system
network components
CO4. Design communication networks for user requirements.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Assessment Details (both CIE and SEE)

Continuous Internal Evaluation:

Three Unit Tests each of 20 Marks (duration 01 hour)

1. First test at the end of 5th week of the semester


2. Second test at the end of the 15th week of the semester

Two assignments each of 10 Marks

1. First assignment at the end of 4th week of the semester


2. Second assignment at the end of 9th week of the semester

Practical Sessions need to be assessed by appropriate rubrics and viva-voce


method.
This will contribute to 20 marks.

3/2/2024 ELAIYARAJA P
Program Outcomes:
PROGRAM OUTCOMES

PO's PO Description
Engineering knowledge: Apply the knowledge of mathematics, science, engineering
PO1 fundamentals, and an engineering specialization to the solution of complex
engineering problems.
Problem analysis: Identify, formulate, review research literature, and analyze
PO2 complex engineering problems reaching substantiated conclusions using first
principles of mathematics, natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified needs
PO3
with appropriate consideration for the public health and safety, and the cultural,
societal, and environmental considerations.
Conduct investigations of complex problems: Use research-based knowledge and
PO4 research methods including design of experiments, analysis and interpretation of
data, and synthesis of the information to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources, and
PO5 modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
The engineer and society: Apply reasoning informed by the contextual knowledge
PO6 to assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
Environment and sustainability: Understand the impact of the professional
PO7 engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and
PO8
responsibilities and norms of the engineering practice.

3/2/2024 ELAIYARAJA P
Program Outcomes:
Individual and team work: Function effectively as an individual, and as a member
PO9
or leader in diverse teams, and in multidisciplinary settings.
Communication: Communicate effectively on complex engineering activities with
the engineering community and with society at large, such as, being able to
PO10
comprehend and write effective reports and design documentation, make effective
presentations, and give and receive clear instructions.
Project management and finance: Demonstrate knowledge and understanding of
the engineering and management principles and apply these to one’s own work, as a
PO11
member and leader in a team, to manage projects and in multidisciplinary
environments.
Life-long learning: Recognize the need for, and have the preparation and ability to
PO12 engage in independent and life-long learning in the broadest context of technological
change.

3/2/2024 ELAIYARAJA P
Program Specific Outcomes:

PROGRAM SPECIFIC OUTCOMES

PSO's PSO Description


An ability to design and analyze algorithms by applying theoretical concepts to build
PSO1 complex and computer- based systems in the domain of System Software, Computer
Networks & Security, Web technologies, Data Science and Analytics.
Be able to develop various software solutions by applying the techniques of Data
PSO2 Base Management, Complex Mathematical Models, Software Engineering practices
and Machine Learning with Artificial Intelligence.

3/2/2024 ELAIYARAJA P
21CS52 –
COMPUTER NETWORKS

3/2/2024 ELAIYARAJA P
Module 3 –
The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS

➢ Module 3 - The Network Layer


Laboratory Component:
1. Implement transmission of ping messages/trace route over a network
topology consisting of 6 nodes and find the number of packets dropped due to
congestion in the network.
2. Write a program to find the shortest path between vertices using bellman-ford
algorithm.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
The Network Layer:
Network Layer Design Issues:
Store-and-Forward Packet Switching, Services Provided to the
Transport Layer, Implementation of Connectionless Service,
Implementation of Connection-Oriented Service, Comparison of
Virtual-Circuit and Datagram Networks.
Routing Algorithms :
The Optimality Principle, Shortest Path Algorithm, Flooding,
Distance Vector Routing, Link State Routing, Hierarchical Routing,

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

The Network Layer:


Congestion Control Algorithms:
Approaches to Congestion Control, Traffic-Aware Routing
Admission, Admission Control, Traffic Throttling, Load Shedding
QoS:
Application Requirements, Traffic Shaping, Packet Scheduling,
Admission Control, Integrated Services, Differentiated Services.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

▪ Network layer is majorly focused on getting packets


from the source to the destination, routing error
handling and congestion control.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Functions
▪ Addressing: Maintains the address at the frame header of both source
and destination and performs addressing to detect various devices in
network.
▪ Packeting: This is performed by Internet Protocol. The network layer
converts the packets from its upper layer.
▪ Routing: It is the most important functionality. The network layer
chooses the most relevant and best path for the data transmission from
source to destination.
▪ Inter-networking: It works to deliver a logical connection across
multiple devices.
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Functions
Essential

⚫ Routing: mechanisms for determining the set of best paths for


routing packets requires the collaboration of network elements

⚫ Forwarding: transfer of packets from NE inputs to outputs

⚫ Priority & Scheduling: determining order of packet


transmission in each NE

Optional: congestion control, segmentation & reassembly,


security
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Packet Switching

The environment of the network layer protocols.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

•Store-and-Forward Packet Switching


•Services Provided to the Transport Layer
•Connectionless Service
•Connection-Oriented Service

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues
▪ 1. Store and Forward packet switching: The host sends the
packet to the nearest router. This packet is stored there until it has
fully arrived once the link is fully processed by verifying the
checksum then it is forwarded to the next router till it reaches the
destination. This mechanism is called “Store and Forward packet
switching.”
▪ 2. Services provided to Transport Layer: Through the
network/transport layer interface, the network layer transfers it’s
services to the transport layer.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues
Services are described below.
▪ Services must not depend on router technology.
▪ The transport layer needs to be protected from the type,
number and topology of the available router.
▪ The network addresses for the transport layer should use
uniform numbering pattern also at LAN and WAN
connections.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues

Based on the connections there are 2 types of services provided


▪ Connectionless – The routing and insertion of packets into
subnet is done individually. No added setup is required.
▪ Connection-Oriented – Subnet must offer reliable service
and all the packets must be transmitted over a single route.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues

▪ Implementation of Connectionless Service:


Packet are termed as “datagrams” and corresponding subnet as
“datagram subnets”. When the message size that has to be transmitted
is 4 times the size of the packet, then the network layer divides into 4
packets and transmits each packet to router via. a few protocol.Each
data packet has destination address and is routed independently
irrespective of the packets.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues

•Implementation of Connection Oriented service: To use a


connection-oriented service, first we establishes a connection, use it
and then release it. In connection-oriented services, the data packets
are delivered to the receiver in the same order in which they have
been sent by the sender.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Datagrams and Virtual Circuits

Two modes of operation:


Connectionless
Virtual Circuit

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues
•It can be done in either two ways :
•Circuit Switched Connection – A dedicated physical path or a
circuit is established between the communicating nodes and then
data stream is transferred.
•Virtual Circuit Switched Connection – The data stream is
transferred over a packet switched network, in such a way that it
seems to the user that there is a dedicated path from the sender to
the receiver. A virtual path is established here. While, other
connections may also be using the same path.
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Connection, connection-less service

❖ datagram network provides network-layer


connectionless service
❖ virtual-circuit network provides network-layer
connection service
❖ analogous to TCP/UDP connecton-oriented /
connectionless transport-layer services, but:
▪ service: host-to-host
▪ no choice: network provides one or the other
▪ implementation: in network core
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Tables in Datagram Networks
Destination Output
⚫ Route determined by table
address port
lookup
0785 7 ⚫ Routing decision involves
finding next hop in route to
given destination
1345 12
⚫ Routing table has an entry
1566 6
for each destination
specifying output port that
leads to next hop
⚫ Size of table becomes
2458 12
impractical for very large
number of destinations
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Packet Switching – Virtual Circuit

Packet Packet
Packet

Packet

Virtual circuit

⚫ Call set-up phase sets ups pointers in fixed path along network
⚫ All packets for a connection follow the same path
⚫ Abbreviated header identifies connection on each link
⚫ Packets queue for transmission
⚫ Variable bit rates possible, negotiated during call set-up
⚫ Delays variable, cannot be less than circuit switching
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Connection Setup
Connect Connect Connect
request request request
SW SW … SW
1 2 n
Connect Connect Connect
confirm confirm confirm

⚫ Signaling messages propagate as route is selected


⚫ Signaling messages identify connection and setup tables in
switches
⚫ Typically a connection is identified by a local tag, Virtual
Circuit Identifier (VCI)
⚫ Each switch only needs to know how to relate an incoming tag
in one input to an outgoing tag in the corresponding output
⚫ Once tables are setup, packets can flow along path
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Virtual Circuit Forwarding Tables
Input Output Output
VCI port VCI ⚫ Each input port of packet
switch has a forwarding table
12 13 44
⚫ Lookup entry for VCI of
incoming packet
15 15 23
⚫ Determine output port (next
27 13 16 hop) and insert VCI for next
link
⚫ Very high speeds are possible
⚫ Table can also include priority
58 7 34 or other information about
how packet should be treated
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Packet Networks
1 3
6

2 Node
5
(switch or router)

⚫ Three possible (loopfree) routes from 1 to 6:


⚫ 1-3-6, 1-4-5-6, 1-2-5-6

⚫ Which is “best”?
⚫ Min delay? Min hop? Max bandwidth? Min cost?
Max reliability?
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Virtual-Circuit Packet Networks
2
1 7 8
1 3 B
A 3
5 1 6 5
4
2
VCI
Host 4

3 5 Switch or router
2
C 5
6
2 D

⚫ Route determined during connection setup


⚫ Tables in switches implement forwarding that realizes selected
route
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Tables in VC Packet Networks
Node 3
Incoming Outgoing
Node 1 Node VCI Node VCI Node 6
Incoming Outgoing 1 2 6 7 Incoming Outgoing
Node VCI Node VCI 1 3 4 4 Node VCI Node VCI
A 1 3 2 4 2 6 1 3 7 B 8
A 5 3 3 6 7 1 2 3 1 B 5
3 2 A 1 6 1 4 2 B 5 3 1
3 3 A 5 4 4 1 3 B 8 3 7

Node 4
Incoming Outgoing
Node VCI Node VCI
Node 2 2 3 3 2
Node 5
3 4 5 5
Incoming Outgoing 3 2 2 3 Incoming Outgoing
Node VCI Node VCI 5 5 3 4 Node VCI Node VCI
C 6 4 3 4 5 D 2
4 3 C 6 D 2 4 5

⚫ Example: VCI from A to D


⚫ From A & VCI 5 → 3 & VCI 3 → 4 & VCI 4
⚫ → 5 & VCI 5 → D & VCI 2
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Tables in Datagram Packet Networks
Node 3

Node 1 Destination Next node Node 6


Destination Next node 1 1 Destination Next node
2 4 1 3
2 2
4 4 2 5
3 3
4 4 5 6 3 3
6 6 4 3
5 2
6 3 5 5

Node 4
Destination Next node
1 1
2 2
Node 2 Node 5
3 3
Destination Next node Destination Next node
5 5
1 1 6 3 1 4
3 1 2 2
4 4 3 4
5 5 4 4
6 5 6 6

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - TheNetwork Layer
Comparison of Virtual-Circuit and Datagram Networks

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing and Forwarding

⚫ Routing
⚫ How to determine the routing table entries

⚫ carried out by routing

⚫ Forwarding
⚫ Look up routing table & forward packet from input to output
port
⚫ carried out by IP layer

Routers exchange information using routing protocols to develop


the routing tables

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Creating the Routing Tables
⚫ Need information on state of links
⚫ Link up/down; congested; delay or other metrics

⚫ Need to distribute link state information using a routing


protocol
⚫ What information is exchanged? How often?

⚫ Exchange with neighbors; Broadcast or flood

⚫ Need to compute routes based on information


⚫ Single metric; multiple metrics

⚫ Single route; alternate routes

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Algorithm Requirements
⚫ Responsiveness to changes
⚫ Topology or bandwidth changes, congestion

⚫ Rapid convergence of routers to consistent set of routes

⚫ Freedom from persistent loops

⚫ Optimality
⚫ Resource utilization, path length

⚫ Robustness
⚫ Continues working under high load, congestion, faults,
equipment failures, incorrect implementations
⚫ Simplicity
⚫ Efficient software implementation, reasonable processing
load
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Centralized vs Distributed Routing
⚫ Centralized Routing
⚫ All routes determined by a central node

⚫ All state information sent to central node

⚫ Problems adapting to frequent topology changes

⚫ Does not scale

⚫ Distributed Routing
⚫ Routes determined by routers using distributed
algorithm
⚫ State information exchanged by routers

⚫ Adapts to topology and other changes

⚫ Better scalability
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Shortest Paths & Routing

⚫ Many possible paths connect any given source and to


any given destination
⚫ Routing involves the selection of the path to be used
to accomplish a given transfer
⚫ Typically it is possible to attach a cost or distance to a
link connecting two nodes
⚫ Routing can then be posed as a shortest path problem

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Shortest Paths & Routing

The first 5 steps used in computing the shortest path from A to D.


The arrows indicate the working node.
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Metrics
Means for measuring desirability of a path
⚫ Path Length = sum of costs or distances

⚫ Possible metrics

⚫ Hop count: rough measure of resources used

⚫ Reliability: link availability; BER

⚫ Delay: sum of delays along path; complex &


dynamic
⚫ Bandwidth: “available capacity” in a path

⚫ Load: Link & router utilization along path

⚫ Cost: ?
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Shortest Path Approaches
Distance Vector Protocols
⚫ Neighbors exchange list of distances to destinations

⚫ Best next-hop determined for each destination

⚫ Bellman ford (distributed) shortest path algorithm

Link State Protocols


⚫ Link state information flooded to all routers

⚫ Routers have complete topology information

⚫ Shortest path (& hence next hop) calculated

⚫ Dijkstra (centralized) shortest path algorithm

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Distance Vector
Local Signpost Table Synthesis
⚫ Direction ⚫ Neighbors exchange
⚫ Distance table entries
⚫ Determine current best

Routing Table next hop


For each destination list: ⚫ Inform neighbors
⚫ Periodically
⚫ Next Node
⚫ After changes
⚫ Distance dest next dist

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Shortest Path to SJ
Focus on how nodes find their shortest
path to a given destination node, i.e. SJ sj

Dj
Cij
j
i
If Di is the shortest distance to SJ from i
Di and if j is a neighbor on the shortest path,
then Di = Cij + Dj
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
But we don’t know the shortest paths
i only has local info
from neighbors
sj
Dj'
j'
Cij'
Dj
Cij j
i
Cij” Pick current
Di j"
Dj" shortest path
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer SJ sends
accurate info

2 Hops
1 Hop sj
3 Hops From SJ
From SJ
From SJ

Hop-1 nodes
calculate current
(next hop, dist), &
Accurate info about SJ send to neighbors

Why Distance Vector Works ripples across network,


Shortest Path Converges
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Bellman-Ford Algorithm
⚫ Consider computations for one destination d
⚫ Initialization
⚫ Each node table has 1 row for destination d
⚫ Distance of node d to itself is zero: Dd=0
⚫ Distance of other node j to d is infinite: Dj=, for j d
⚫ Next hop node nj = -1 to indicate not yet defined for j  d
⚫ Send Step
⚫ Send new distance vector to immediate neighbors across local link
⚫ Receive Step
⚫ At node j, find the next hop that gives the minimum distance to d,

⚫ Minj { Cij + Dj }
⚫ Replace old (nj, Dj(d)) by new (nj*, Dj*(d)) if new next node or distance
⚫ Go to send step

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Bellman-Ford Algorithm
⚫ Now consider parallel computations for all destinations d
⚫ Initialization
⚫ Each node has 1 row for each destination d
⚫ Distance of node d to itself is zero: Dd(d)=0
⚫ Distance of other node j to d is infinite: Dj(d)=  , for j  d
⚫ Next node nj = -1 since not yet defined
⚫ Send Step
⚫ Send new distance vector to immediate neighbors across local link
⚫ Receive Step
⚫ For each destination d, find the next hop that gives the minimum
distance to d,
⚫ Minj { Cij+ Dj(d) }
⚫ Replace old (nj, Di(d)) by new (nj*, Dj*(d)) if new next node or distance
found
⚫ Go to send step
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Distance Vector Protocols

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1
2
3

Table entry Table entry


@ node 1 @ node 3
for dest SJ for dest SJ
2 3
1 1
5 2

4 Dest
3 1 3 6

2
2 5
4
3/2/2024 ELAIYARAJA P
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6,1) (-1, ) (6,2)
2
3

D3=D6+1
n3=6
D6=0
2 3 1
1 1
5 2
0
4 Dest
3 1 3 6

2 5 2
4
2
D5=D6+2 D6=0
n5=6

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3

3 1
2 3
1 1
5 2
3 0
4 Dest
3 1 3 6

2 2
5
4
6 2
3/2/2024 ELAIYARAJA P
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3 (3,3) (4,4) (6, 1) (3,3) (6,2)

1
3 2 3
1 1
5 2
3 0
4 Dest
3 1 3 6

2
2 5
4
6 4 2
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2
3
1 5
3 2
3
1 1
5 2
3 0
4 Dest
3 1 3 6

2
2 5
4 4
2
Network disconnected; Loop created between nodes 3 and 4
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2 (3,7) (4,4) (4, 5) (5,5) (6,2)
3
5
37 2
3
1 1
5 53 2
0
4 Dest
3 1 3 6

2
2 5
4
4 2

Node 4 could have chosen 2 as next node because of tie


3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2 (3,7) (4,4) (4, 5) (5,5) (6,2)
3 (3,7) (4,6) (4, 7) (5,5) (6,2)
5 7
7 2 3
1 1
5 2
5 0
4 Dest
3 1 3 6

2 5 2
4
46 2

Node 2 could have chosen 5 as next node because of tie


3/2/2024 ELAIYARAJA P
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

1 (3,3) (4,4) (4, 5) (3,3) (6,2)


2 (3,7) (4,4) (4, 5) (2,5) (6,2)
3 (3,7) (4,6) (4, 7) (5,5) (6,2)
4 (2,9) (4,6) (4, 7) (5,5) (6,2)

79 2 7
3
1 1
5 2
5 0
4 Dest
3 1 3 6

2
2 5
4
6 2

Node 1 could have chose 3 as next node because of tie


3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Link-State Algorithm
⚫ Basic idea: two step procedure
⚫ Each source node gets a map of all nodes and link metrics
(link state) of the entire network
⚫ Find the shortest path on the map from the source node to
all destination nodes
⚫ Broadcast of link-state information
⚫ Every node i in the network broadcasts to every other node
in the network:
⚫ ID’s of its neighbors: Ni=set of neighbors of i
⚫ Distances to its neighbors: {Cij | j Ni}
⚫ Flooding is a popular method of broadcasting packets
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Dijkstra Algorithm: Finding shortest paths in order
Find shortest paths from Closest node to s is 1 hop away
source s to all other
destinations 2nd closest node to s is 1 hop
away from s or w”
3rd closest node to s is 1 hop
w' away from s, w”, or x

z
w
x
s z'
w"
x'
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Dijkstra’s algorithm
⚫ N: set of nodes for which shortest path already found
⚫ Initialization: (Start with source node s)
⚫ N = {s}, Ds = 0, “s is distance zero from itself”
⚫ Dj=Csj for all j  s, distances of directly-connected neighbors
⚫ Step A: (Find next closest node i)
⚫ Find i  N such that
⚫ Di = min Dj for j  N
⚫ Add i to N
⚫ If N contains all the nodes, stop
⚫ Step B: (update minimum costs)
⚫ For each node j  N
Minimum distance from s to
⚫ Dj = min (Dj, Di+Cij)
j through node i in N
⚫ Go to Step A
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Execution of Dijkstra’s algorithm
2 2 ✓
1 3 1 1 3 1
6 6 ✓
5 2 5 2
3 3
1 4 1 4✓ 2
2
3 3
2 2
✓ 4 5 4 5

Iteration N D2 D3 D4 D5 D6
Initial {1} 3 2✓ 5  
1 {1,3} 3✓ 2 4  3
2 {1,2,3} 3 2 4 7 3 ✓
3 {1,2,3,6} 3 2 4 ✓ 5 3
4 {1,2,3,4,6} 3 2 4 5 ✓ 3
5 {1,2,3,4,5,6} 3 2 4 5 3
3/2/2024 ELAIYARAJA P
Shortest Paths in Dijkstra’s Algorithm
2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2
4 5 4 5
2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2
4 5 4 5

2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2
4 5 4 5
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Reaction to Failure
⚫ If a link fails,
⚫ Router sets link distance to infinity & floods the
network with an update packet
⚫ All routers immediately update their link database &
recalculate their shortest paths
⚫ Recovery very quick
⚫ But watch out for old update messages
⚫ Add time stamp or sequence # to each update
message
⚫ Check whether each received update message is new
⚫ If new, add it to database and broadcast
⚫ If older, send update message on arriving link

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Why is Link State Better?

⚫ Fast, loopless convergence


⚫ Support for precise metrics, and multiple
metrics if necessary (throughput, delay, cost,
reliability)
⚫ Support for multiple paths to a destination
⚫ algorithm can be modified to find best two paths

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

single source shortest path from


node A to node F

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
single source shortest path from
node A to node F

ITERATION S D(B) D(C) D(D) D(E) D(F) P(B) P(C) P(D) P(E) P(F)

0 Ø ∞ ∞ ∞ ∞ ∞ / / / / /

1 A 3 5 9 ∞ ∞ A A A / /
2 B 3 5 7 10 ∞ A A B B /
3 C 3 5 7 10 13 A A B B C
4 D 3 5 7 9 9 A A B D D

5 E 3 5 7 9 9 A A B D D
6 F 3 5 7 9 9 A A B D D

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Specialized Routing
⚫ Flooding
⚫ Useful in starting up network

⚫ Useful in propagating information to all nodes

⚫ Deflection Routing
⚫ Fixed, preset routing procedure

⚫ No route synthesis

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Flooding

Send a packet to all nodes in a network


⚫ No routing tables available

⚫ Need to broadcast packet to all nodes (e.g. to


propagate link state information)

Approach
⚫ Send packet on all ports except one where it arrived

⚫ Exponential growth in packet transmissions

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

1 3
6

2
5

Flooding is initiated from Node 1: Hop 1 transmissions

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

1 3
6

2
5

Flooding is initiated from Node 1: Hop 2 transmissions

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

1 3
6

2
5

Flooding is initiated from Node 1: Hop 3 transmissions

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Limited Flooding
⚫ Time-to-Live field in each packet limits number of hops
to certain diameter

⚫ Each switch adds its ID before flooding; discards


repeats

⚫ Source puts sequence number in each packet; switches


records source address and sequence number and
discards repeats

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Deflection Routing
⚫ Network nodes forward packets to preferred port
⚫ If preferred port busy, deflect packet to another port
⚫ Works well with regular topologies
⚫ Manhattan street network
⚫ Rectangular array of nodes
⚫ Nodes designated (i,j)
⚫ Rows alternate as one-way streets
⚫ Columns alternate as one-way avenues
⚫ Buffer less operation is possible
⚫ Proposed for optical packet networks
⚫ All-optical buffering currently not viable

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3


Tunnel from
last column to
first column
2,0 2,1 2,2 2,3
or vice versa

3,0 3,1 3,2 3,3

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Example: Node (0,2)→(1,0)
busy

0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3

2,0 2,1 2,2 2,3

3,0 3,1 3,2 3,3

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

⚫ Hierarchical Routing
⚫ Partitioning: Domains, autonomous systems,
areas...
⚫ Some routers part of routing backbone

⚫ Some routers only communicate within an area

⚫ Efficient because it matches typical traffic flow


patterns
⚫ Scales

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Hierarchical Addresses and Routing

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Multicast Routing
⚫ Multicast routing useful when a source wants to transmits its
packets to several destinations simultaneously

⚫ Relying on unicast routing by transmitting each copy of packet


separately works, but can be very inefficient if number of
destination is large

⚫ Typical applications is multi-party conferencing over the


Internet

⚫ Example: Multicast Backbone (MBONE) uses reverse path


multicasting
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Multicasting
G1 G1
1
7 2
2 23 4 3
4 1 2
1
5 5 3 23 G1
2 4 1 8
S 11 3 4 G1
54
2 4 2
12 1 3 6 3
3 1 4 G2
3 G3
G3
⚫ Source S sends packets to multicast group G1
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Broadcasting: Example: Hop 1 nodes broadcast
G1 ✓ G1 ✓
1
3 7 2
2 4
2 4 2 3
1
1 5
5 3
2
3 G1 ✓
2 4
1
8
1
S 1 3 4 G1 ✓
5 4
2
2 4
1 2
1
3 6 3
1
3 4 G2
3
G3
G3
⚫ Nodes 2, 3, 4, and 5 broadcast, except on parent ports
⚫ All nodes, not only G1, receive packets
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
DVMRP
⚫ Distance Vector Multicast Routing Protocol
⚫ Uses variation of RIP to determine next hop towards
the source
⚫ Uses RPM and pruning to obtain multicast tree
⚫ Uses tunneling to traverse non-multicast networks
⚫ Used in MBONE
⚫ Not scalable
⚫ 15 hop limit
⚫ Flooding all leaf routers inefficient

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Ad Hoc Networks
Possibilities when the routers are mobile:
Military vehicles on battlefield.
• No infrastructure.
A fleet of ships at sea.
• All moving all the time
Emergency works at earthquake .
• The infrastructure destroyed.
A gathering of people with notebook computers.
• In an area lacking 802.11.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Ad Hoc Networks : Route Discovery

(a) Range of A's broadcast.


(b) After B and D have received A's broadcast.
(c) After C, F, and G have received A's broadcast.
(d) After E, H, and I have received A's broadcast.
Shaded nodes are new recipients. Arrows show possible reverse routes.
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Ad Hoc Networks : Route Discovery

Format of a ROUTE REQUEST packet.

Format of a ROUTE REPLY packet.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing in Ad Hoc Networks : Route Maintenance
(a) D's routing table before G goes down.
(b) The graph after G has gone down.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Principles of congestion control

congestion:
❖ informally: “too many sources sending too much
data too fast for network to handle”
❖ different from flow control!

❖ manifestations:

▪ lost packets (buffer overflow at routers)


▪ long delays (queueing in router buffers)

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Approaches towards congestion control

End-end congestion control:


no explicit feedback from
network
congestion inferred from ACKs
data data
ACKs
observed loss, delay
approach taken by TCP

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Approaches towards congestion control
Network-assisted congestion control:

▪ routers provide direct feedback to explicit congestion info

sending/receiving hosts with flows


data data
ACKs
ACKs
passing through congested router

▪ may indicate congestion level or


explicitly set sending rate

▪ TCP ECN, ATM, DECbit protocols

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Admission Control
⚫ Flows negotiate contract with
network
Peak rate ⚫ Specify requirements:
⚫ Peak, Avg., Min Bit rate
Bits/second

⚫ Maximum burst size


Average rate ⚫ Delay, Loss requirement
⚫ Network computes resources
needed
⚫ “Effective” bandwidth
⚫ If flow accepted, network
allocates resources to ensure
Time QoS delivered as long as
Typical bit rate demanded by a source conforms to contract
variable bit rate information
source
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Random Early Detection (RED)
⚫ Packets produced by TCP will reduce input rate in response to
network congestion
⚫ Early drop: discard packets before buffers are full
⚫ Random drop causes some sources to reduce rate before others,
causing gradual reduction in aggregate input rate

Algorithm:
⚫ Maintain running average of queue length
⚫ If Qavg < minthreshold, do nothing
⚫ If Qavg > maxthreshold, drop packet
⚫ If in between, drop packet according to probability
⚫ Flows that send more packets are more likely to have packets
dropped

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Packet Drop Profile in RED
Probability of packet drop

0
minth maxth full

Average queue length

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
QoS-Application Requirements

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Traffic Shaping

Traffic shaping Policing Traffic shaping Policing

1 2 3 4

Network A Network C
Network B

⚫ Networks police the incoming traffic flow


⚫ Traffic shaping is used to ensure that a packet stream conforms
to specific parameters
⚫ Networks can shape their traffic prior to passing it to another
network

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Policing
⚫ Network monitors traffic flows continuously to ensure they meet their
traffic contract

⚫ When a packet violates the contract, network can discard or tag the
packet giving it lower priority

⚫ If congestion occurs, tagged packets are discarded first

⚫ Leaky Bucket Algorithm is the most commonly used policing mechanism

⚫ Bucket has specified leak rate for average contracted rate

⚫ Bucket has specified depth to accommodate variations in arrival rate

⚫ Arriving packet is conforming if it does not result in overflow

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Leaky Bucket algorithm can be used to police arrival rate of
a packet stream
water poured
irregularly Leak rate corresponds to long-
term rate

leaky bucket Bucket depth corresponds to


maximum allowable burst arrival

1 packet per unit time


water drains at Assume constant-length packet
a constant rate as in ATM

Let X = bucket content at last conforming packet arrival


Let ta – last conforming packet arrival time = depletion in bucket

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Leaky Bucket Algorithm Module 3 - The Network Layer
Arrival of a packet at time ta

Depletion rate:
X’ = X - (ta - LCT) 1 packet per unit time

Interarrival time L+I = Bucket Depth


Current bucket
content Yes I = increment per arrival,
X’ < 0?
nominal interarrival time

Non-empty No X’ = 0

Nonconforming Yes empty


X’ > L?
packet

arriving packet
No
would cause
overflow X = X’ + I X = value of the leaky bucket counter
LCT = ta X’ = auxiliary variable
conforming packet LCT = last conformance time

conforming packet
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Leaky Bucket Example
I=4 L=6 Nonconforming
Packet
arrival

Time

L+I

Bucket
content

* * * * * * * * * Time

Non-conforming packets not allowed into bucket & hence not


included in calculations
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Policing Parameters
T = 1 / peak rate
MBS = maximum burst size
I = nominal interarrival time = 1 / sustainable rate

 L 
MBS = 1 +  
I −T 

MBS

Time
T L I

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

Packet Scheduling

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Consider a packet-by-packet fair queueing system with three logical queues and with
service rate of one unit/second. Show the sequence of transmissions for this system for
the following packet arrival pattern. Queue 1: arrival at time t = 0, length 2; arrival at t
= 4, length 1. Queue 2: arrival at time t = 1, length 3; arrival at t = 2, length 1. Queue
3: arrival at time t = 3, length 5.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Consider a packet-by-packet fair queueing system with three logical queues and with
service rate of one unit/second. Show the sequence of transmissions for this system for
the following packet arrival pattern. Queue 1 with weight 2: arrival at time t = 0,
length 2; arrival at t = 4, length 1. Queue 2 with weight 3: arrival at time t = 1,length 3;
arrival at t = 2, length 1. Queue 3 with weight5: arrival at time t = 3, length 5.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

⚫ Congestion control
⚫ feedback information to regulate flow from sources into
network
⚫ Based on buffer content, link utilization, etc.

⚫ Examples: TCP at transport layer; congestion control at


ATM level
⚫ End-to-end vs. Hop-by-hop
⚫ Delay in effecting control

⚫ Implicit vs. Explicit Feedback


⚫ Source deduces congestion from observed behavior

⚫ Routers/switches generate messages alerting to congestion

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

End-to-End vs. Hop-by-Hop Congestion Control

Source Packet flow Destination

(a)

Source Destination

(b)

Feedback information

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Traffic Engineering

⚫ Management exerted at flow aggregate level


⚫ Distribution of flows in network to achieve efficient utilization
of resources (bandwidth)
⚫ Shortest path algorithm to route a given flow not enough
⚫ Does not take into account requirements of a flow, e.g.
bandwidth requirement
⚫ Does not take account interplay between different flows

⚫ Must take into account aggregate demand from all flows

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Integrated Services
QoS: Service models [rfc2211, rfc 2212]
Guaranteed service: Controlled load service:
▪ worst case traffic arrival: leaky- ▪ "a quality of service closely
bucket-policed source . approximating the QoS that same
flow would receive from an
unloaded network element."

arriving token rate, r


traffic

bucket size, b
per-flow
rate, R
WFQ

D = b/R
max
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
RSVP: Resource Reservation Protocol [RFC 2205]
RSVP: operation
❖ senders, receiver join a multicast group
▪ done outside of RSVP
▪ senders need not join group
❖ sender-to-network signaling
▪ path message: make sender presence known to routers
▪ path teardown: delete sender’s path state from routers
❖ receiver-to-network signaling
▪ reservation message: reserve resources from sender(s) to receiver
▪ reservation teardown: remove receiver reservations
❖ network-to-end-system signaling
▪ path error
▪ reservation error

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Differentiated Services
▪ Differentiated services can be offered by a set of routers forming an
administrative domain (e.g., an ISP or a telco).
▪ The administration defines a set of service classes with corresponding
forwarding rules. If a customer subscribes to differentiated services,
customer packets entering the domain are marked with the class to which
they belong.
▪ This information is carried in the Differentiated services field of IPv4 and
IPv6 packets. The classes are defined as per hop behaviors because they
correspond to the treatment the packet will receive at each router, not a
guarantee across the network.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Differentiated Services
▪ A simpler approach to quality of service can be largely implemented locally in

each router without advance setup and without having the whole path
involved.
▪ This approach is known as class-based (as opposed to flow-based) quality
of service. IETF has standardized an architecture for it, called
differentiated services, which is described in RFCs 2474, 2475, and
numerous others.

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer

ADD ON SLIDES

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Counting to Infinity Problem
(a) 1 2 3 4
1 1 1 Nodes believe best
path is through each
(b) 1 2 3 X 4 other
1 1
(Destination is node 4)
Update Node 1 Node 2 Node 3

Before break (2,3) (3,2) (4, 1)


After break (2,3) (3,2) (2,3)
1 (2,3) (3,4) (2,3)
2 (2,5) (3,4) (2,5)
3 (2,5) (3,6) (2,5)
4 (2,7) (3,6) (2,7)
5 (2,7) (3,8) (2,7)
… … … …
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Problem: Bad News Travels Slowly
Remedies
⚫ Split Horizon
⚫ Do not report route to a destination to the neighbor
from which route was learned
⚫ Poisoned Reverse
⚫ Report route to a destination to the neighbor from
which route was learned, but with infinite distance
⚫ Breaks erroneous direct loops immediately
⚫ Does not work on some indirect loops

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Split Horizon with Poison Reverse
(a) 1 2 3 4
1 1 1 Nodes believe
(b)
best path is
1 2 3 X 4
1 1 through each other

Update Node 1 Node 2 Node 3


Before break (2, 3) (3, 2) (4, 1)
After break (2, 3) (3, 2) (-1, ) Node 2 advertizes its route to 4 to
node 3 as having distance infinity;
node 3 finds there is no route to 4

1 (2, 3) (-1, ) (-1, ) Node 1 advertizes its route to 4 to


node 2 as having distance infinity;
node 2 finds there is no route to 4

2 (-1, ) (-1, ) (-1, ) Node 1 finds there is no route to 4

3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
THE END

3/2/2024 ELAIYARAJA P

You might also like