Professional Documents
Culture Documents
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
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)
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:
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
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
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
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
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
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
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Network Layer Design Issues
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
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
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
2 Node
5
(switch or router)
⚫ 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
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
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
⚫ Forwarding
⚫ Look up routing table & forward packet from input to output
port
⚫ carried out by IP layer
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
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Routing Algorithm Requirements
⚫ Responsiveness to changes
⚫ Topology or bandwidth changes, congestion
⚫ 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
⚫ Distributed Routing
⚫ Routes determined by routers using distributed
algorithm
⚫ State information exchanged by routers
⚫ Better scalability
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
Shortest Paths & Routing
⚫ Possible metrics
⚫ 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
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
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
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
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
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
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
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
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
2
2 5
4
4 2
2 5 2
4
46 2
79 2 7
3
1 1
5 2
5 0
4 Dest
3 1 3 6
2
2 5
4
6 2
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
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
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
⚫ Deflection Routing
⚫ Fixed, preset routing procedure
⚫ No route synthesis
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Flooding
Approach
⚫ Send packet on all ports except one where it arrived
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
1 3
6
2
5
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
1 3
6
2
5
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
1 3
6
2
5
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
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
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Example: Node (0,2)→(1,0)
busy
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
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
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
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
congestion:
❖ informally: “too many sources sending too much
data too fast for network to handle”
❖ different from flow control!
❖ manifestations:
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Approaches towards congestion control
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Approaches towards congestion control
Network-assisted congestion control:
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
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
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
1 2 3 4
Network A Network C
Network B
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
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
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
Non-empty No X’ = 0
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
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.
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
(a)
Source Destination
(b)
Feedback information
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
Traffic Engineering
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."
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
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
3/2/2024 ELAIYARAJA P
21CS52 - COMPUTER NETWORKS
Module 3 - The Network Layer
THE END
3/2/2024 ELAIYARAJA P