0% found this document useful (0 votes)
67 views148 pages

CN Module 3 Network Layer 2024

Uploaded by

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

CN Module 3 Network Layer 2024

Uploaded by

skjskjskj333
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 148

RNSIT – Depts.

of CSE/ISE/AI & ML
The Network Layer
Module 3
NETWORK LAYER DESIGN ISSUES, 9.Routing for Mobile Hosts

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching, 10.Routing in Ad Hoc Networks,
2.Services Provided to the Transport Layer, CONGESTION CONTROL ALGORITHMS
3.Implementation of Connectionless 1.Approaches to Congestion Control,
Service
2.Traffic-Aware Routing,
4.Implementation of Connection-Oriented
Service, 3.Admission Control,
5.Comparison of Virtual-Circuit and 4.Traffic Throttling,
Datagram Networks, 5.Load Shedding,
ROUTING ALGORITHMS QUALITY OF SERVICE
1. The Optimality Principle, 1.Application Requirements,
2. Shortest Path Algorithm, Flooding, 2.Traffic Shaping,
3. Distance Vector Routing 3.Packet Scheduling,
4. Link State Routing, 4.Admission Control,
5. Hierarchical Routing, 5.Integrated Services,
6. Broadcast Routing 6.Differentiated Services,
7. Multicast Routing,
8. Anycast Routing,
Purpose of Network Layer:

RNSIT – Depts. of CSE/ISE/AI & ML


•Concerned with transporting packets from source to
destination.
•Involves multiple hops through intermediate routers.
Relation with Data Link Layer:
•Data Link Layer focuses on moving frames within a local
network.
•Network Layer deals with end-to-end transmission,
encompassing larger distances.
Responsibilities of the Network Layer:
•Understands the network's topology, including routers and
links.
•Selects appropriate paths through the network.
•Manages routing in large networks.
Purpose of Network Layer:

RNSIT – Depts. of CSE/ISE/AI & ML


Challenges and Considerations:
•Must prevent overloading of communication lines and
routers.
•Balances the load to keep some communication lines
and routers from being idle.
•Addresses issues when the source and destination are
in different networks.
Internet and IP:
•Primary illustration using the Internet.
•Utilizes the Internet Protocol (IP) as the network
layer protocol.
I. NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching
•Network layer protocols operate in the context of
store-and-forward packet switching.
Network Components:
1.ISP's equipment
2.Routers
3.Connected by transmission lines.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching

•Host H1 is directly connected to ISP's router A (e.g., a home computer


plugged into a DSL modem).
•Host H2 is on a LAN with customer-owned router F, having a leased line to
the ISP's equipment.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching

•Host H1 is directly connected to ISP's router A (e.g., a home computer


plugged into a DSL modem).
•Host H2 is on a LAN with customer-owned router F, having a leased line to
the ISP's equipment.

•These routers run the same algorithms as the ISP's routers.


NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching
Packet Transmission Process:

•A host with a packet transmits it to the nearest


router, either within its LAN or over a point-to-point
link to the ISP.

•The packet is stored at the router until fully received,


and the link has completed processing (e.g., verifying the
checksum).
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Store-and-Forward Packet Switching

Forwarding Mechanism:
•Once the packet is fully received and processed, it is
forwarded to the next router along the path.
•This forwarding process continues until the packet
reaches the destination host.
Store-and-Forward Packet Switching:
•Describes the mechanism where packets are stored at
each router before being forwarded.
•Emphasizes the completion of packet reception and
processing before forwarding to the next router.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


2.Services Provided to the Transport Layer

1.Independence from router technology.


2.Transport layer shielded from router details (number,
type, and topology).
3.Uniform numbering plan for network addresses
across LANs and WANs.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


2.Services Provided to the Transport Layer
1.Logical Addressing: The Network Layer provides logical
addressing, such as IP (Internet Protocol) addresses. These
addresses are used by the Transport Layer to identify the
source and destination devices in a network.
2.The Transport Layer relies on the Network Layer to
ensure that packets are delivered to the correct
destination.
3.Packetizing and Fragmentation: The Network Layer takes
data from the Transport Layer and breaks it into smaller
packets for transmission over the network.
4.Flow Control: The Transport Layer uses feedback from the
Network Layer to adjust the rate of data flow based on
network conditions, avoiding congestion and ensuring
efficient data transfer.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


Two types of service provided by the network
layer:
1.Connectionless
2.Connection-oriented.

1.Connectionless - Datagram Networks


• Packets injected into the network individually.
• Routed independently without advance setup.
• No need for prior path establishment.
• Each packet treated independently.
• Source router injects datagrams into the network.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Connectionless
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


1.Consider two hosts, H1 and H2.

2.Process P1 on H1 has a long message for Process P2 on


H2.

3.P1 hands the message to the transport layer with delivery


instructions for P2 on H2.

4.Datagram reaches the destination host, H2.

5.Transport layer at H2 extracts the message.

6.Delivers the message to Process P2.


RNSIT – Depts. of CSE/ISE/AI & ML
NETWORK LAYER DESIGN ISSUES
Advantages of Datagram Networks:

1.Flexibility: No need for prior path setup.

2.Scalability: Each packet independently routed.

3.Simple and efficient for communication.


NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


2.Connection-oriented
•The implementation of a connection-oriented service
requires a virtual-circuit network.
•The objective is to establish a connection between source
and destination machines, avoiding the need to select a new
route for every packet.
Virtual Circuits :
•When a connection is established, a predefined route is
chosen and stored in routers' tables.
•This route is used for all traffic over the connection.
•Upon connection release, the virtual circuit is terminated.
•Each packet carries an identifier indicating its association
with a specific virtual circuit.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


2.Connection-oriented
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


2.Connection-oriented
•Host H1 establishes connection 1 with host H2,
creating the first entry in routing tables.
•Consideration of a scenario where H3 wants to
establish a connection to H2:
• H3 chooses connection identifier 1 and requests the
network to establish a virtual circuit.
• Conflict arises as router C cannot easily distinguish
connection 1 packets from H1 and H3.
•To resolve the conflict, router A assigns a different
connection identifier to outgoing traffic for the second
connection.
•This conflict resolution mechanism prevents confusion
and ensures the proper routing of packets.
NETWORK LAYER DESIGN ISSUES

RNSIT – Depts. of CSE/ISE/AI & ML


Label Switching Process:
•In certain contexts, the process of associating labels
with data packets is referred to as label switching.
•An instance of a connection-oriented network service
is MPLS (Multi Protocol Label Switching).
•MPLS is frequently utilized within Internet Service
Provider (ISP) networks.
•IP packets are encapsulated with an MPLS header
containing a 20-bit connection identifier or label.
Comparison of Virtual-Circuit and Datagram Networks

RNSIT – Depts. of CSE/ISE/AI & ML


II. ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


•Routing packets from the source machine to the
destination machine.
•In most networks, multiple hops are required for
packet journeys.
•Routing algorithms and the associated data
structures are crucial in network layer design.
•Deciding the output line for transmitting incoming
packets.
•Goal - minimizing mean packet delay and maximizing
total network throughput.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Two Processes in a Router:
1.Forwarding: Handling each arriving packet, looking up
the outgoing line in routing tables.
2.Routing: Responsible for filling in and updating the
routing tables.
Routing Algorithm Classification:
1.Non-adaptive
• Routes computed in advance, offline, and downloaded to
routers during network boot.
• Often referred to as static routing.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


1.Adaptive
• Change routing decisions to reflect changes in topology and
sometimes traffic.
• Dynamic routing algorithms vary in information sources
(local, adjacent routers, or all routers), when routes change
(topology changes or periodically), and optimization metric
(distance, number of hops, or estimated transit time).
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Optimality Principle:
1.If router J is on the optimal path from router I to
router K, then the optimal path from J to K also
follows the same route.
2.The set of optimal routes from all sources to a given
destination forms a tree rooted at the destination -
Sink Tree.
3.If all possible paths are allowed, the tree becomes a
Directed Acyclic Graph (DAG), which has no loops.
4.It ensures that each packet will be delivered within a
finite and bounded number of hops.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Shortest Path Algorithm:
1.Nodes represent routers, edges represent
communication lines or links.
2.Algorithm builds a graph of the network and finds the
shortest path between given pairs of routers.
3.Different metrics for path length, such as the number
of hops or geographic distance in kilometers.
4.Other metrics include mean delay, bandwidth, average
traffic, communication cost, and measured delay.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
1.Each node labeled with its distance from the source along
the best-known path.
2.Labels must be non-negative, typically based on real
quantities like bandwidth and delay.
3.Initially, all nodes labeled with infinity as no paths are
known.
4.Start with the source node, mark it as permanent, and
examine adjacent nodes.
5.Relabel adjacent nodes with distances, marking the node
from which the probe was made.
6.Make the node with the smallest tentative label
permanent, becoming the new working node.
7.Repeat the process until all nodes are permanent.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
1.Fig. 5-7(a) shows a weighted, undirected graph with
labels representing distance.
2.Finding the shortest path from A to D involves
marking nodes permanent and relabeling.
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
1.Finding the shortest path from A to D involves
marking nodes permanent and relabeling.
RNSIT – Depts. of CSE/ISE/AI & ML
RNSIT – Depts. of CSE/ISE/AI & ML
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
Source Node is 1

2
1 3
1
5 2

3 4 6
1 3

2
2 5
4
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
Source Node is 1

Iterations N
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
RNSIT – Depts. of CSE/ISE/AI & ML
6
1
3

5
2

4
2

1
1

2
3
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
Source Node is 1 and Resulted Graph / Tree

2
1 3
1
2

3 4 6

2
2 5
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
Source Node is 1

Iterations N
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
ROUTING ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Dijkstra's Algorithm:
Source Node is 1

Destination Next Node Cost


2 2 3
3 3 2
4 3 4
5 3 5
6 3 3
RNSIT – Depts. of CSE/ISE/AI & ML
Flooding

RNSIT – Depts. of CSE/ISE/AI & ML


• Each router makes decisions based on local knowledge rather than
the complete network picture.
• Flooding is a simple local technique implemented in routing
algorithms.
• Every incoming packet is sent out on every outgoing line except the
one it arrived on.
• Generates vast numbers of duplicate packets.

Hop Count Dampening.


• A hop counter in the packet header is decremented at each hop.
• Packet discarded when the counter reaches zero.
• Ideally initialized to the length of the path from source to destination.
Flooding

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Tracking by Routers:
• Routers keep track of flooded packets to avoid duplication.
• Source router adds a sequence number to each packet.
• Routers maintain a list per source router indicating seen sequence
numbers.
Wireless Networks and Broadcasting:
• In wireless networks, flooding resembles broadcasting.
• All messages transmitted by a station can be received by others
within its radio range.
Distance Vector Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Distance Vector Routing is a type of routing algorithm used in
computer networks to dynamically update and maintain routing
information.
• Each router maintains a table (vector) of distances to all other routers
in the network, indicating the cost or distance to reach each
destination.
• Initially, routers know the distances to their directly connected
neighbors. The rest of the entries are set to an initial value (often
infinity) since the distances are unknown.
• Routers periodically exchange their distance vectors with neighboring
routers. This information includes the cost to reach each destination.
• Upon receiving a distance vector from a neighbor, a router updates its
own distance vector based on the received information.
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• The update is typically done using the Bellman-Ford equation, where
the new distance to a destination is calculated as the sum of the cost
to the neighbor and the neighbor's distance to the destination.

• The process of exchanging and updating continues until the routing


tables converge, meaning that no further changes are needed.
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


To formalize:
First fix the destination node.
• 𝐷𝑗= 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑖𝑜𝑛 𝑐𝑜𝑠𝑡 𝑓𝑟𝑜𝑚 𝑛𝑜𝑑𝑒 𝑗 𝑡𝑜 𝑑𝑒𝑠𝑡𝑖𝑛𝑎𝑡𝑖𝑜𝑛.
• 𝐶𝑖,𝑗= 𝑙𝑖𝑛𝑘 𝑐𝑜𝑠𝑡 𝑓𝑟𝑜𝑚 𝑛𝑜𝑑𝑒 𝑖 𝑡𝑜 𝑛𝑜𝑑𝑒 𝑗.
• 𝐶𝑖,𝑖= 𝑙𝑖𝑛𝑘 𝑐𝑜𝑠𝑡 𝑓𝑟𝑜𝑚 𝑛𝑜𝑑𝑒 𝑖 𝑡𝑜 𝑖𝑡𝑠𝑒𝑙𝑓 𝑖𝑠 0.
• 𝐶𝑖,𝑘= 𝑙𝑖𝑛𝑘 𝑐𝑜𝑠𝑡 𝑓𝑟𝑜𝑚 𝑛𝑜𝑑𝑒 𝑖 𝑡𝑜 𝑛𝑜𝑑𝑒 𝑘 𝑖𝑠 ∞
(𝑖. 𝑒 𝑛𝑜𝑑𝑒 𝑖𝑠 𝑛𝑜𝑡 𝑑𝑖𝑟𝑒𝑐𝑡𝑙𝑦 𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑒𝑑)
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Algorithm:

𝑆𝑡𝑒𝑝 1: 𝐼𝑛𝑖𝑡𝑖𝑎𝑙𝑖𝑧𝑎𝑡𝑖𝑜𝑛.
• 𝐷𝑖= ∞ where ∀ i ≠ d;

𝑆𝑡𝑒𝑝 2: 𝑈𝑝𝑑𝑎𝑡𝑖𝑛𝑔.
Find the minimum distance to destination from its neighbors.
• 𝐷𝑖 = min{𝐶𝑖,𝑗 + 𝐷𝑗 } where ∀ i ≠ d;
Repeat Step 2 until converge.
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Problem: node 6 is destination calculate minimum distance from all
nodes.

2
1 3
1
5 2

3 4 6
1 3

4 2
2 5
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Problem: node 6 is destination calculate minimum distance from all
nodes.

2
1 3
1
2

4 6
1
2
2 5
RNSIT – Depts. of CSE/ISE/AI & ML
Bellman-Ford Routing
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Iterations node1 node2 node3 node4 node5
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
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Iterations node1 node2 node3 node4 node5
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
Break
1 3,3 4,4 4,5/1,5 3,3 6,2
2 3,7/2,7 4,4 4,5 2,5/5,5 6,2
3 3,7 4,6 4,7 2,5 6,2
4 3,9 4,6 4,7 2,5 6,2
RNSIT – Depts. of CSE/ISE/AI & ML
Bellman-Ford Routing
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Count-to-Infinity Problem:
• Distance Vector Routing is susceptible to the count-to-infinity
problem, where inaccurate information takes time to propagate
through the network, potentially causing temporary routing loops.
• Split Horizon:
• To mitigate the count-to-infinity problem, the "split horizon" technique is
often employed, where a router does not advertise routes back to the
neighbor from which it learned them.
• Poison Reverse:
• Another technique to prevent routing loops is "poison reverse," where a
router advertises an infinite distance for a route it learned from a
neighbor.
Bellman-Ford Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Count-to-Infinity Problem:
• Distance Vector Routing is susceptible to
the count-to-infinity problem, where
inaccurate information takes time to
propagate through the network,
potentially causing temporary routing
loops.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Transition from Distance Vector to Link State Routing: Distance
Vector Routing used until 1979.
• Replaced by Link State Routing due to issues with convergence time
and the count-to-infinity problem.
• Link State Routing, is widely used in large networks and the Internet.
• The goal is to distribute the complete network topology to every
router & used Dijkstra's algorithm to find the shortest path to all
other routers at each node.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Five Steps of Link State Routing:
1.Discover Neighbors and Learn Addresses:
Each router identifies its neighbors and learns their network addresses.
2.Set Distance or Cost Metric:
Assign a distance or cost metric to each neighboring router.
3.Construct Packet with Learned Information:
Create a packet containing the acquired information about neighbors and their
metrics.
4.Exchange Packets with Other Routers:
Transmit the packet to all other routers and receive packets from them.
5.Compute Shortest Path:
Use Dijkstra’s algorithm to compute the shortest path to every other router.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Learning about the Neighbors:
1. When a router boots, its initial task is to identify its neighbors.
2. Achieved by sending a specialized HELLO packet on each point-
to-point line.
3. The router expects a reply from the other end of the point-to-
point line, including the name of the neighboring router.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Broadcast links, like switches, rings, or classic Ethernet,
pose a challenge.
• Fig. 5-11(a) illustrates three routers (A, C, F) connected
to a broadcast LAN, with additional connections to
other routers.
• Rather than modeling each connection as a point-to-
point link, a more efficient approach is to treat the
broadcast LAN as a single node (Fig. 5-11(b)).
• Introduces an artificial node (N) to which A, C, and F
connect.
• Designates one router on the LAN to play the role of N
in the routing protocol.
• Treating the broadcast LAN as a single node reduces the
size of the topology representation.
• Avoids unnecessary complexity and wasteful messages
associated with modeling each connection separately.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Setting Link Costs:
1. Link state routing algorithm necessitates assigning a distance or cost
metric to each link for efficient path finding.
2. Link costs can be set automatically or manually configured by the
network operator.
3. A prevalent method is to make the cost inversely proportional to
the link bandwidth.
4. For geographically dispersed networks, link delay may be factored
into the cost calculation.
5. Paths over shorter links are prioritized.
6. To determine link delay, a special ECHO packet is sent over the line
(Measuring the Round Trip Time).
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Setting Link Costs:
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Building Link State Packets:
1. After collecting necessary information for exchange, routers
proceed to build a packet containing all relevant data.
2. The packet structure includes:
1. Sender's identity.
2. Sequence number and age (to be explained later).
3. List of neighbors.
4. Cost to each neighbor.
3. The complexity lies in deciding when to construct these packets:
1. Periodic construction at regular intervals.
2. Building when a significant event occurs, such as a line or neighbor going
down, coming back up, or undergoing substantial property changes.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Distributing the Link State Packets:
• The most challenging aspect of the algorithm is the effective
distribution of link state packets, ensuring all routers receive them
quickly and reliably.
• Inconsistent versions of the topology among routers can lead to
problems like loops, unreachable machines, etc.
• Use flooding to distribute link state packets to all routers.
• Each packet includes a sequence number, incremented for each new
packet.
• Routers maintain a list of (source router, sequence) pairs.
• New packets are forwarded if they are new; duplicates are discarded.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Distributing the Link State Packets:
• Age Field Addition: Include an age field after the sequence number,
decremented once per second. When age hits zero (Time to live (TTL),
discard information from that router.
At Router B for Link State Packets:
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Distributing the Link State Packets:
• Data Structure at Router B for Link State Packets:
Arrival of Packets:
• Packet from A: Directly arrives, to be sent to C and F, acknowledged
to A.
• Packet from F:To be sent to A and C, acknowledged to F.
• Packet from E: Arrives twice (via EAB and EFB), to be sent only to C,
acknowledged to both A and F.
Link State Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Computing the New Routes :
• After accumulating a full set of link state packets, a router can
construct the entire network graph.
• Every link is represented twice, once for each direction. Different
directions may have different costs.
• Local execution of Dijkstra’s algorithm is performed to construct the
shortest paths to all possible destinations.
• Taking into account the different representations of links for each
direction, the router computes the best paths for both sending and
receiving data.
• As the network topology changes, the router can dynamically adapt
its computed routes based on the updated link state information.
Hierarchical Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• As networks grow, router routing tables expand, consuming more
memory, CPU time, and bandwidth for status reports.
• In large networks, it becomes impractical for every router to have an
entry for every other router.
• Hierarchical routing becomes necessary to manage scalability issues,
similar to the structure in the telephone network.
Hierarchical Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Division into Regions:
• Routers are divided into regions in hierarchical routing.
• Each router within a region knows how to route packets to destinations
within its own region.
• No knowledge of the internal structure of other regions is required.
• Interconnected Networks:
• When different networks are interconnected, each network is treated as a
separate region.
• This approach frees routers in one network from the burden of knowing the
topological structure of other networks.
• Multilevel Hierarchy:
• For extremely large networks, a two-level hierarchy may be insufficient.
• Grouping regions into clusters, clusters into zones, and so on, creates a
multilevel hierarchy.
RNSIT – Depts. of CSE/ISE/AI & ML
Hierarchical Routing
Hierarchical Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Router 1A's full routing table has 17 entries (Fig. 5-14(b)).
• Hierarchical routing reduces the table to 7 entries by condensing all
remote regions into a single router (Fig. 5-14(c)).
• Hierarchical routing reduces table size as the ratio of regions to
routers per region grows.
• Best route from 1A to 5C is via region 2.
• Hierarchical routing directs all traffic to region 5 via region 3,
optimizing for most destinations in region 5.
• The question of how many levels the hierarchy should have depends
on network size.
• Example: For a network with 720 routers, the optimal number of
levels is ln N (natural logarithm of N).
Broadcast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• In some applications, hosts need to send messages to many or all
other hosts simultaneously.
• Examples weather reports, stock market updates, or live radio programs.
Broadcasting Method:
1. Simple Broadcasting Method
2. Multi-destination Routing
3. Flooding Technique
4. Reverse Path Forwarding
Broadcast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Simple Broadcasting Method:
• Source sends a distinct packet to each destination.
• Wasteful of bandwidth and slow.
• Requires the source to have a complete list of all destinations.
• Multi-destination Routing:
• Each packet contains a list of destinations or a bit map indicating desired
destinations.
• Router checks destinations and generates a new copy of the packet for each
output line needed.
• Efficient use of network bandwidth.
• Still requires the source to know all destinations.
Broadcast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Flooding Technique:
• Better broadcast routing technique.
• Implemented with a sequence number per source.
• Uses links efficiently with a simple decision rule at routers.
• Serious consideration for broadcasting.
• Reverse Path Forwarding:
• Elegant and simple technique.
• When a broadcast packet arrives at a router:
1. Router checks if the packet arrived on the link normally used for sending packets
toward the source (This is often the shortest or preferred route).
2. If yes, router forwards copies onto all links except the one it arrived on.
3. If no, the packet is discarded as a likely duplicate.
• Efficient use of network resources once shortest path routes for regular
packets are computed.
Reverse Path Forwarding

RNSIT – Depts. of CSE/ISE/AI & ML


1. Packet Arrival:
• When a broadcast packet arrives at a router, the router needs to examine the
incoming interface of the packet.
2. Check Preferred Outgoing Interface:
• Determine the outgoing interface that is normally used for sending packets
toward the source of the broadcast.This is often the shortest or preferred route.
3. RPF Check:
• Compare the incoming interface of the broadcast packet with the preferred
outgoing interface.
• If the incoming interface matches the preferred outgoing interface:
1. This suggests that the broadcast packet likely followed the best route from the source.
2. Proceed to the next step for forwarding copies.

4. Forwarding Copies:
• Forward copies of the broadcast packet onto all interfaces except the one it
arrived on.
• This ensures the packet reaches all possible destinations in the network.

5. Duplicate Check:
• If the incoming interface does not match the preferred outgoing interface:
1. Discard the packet as a likely duplicate.
2. This is based on the assumption that the packet arriving on a different interface might
be a duplicate or has taken a less optimal route.
Reverse Path Forwarding

RNSIT – Depts. of CSE/ISE/AI & ML


• Network Configuration (Part a):
• A network is illustrated with routers labeled A, C, E, G, I,
K, M, and O.
• Links connect the routers, forming a network topology.
• Sink Tree for Router I (Part b):
• A sink tree is shown for Router I in the network.
• The sink tree represents the preferred path for
broadcasting from Router I to other routers in the
network.
Reverse Path Forwarding

RNSIT – Depts. of CSE/ISE/AI & ML


Reverse Path Forwarding Algorithm (Part c):
1. The reverse path forwarding algorithm is demonstrated step
by step.
2. On the first hop, Router I sends packets to routers F, H, J, and
N along the sink tree.
1. Packets arrive on the preferred path, indicated by circles around
the letters.
3. On the second hop, eight packets are generated by routers
that received packets on the first hop.
1. Five of these arrive along the preferred path.
4. On the third hop, six packets are generated, and three arrive
on the preferred path (at routers C, E, and K).
5. The process continues for five hops, and broadcasting
terminates after 24 packets.
6. Comparatively, following the sink tree exactly would have
taken four hops and 14 packets.
Broadcast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Flooding and reverse path forwarding offer better efficiency for
broadcasting compared to simple broadcasting or multi-destination
routing.
• Reverse path forwarding is particularly elegant and efficient in utilizing
network resources.
Broadcast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Spanning Tree Utilization:
• A spanning tree is a subset of the network that includes all routers but
contains no loops.
• Sink trees are considered spanning trees.
• If each router knows which of its lines belong to the spanning tree, it can
efficiently copy an incoming broadcast packet onto all spanning tree lines
except the one it arrived on.
• This method optimally utilizes bandwidth by generating the absolute
minimum number of packets necessary to broadcast the information.
Multicast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Multicasting and Multicast Routing:
• Some applications, like multiplayer games or live sports event
streaming, send packets to multiple receivers.
• Sending distinct packets to each receiver is expensive for large groups,
and broadcasting is wasteful if many recipients are not interested.
• Multicasting: Sending messages to well-defined groups that are
numerically large compared to individual machines but small
compared to the entire network.
• Multicast Routing: The routing algorithm used for multicasting
Protocol Independent Multicast (PIM)& Distance Vector
Multicast Routing Protocol (DVMRP).
• Group Management: All multicasting schemes require mechanisms
to create, destroy, and identify groups.
Multicast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Multicast Routing Schemes:
• The spanning tree depends on whether the group is dense (spread
over most of the network) or sparse (occupying only specific parts).
• Efficiently sending packets along spanning trees to deliver them to
group members while optimizing bandwidth usage.
• Pruning the Spanning Tree: To eliminate wasteful broadcast to
non-group members, prune the broadcast spanning tree by removing
links that do not lead to group members.
• Sparse Group Multicast Routing: Optimizing the spanning tree
becomes crucial to avoid unnecessary utilization of resources.
RNSIT – Depts. of CSE/ISE/AI & ML
Multicast Routing
Multicast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Network Configuration (Fig. 5-16a):
• Two multicast groups, Group 1 and Group 2, in the network.
• Routers are connected to hosts belonging to one or both groups, as indicated.
• Initial Spanning Tree (Fig. 5-16b):
• A spanning tree for the leftmost router is shown. Suitable for broadcast but not
optimal for multicast.
• Pruned Spanning Trees for Multicast (Fig. 5-16c and 5-16d):
• Group 1 (Fig. 5-16c):
• Links not leading to hosts in Group 1 are removed.
• Resulting multicast spanning tree is more efficient with 7 links instead of 10.
• Group 2 (Fig. 5-16d):
• Similar pruning for Group 2 results in an efficient multicast spanning tree with 5
links.
Multicast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


Pruning Strategies:
• Pruning depends on the routing protocol used and the available
information.
• For link state routing (e.g., MOSPF):
• Each router constructs its pruned spanning tree based on complete topology
knowledge, removing links not connecting group members.
• For Distance Vector Routing (e.g., DVMRP):
• Reverse path forwarding with PRUNE messages.
• Routers respond with PRUNE messages to stop multicast transmission to non-
interested routers, recursively pruning the spanning tree.
Internet Protocols:
• MOSPF (for link state routing) and PIM (Protocol Independent Multicast)
use variations of these strategies for multicast routing in the Internet.
Anycast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Unicast: Source sends to a single destination.
• Broadcast: Source sends to all destinations.
• Multicast: Source sends to a group of destinations.
• Anycast: Packet delivered to the nearest member of a group.
Anycast Usage:
• Anycast is used when the specific identity of the destination node is
not crucial, and any available node offering a particular service will
suffice.
• Commonly employed in services like DNS (Domain Name System) in
the Internet.
• Routing for Anycast: No need for new routing schemes; existing
distance vector and link state routing can produce anycast routes.
RNSIT – Depts. of CSE/ISE/AI & ML
Anycast Routing
Anycast Routing

RNSIT – Depts. of CSE/ISE/AI & ML


• Routing Scheme for Anycast (Fig. 5-18a):
• Members of group 1 have the same address '1.'
• Distance vector routing results in nodes sending to the nearest instance of
destination '1.'
• Routing protocol doesn't recognize multiple instances, treating them as the
same node.
• Topology Consideration (Fig. 5-18b):
• The routing protocol believes that all instances of node 1 are the same node,
as shown in the simplified topology.
• The procedure works because the protocol doesn't realize the existence of
multiple instances.
Routing for Mobile Hosts

RNSIT – Depts. of CSE/ISE/AI & ML


• Mobile hosts refer to devices used in truly mobile situations (e.g., in
moving cars) or nomadic situations (e.g., laptops used in various
locations).
• The term encompasses users who desire connectivity regardless of
their location.
Routing Challenge for Mobile Hosts:
1. Routing a packet to a mobile host requires the network to locate
the host's current position.
2. The challenge is to efficiently route packets to mobile hosts using
their fixed home addresses while accommodating their dynamic
movements.
Routing for Mobile Hosts

RNSIT – Depts. of CSE/ISE/AI & ML


Model of the Mobile Hosts:
1. Hosts have permanent home locations that do not change.
2. The routing goal is to send packets to mobile hosts using their fixed
home addresses and efficiently reach them wherever they are located.
3. The challenge lies in finding the mobile hosts as they move.
4. Mobile hosts inform a host at their home location about their current
location.
5. The host at the home location, acting as a representative for the mobile
host, is called the home agent.
6. Once the home agent knows the mobile host's current location, it can
forward packets to ensure delivery.
7. Packets destined for the mobile host are sent to the home agent, which
forwards them to the current location of the mobile host.
RNSIT – Depts. of CSE/ISE/AI & ML
Routing for Mobile Hosts
RNSIT – Depts. of CSE/ISE/AI & ML
Routing for Mobile Hosts
RNSIT – Depts. of CSE/ISE/AI & ML
Routing for Mobile Hosts
RNSIT – Depts. of CSE/ISE/AI & ML
Routing for Mobile Hosts
Routing for Mobile Hosts

RNSIT – Depts. of CSE/ISE/AI & ML


1.Mobile Host Registration:
1. Mobile host sends a registration message to the home agent (step 1).
2. Registration includes the care-of address, indicating the mobile host's current
location.
3. Dashed line indicates a control message, not a data message.
2.Data Packet Sent to Home Location:
1. Sender sends a data packet to the mobile host using its permanent address
(step 2).
2. Packet routed to the host's home location in New York.
Routing for Mobile Hosts

RNSIT – Depts. of CSE/ISE/AI & ML


1.Tunneling and Encapsulation:
1. Home agent intercepts the packet, encapsulates it with a new header, and sends it to
the care-of address (step 3).
2. Tunneling: Wrapping the packet in a new header to facilitate routing to the mobile
host's current location.
2.Packet Delivery to Mobile Host:
1. Encapsulated packet arrives at the care-of address.
2. Mobile host unwraps the packet and retrieves the original data from the sender
(step 4).
3. Mobile host sends a reply packet directly to the sender.
3.Triangle Routing:
1. Overall route may be circuitous if the remote location is far from the home
location.
2. Sender may learn the current care-of address during step 4.
3. Subsequent packets can be routed directly to the mobile host by tunneling them to
the care-of address (step 5).
Routing in Ad Hoc Networks

RNSIT – Depts. of CSE/ISE/AI & ML


• Ad Hoc Networks are decentralized wireless networks where devices
communicate directly with each other without the need for a centralized
infrastructure such as routers or access points.
• In these networks, devices collaborate to form a temporary and dynamic
communication network, allowing them to establish connections and share
information on-the-fly.
• Ad Hoc Networks can be categorized into various types based on their
application and structure, including Mobile Ad Hoc Networks (MANETs) and
Vehicular Ad Hoc Networks (VANETs).
• Examples include emergency workers at an earthquake site, military vehicles on a
battlefield, a fleet of ships at sea, or a group of people with laptops in an area
lacking 802.11.
Routing in Ad Hoc Networks

RNSIT – Depts. of CSE/ISE/AI & ML


AODV (Ad hoc On-demand Distance Vector):
• One popular routing algorithm for ad hoc networks is AODV (Ad hoc On-
demand Distance Vector).
• AODV is a variant of the distance vector algorithm adapted for the mobile
environment, where nodes often have limited bandwidth and battery lifetimes.
• The algorithm focuses on on-demand route discovery and maintenance, allowing
nodes to find routes as needed in response to communication requirements.
Routing in Ad Hoc Networks

RNSIT – Depts. of CSE/ISE/AI & ML


Route Discovery in AODV
Routing in Ad Hoc Networks

RNSIT – Depts. of CSE/ISE/AI & ML


Route Discovery in AODV
When a node, for example, node A, wants to send a packet to node I and
does not find an entry for I in its table, it initiates route discovery.
1. A ROUTE REQUEST packet is constructed and broadcasted using
flooding across the network.
2. The ROUTE REQUEST packet is transmitted from source node A to
neighboring nodes B and D.
3. Each receiving node rebroadcasts the request, extending the reach of
the broadcast to nodes F, G, C, H, E, and I.
4. Once the ROUTE REQUEST reaches the destination node I, a ROUTE REPLY
packet is unicast back to the sender along the reverse path followed by the
request.
Routing in Ad Hoc Networks

RNSIT – Depts. of CSE/ISE/AI & ML


Route Maintenance in AODV:
• Nodes in an ad hoc network can move or be turned off, leading to
spontaneous changes in the network topology.
1. Topology Changes: if node G is switched off in Fig. 5-20, node A may not
realize that the route it was using to reach I (ADGI) is no longer valid.
2. Hello Messages: Periodically, each node broadcasts a Hello message,
expecting responses from its neighbors.
3. Purging Invalid Routes: Each node keeps track of active neighbors for
each destination, recording those that have communicated in the last ΔT
seconds. When a neighbor becomes unreachable, the node checks its
routing table to identify routes via the now-unavailable neighbor.
4. Intermediate Node Handling: Intermediate nodes store routes with
higher sequence numbers or the fewest hops for the current sequence
number.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Congestion occurs when there are too many packets in a part of the
network, causing delays and packet loss, ultimately degrading
performance.
• Responsibility: Both the network and transport layers share the
responsibility for handling congestion.
• Collaboration: Effective congestion control involves collaboration
between the network and transport layers to reduce the load placed
on the network by the transport layer.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Onset of Congestion (Figure 5-21):
• Proportional Delivery: When the number of
packets sent into the network is well within
its capacity, the delivered packets are
proportional to the sent packets.
• Bursts and Loss: As the offered load
approaches the capacity, bursts of traffic may
occasionally fill up router buffers, resulting in
packet loss and reduced delivery.
• Congestion Collapse: Without proper
design, congestion collapse may occur,
leading to reducing performance as the
offered load exceeds the network capacity.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Congestion Collapse Factors:
• Delayed Packets: Packets may experience delays within the network,
making them no longer useful upon leaving, leading to congestion collapse.
• Retransmission Issues: Senders may retransmit delayed packets, causing
duplicate deliveries and wasting network capacity.
Goodput as a Metric:
• The y-axis in Figure 5-21 is represented as goodput, the rate at which useful
packets are delivered by the network.
Congestion on Low-Bandwidth Links:
• Low-bandwidth links or slow routers may experience congestion.
• Diverting traffic away from bottlenecks can alleviate the situation temporarily,
but eventually, the entire network may become congested.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Congestion Control vs. Flow Control:
• Congestion Control: Involves ensuring the network can handle the offered traffic
globally, considering all hosts and routers.
• Flow Control: Relates to specific sender-receiver pairs, ensuring a fast sender does
not overwhelm a slower receiver.
Example Differentiating Congestion and Flow Control:
• Network Scenario: A network with 100-Gbps links where a supercomputer is
sending data to a personal computer capable of handling only 1 Gbps.
• Congestion vs. Flow Control: No congestion in the network, but flow control is
necessary to regulate data flow between the fast sender and slow receiver.
Another Example Scenario:
• Network Scenario: A network with 1-Mbps lines and 1000 large computers
transferring files, half at 100 kbps and half at 1 Mbps.
• Issue: The total offered traffic exceeds what the network can handle, leading to
congestion.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Approaches to Congestion Control:
• Nature of Congestion: Congestion occurs when the temporary load
is greater than the resources in a part of the network can handle.
• As shown in Fig. 5-22, these solutions are usually applied on different
time scales to either prevent congestion or react to it once it has
occurred.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Approaches to Congestion Control:

Two Fundamental Solutions:


1. Increase Resources:
• Dynamically adding resources during serious congestion, such as activating spare
routers, enabling backup lines, or purchasing additional bandwidth.
• Regularly upgrading heavily utilized links and routers, known as provisioning,
driven by long-term traffic trends over months.
2. Decrease Load:
• Refusing new connections in a virtual-circuit network if they would cause
congestion (admission control).
• Providing feedback to sources of traffic flows responsible for congestion, either
requesting them to throttle traffic or slowing down the traffic itself.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Approaches to Congestion Control:

• Adapting routes based on changing traffic patterns during the day, optimizing
network capacity utilization.
• Identifying Onset of Congestion: Monitoring average load, queueing delay, or
packet loss to identify growing congestion.
• Feedback Loop for Congestion Control: Establishing a feedback loop between
routers and traffic sources.
• Load Shedding as a Last Resort: Load shedding involves a policy for selecting
which packets to discard, aiming to prioritize critical data and prevent network
degradation.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Challenges and Considerations:
1. Timely Feedback: Ensuring timely feedback to traffic sources is
crucial for effective congestion control.
2. Message Overhead: Avoiding the generation of excessive
messages by routers, especially during congestion, is a concern.
3. Policies for Discarding Packets: Implementing effective policies
for choosing which packets to discard during load shedding can
impact congestion control success.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Traffic-Aware Routing
Objective:Adapt routing schemes to changes in load, in addition to changes in topology.
Goal: Shift traffic away from hotspots to prevent congestion in the network.

Link Weight Considerations:


• Fixed Link Weights: Traditional routing schemes use fixed link weights that adapt to
changes in topology but not to changes in load.
• Variable Link Weights: The link weight is set as a function of the fixed link bandwidth,
propagation delay, and the variable measured load or average queuing delay.
Routing Calculation with Load:
• Least-Weight Paths: Paths with lower load, in addition to bandwidth and propagation
delay, are favored in the routing calculations.
• Avoiding Congestion: The objective is to route traffic away from heavily loaded paths
that might lead to congestion.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Admission Control
• Objective: Prevent congestion by allowing the setup of a new virtual circuit only
if the network can handle the added traffic without becoming congested.
• Failure Possibility: Attempts to set up a virtual circuit may fail if the network
cannot accommodate the additional traffic.
Traffic Characterization Techniques:
• Bursty Traffic: Traffic is often bursty, making it more challenging to handle. The
average rate alone is insufficient.
• Leaky Bucket or Token Bucket: Commonly used descriptor capturing burstiness,
with parameters defining average rate and instantaneous burst size.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Decision-Making for Admission Control:
• Network Decision: Using traffic descriptions, the network decides whether to
admit a new virtual circuit.
• Capacity Reservation: One approach is to reserve enough capacity along the
paths of each virtual circuit to prevent congestion, forming a service agreement
with guaranteed capacity.
• Estimation Challenge: Estimating how many circuits can be admitted without
congestion, considering shared physical links.
• Utilizing Past Behavior: Measurements of past behavior, capturing transmission
statistics, help estimate the number of circuits to admit, balancing performance
and risk.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Decision-Making for
Admission Control:
• Routing Around Hotspots: Combining
admission control with traffic-aware
routing involves considering routes
around traffic hotspots during the
setup procedure.
• Example Scenario (Figure 5-24): Hosts
seeking a connection between
congested routers can choose
alternate routes to avoid congestion.
• Research Insight: Shaikh et al. (1999)
propose a design for load-sensitive
routing, integrating admission control
and routing considerations to manage
network congestion.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky Bucket Algorithm:
• Step 1 − Let us imagine a bucket with
a small hole at the bottom where the
rate at which water is poured into the
bucket is not constant and can vary
but it leaks from the bucket at a
constant rate.
• Step 2 − So (up to water is present in
the bucket), the rate at which the
water leaks does not depend on the
rate at which the water is input to the
bucket.
• Step 3 − If the bucket is full, additional
water that enters into the bucket that
spills over the sides and is lost.
• Step 4 −Thus the same concept
applied to packets in the network.
Consider that data is coming from the
source at variable speeds.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky Bucket Algorithm:
• Step 1 − Let us imagine a bucket with
a small hole at the bottom where the
rate at which water is poured into the
bucket is not constant and can vary
but it leaks from the bucket at a
constant rate.
• Step 2 − So (up to water is present in
the bucket), the rate at which the
water leaks does not depend on the
rate at which the water is input to the
bucket.
• Step 3 − If the bucket is full, additional
water that enters into the bucket that
spills over the sides and is lost.
• Step 4 −Thus the same concept
applied to packets in the network.
Consider that data is coming from the
source at variable speeds.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky Bucket Algorithm:
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky Bucket Algorithm:
RNSIT – Depts. of CSE/ISE/AI & ML
Leaky Bucket Algorithm:
RNSIT – Depts. of CSE/ISE/AI & ML
RNSIT – Depts. of CSE/ISE/AI & ML
Leaky Bucket Algorithm:
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Traffic Throttling:
• Sender Adjustments: In computer networks, senders dynamically adjust their
transmissions to match the network's capacity, aiming to operate just before the
onset of congestion.
• Network Operation: The network's goal is to avoid congestion and, when
pending, instruct senders to throttle back their transmissions.
• Congestion Avoidance: The term "congestion avoidance" describes the
network's operating point just before congestion, contrasting with the situation
when the network becomes overly congested.
• Approaches to Throttling Traffic: Throttling traffic can be applied in both
datagram networks and virtual-circuit networks.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Traffic Throttling:
Two Key Problems to Solve:
1. Congestion Detection
2. Timely Feedback Delivery
Congestion Detection:
• Routers must identify when congestion is approaching, preferably before it
occurs.
• Monitoring possibilities include:
1. Utilization of output links.
2. Buffering of queued packets inside the router.
3. Counting packets lost due to insufficient buffering.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Congestion Detection:
Estimation Approach: Maintain an estimate of the queueing delay (d) using an
Exponentially Weighted Moving Average (EWMA) formula:
𝑑new = 𝛼𝑑old + (1 − 𝛼)𝑠
• 𝑑new is the new value.
• 𝑑old is the old or existing value.
• 𝛼 is a weight or coefficient (with 0≤α≤1). It determines the influence of the old
value versus the new value. If α is close to 1, more weight is given to the old
value; if α is close to 0, more weight is given to the new value.
• s is the new information or update being incorporated.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Traffic Throttling:
Two Key Problems to Solve:
1. Congestion Detection
2. Timely Feedback Delivery
Timely Feedback Delivery:
• Routers must deliver timely feedback to the senders causing congestion.
• Identifying Congestion: Routers need to identify appropriate senders contributing
to congestion.
• Careful Warning: Routers must warn senders without exacerbating congestion.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Choke Packets:
• Direct Congestion Notification: The primary method to inform a sender about
congestion is through choke packets, where a router selects a congested packet
and sends a choke packet back to the source host, specifying the destination
found in the original packet.
• Source Host Reaction to Choke Packet: Traffic Reduction Requirement: Upon
receiving the choke packet, the source host is obligated to reduce the traffic sent
to the specified destination, often by a predetermined percentage (e.g., 50%).
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Explicit Congestion Notification (ECN):
• Instead of generating additional packets to indicate congestion, an alternative
approach is the use of ECN.
• Where a router tags any forwarded packet by setting a bit in the packet's header
to signal congestion.
• When the recipient can detect the congestion indication and notify the sender
when sending a reply packet.
• This feedback enables the sender to adjust its transmission rate,.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Hop-by-Hop Backpressure:
• An alternative approach is hop-by-hop backpressure, where the choke packet
takes effect at every hop it passes through, providing immediate relief at the point
of congestion.
• Sequence Illustration: Fig. 5-26(b) shows the sequence where each hop (F, E, A)
immediately reacts to the choke packet, requiring each intermediate router to
reduce the flow to the next hop.
• Benefits: The hop-by-hop scheme prevents packet loss and efficiently addresses
congestion, as discussed in detail by Mishra et al. (1996).
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Random Early Detection (RED):
• The RED algorithm is employed to drop packets strategically before congestion
becomes severe, allowing time for the source to adjust.
• Routers maintain a running average of queue lengths, and when the average
exceeds a threshold, indicating congestion, a small fraction of packets is randomly
dropped as shown in figure.
• Random selection increases the likelihood that fast senders will experience
packet drops, prompting the sender to slow down.
• This implicit message delivery serves the same purpose as a choke packet,
without an explicit signal from the router.
CONGESTION CONTROL ALGORITHMS

RNSIT – Depts. of CSE/ISE/AI & ML


Random Early Detection (RED):

• RED routers offer improved


performance compared to
routers that only drop
packets when buffers are full.

• Tuning may be required, and


the ideal number of packets
to drop depends on the
number of senders needing
congestion notification.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


• Network techniques aim to reduce congestion and enhance performance, but
certain applications demand stronger performance guarantees.
• Multimedia applications require maximum throughput and minimum latency for
optimal functioning.
• Overprovisioning involves building a network with ample capacity to handle
anticipated traffic, ensuring minimal loss and low-latency packet delivery.
• While effective, overprovisioning is expensive, relying on significant financial
investment to meet performance demands.
• Quality of Service (QoS) mechanisms offer an alternative, allowing networks with
less capacity to meet application requirements efficiently and cost-effectively.
• These mechanisms ensure the network can uphold performance guarantees even
during traffic spikes, though some requests may need to be declined.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Four Key Issues in Ensuring Quality of Service:

1. Application Requirements: Understanding the specific needs of applications


within the network.
2. Traffic Regulation: Implementing measures to control and regulate incoming
network traffic.
3. Resource Reservation: Allocating and reserving resources at routers to
guarantee performance.
4. Network Acceptance of Traffic: Determining the network's capacity to safely
handle additional traffic.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


A.Application Requirements:
The applications have varying network requirements based on their characteristics
and functionalities.
1.Parameters Characterizing Flow Needs:
• Bandwidth: The amount of data that can be transmitted in a given time.
• Delay: The time it takes for packets to travel from the source to the
destination.
• Jitter: The variation in delay or packet arrival times.
• Loss: The percentage of packets that do not reach the destination.
2.QoS Requirements:
1. Different applications have different QoS requirements based on their
characteristics.
2. QoS is a measure of the quality of service that a flow requires, determined by
the combination of bandwidth, delay, jitter, and loss.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Application Requirements:
3. Application Specifics:
• File transfer applications (e.g., email and video) are not delay-sensitive.
• Interactive applications (e.g., Web surfing and remote login) are more delay-
sensitive.
• Real-time applications (e.g., telephony and videoconferencing) have strict delay
requirements.
4.Bandwidth Needs:
• Email, audio, and remote login require less bandwidth.
• File sharing and video require a significant amount of bandwidth.
5.Delay Sensitivity:
• File transfer applications are not sensitive to delays.
• Interactive applications are somewhat sensitive to delays.
• Real-time applications have strict delay requirements.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Application Requirements:
6. Jitter Sensitivity:
• Jitter is the variation in the delay of packet arrival times.
• Video and audio applications are extremely sensitive to jitter.
7. Network vs. Application Capabilities:
• Networks do not need to be lossless for reliable file transfer.
• Some applications can improve on the service provided by the network (e.g.,
retransmissions for packet loss).
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Application Requirements:
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


B.Traffic Shaping/Traffic Regulation :
1.Bursty Nature of Data Network Traffic:
• The data networks experience bursty traffic due to varying rates, user
interactions, and task-switching by computers.
• Bursty traffic can be challenging to handle, potentially leading to buffer
overflows and packet loss.
2.Traffic Shaping:
• Traffic shaping is a technique used to regulate the average rate and burstiness
of data flows entering the network.
• The objective is to allow applications to transmit a variety of traffic patterns
while providing a simple and useful way to describe these patterns to the
network.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


B.Traffic Shaping/Traffic Regulation :
3. User-Provider Agreement on Traffic Patterns:
• When setting up a flow, the user and the network provider agree on a specific traffic
pattern or shape for that flow.
• This agreement, referred to as a Service Level Agreement (SLA),
• An SLA may cover aggregate flows and extended periods (e.g., all traffic for a specific
customer).
• As long as the customer adheres to the agreed-upon contract, the provider promises
to deliver the packets in a timely fashion.
4.Traffic Policing:
• To enforce the SLA, the network provider needs to monitor traffic flows.
• Traffic policing involves examining packets to ensure they conform to the agreed-
upon traffic pattern.
• Excess packets beyond the agreed pattern may be dropped or marked with lower
priority.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky and Token Buckets:
Leaky Bucket Algorithm:
1. Conceptualized as a bucket with a small hole at the bottom.
2. Water (representing packets) is continuously added to the bucket.
3. The outflow rate is constant at R as long as there is water in the bucket.
4. Once the bucket reaches its capacity (B), any additional water spills over and
is lost.
5. Used to shape or police packets entering the network.
6. Each host is connected to the network through an interface containing a
leaky bucket.
7. If a packet arrives when the bucket is full, it either waits until enough water
leaks out to accommodate it or is discarded.
8. Useful for shaping traffic at the host level or policing at the network
interface.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky and Token Buckets:
Token Bucket Algorithm:
1. Conceptualized as a bucket being filled with tokens at a constant rate (R).
2. The bucket has a capacity of B tokens.
3. To send a packet, a fixed number of tokens (B) must be taken out of the
bucket.
4. If the bucket is empty, waiting is required until more tokens accumulate
before sending another packet.
5. Equivalent to the leaky bucket algorithm but with a different
conceptualization.
6. The tap (token generator) controls the rate at which tokens are added to the
bucket.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Leaky and Token Buckets:
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
• Packet scheduling involves allocating router resources among packets of a flow
and between competing flows.
• Ensures that sufficient resources are reserved along the route for packets to
follow a specific path, similar to a virtual circuit.
• Three types of resources that can be reserved for different flows are
1. Bandwidth
2. Buffer space
3. CPU cycles
• Bandwidth reservation prevents oversubscription of output lines.
• Buffer space absorbs small bursts of traffic, preventing packet loss.
• CPU cycles ensure timely processing of packets, particularly those requiring more
processing.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
Packet scheduling algorithms allocate bandwidth and other router resources by
determining which of the buffered packets to send on the output line next.
1. FIFO Scheduling Algorithm:

• FIFO (First-In First-Out) scheduling is a straightforward algorithm where packets


are sent in the order they arrived.
• Tail drop occurs when newly arriving packets are dropped if the queue is full.
• FIFO scheduling is simple but not well-suited for providing good QoS, especially
in the presence of multiple flows. Aggressive flows can impact the performance of
other flows, leading to reduced QoS.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
2. Fair Queueing Algorithm:

• Fair queueing algorithm, proposed by Nagle, uses separate queues for each flow.
• When the line becomes idle, the router scans the queues round-robin, allowing
each flow to send one packet in turn. Aims to provide fairness by ensuring that all
flows get to send packets at the same rate.
• The fair queueing algorithm treats all hosts equally, providing them with the same
priority. In practical scenarios, there is often a need to prioritize certain hosts,
such as video servers over file servers.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
2. Fair Queueing Algorithm:
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
Weighted Fair Queueing (WFQ):
• WFQ extends fair queueing by allowing hosts to have different weights, reflecting
their priority.
• Video servers, for example, may be assigned a higher weight, giving them more
bandwidth compared to other servers.
• The weight (W) of a flow is the number of bytes per round allocated to that flow.
• The finish time (Fᵢ) for a packet in a flow is computed using the formula:

𝐹𝑖​= 𝑚𝑎𝑥(𝐴𝑖​, 𝐹𝑖 − 1) + 𝑊/𝐿𝑖​​

• Where Ai is the arrival time, Fi−1 is the finish time of the previous packet, Li is the
length of packet i, and W is the weight of the flow.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Packet Scheduling:
Weighted Fair Queueing (WFQ):
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


• Integrated Services
• IETF focused on creating an architecture for streaming multimedia.
• Generic name for this work is integrated services, targeting unicast and
multicast applications.
• Unicast example: Single user streaming a video clip.
• Multicast example: Digital television stations broadcasting programs to
multiple receivers.
• Dynamic Group Membership:
• Many multicast applications involve dynamic group membership changes.
• For instance, people entering and leaving a video conference or switching
channels.
• Pre-reserving bandwidth in advance is impractical for dynamic group changes.
• Tracking entries and exits for each sender in a system with millions of
subscribers is not feasible.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


RSVP—The Resource reSerVation Protocol:
• Main part of the integrated services architecture visible to network users.
• Described in RFCs 2205–2210.
• Used for making reservations; other protocols handle data transmission.
• RSVP enables multiple senders to transmit to multiple receiver groups.
• Allows individual receivers to switch channels freely.
• Optimizes bandwidth use and eliminates congestion.
Multicast Routing with RSVP:
• RSVP in its simplest form uses multicast routing with spanning trees.
• Each group is assigned a group address, and senders use this address in their
packets.
• Standard multicast routing algorithm builds a spanning tree covering all group
members.
• The routing algorithm is not part of RSVP; it's a separate process.
• Extra information is periodically multicast to the group to instruct routers to
maintain specific data structures in their memories.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Network Configuration (Fig. 5-
34(a)): Hosts 1 and 2 act as multicast
senders. Hosts 3, 4, and 5 are multicast
receivers. While in this example senders
and receivers are disjoint, they may
overlap in general.

Multicast Trees (Fig. 5-34(b) and


Fig. 5-34(c)): Fig. 5-34(b) represents
the multicast tree for Host 1. Fig. 5-34(c)
represents the multicast tree for Host 2.
Trees illustrate the paths for multicast
data transmission from senders to
receivers.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Differentiated Services:
1. Flow-Based Quality of Service:
2. Class-Based Quality of Service (Differentiated Services):
Flow-Based Quality of Service:
• Potential for good quality of service for one or more flows by reserving
resources along the route.
• Requires advance setup for each flow, which doesn't scale well with
thousands or millions of flows.
• Maintains internal per-flow state in routers, making them susceptible to
crashes.
• Complex router-to-router exchanges are needed for setting up flows.
• Few deployments due to scalability and complexity issues.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Class-Based Quality of Service (Differentiated Services):
• Offered by a set of routers within an administrative domain (e.g., ISP or
telco).
• Administration defines service classes with corresponding forwarding rules.
• Customer packets entering the domain are marked with the class to which
they belong.
• Classes defined as per hop behaviors, indicating treatment at each router.
• Better service for packets with specific per-hop behaviors (e.g., premium
service).
• Traffic within a class may have specific shaping requirements (e.g., leaky
bucket with drain rate).
• No need for advance setup, resource reservation, or end-to-end negotiation
for each flow.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Class-Based Quality of Service (Differentiated Services):
• Expedited Forwarding (EF) is a service class defined by the IETF to
ensure high-quality transmission for specific packets, particularly beneficial for
real-time applications like Voice over IP (VoIP).
• This class, detailed in RFC 3246, introduces a 'two-tube' system within a
single physical line, distinguishing between regular and expedited traffic.
Quality of Service (QoS)

RNSIT – Depts. of CSE/ISE/AI & ML


Class-Based Quality of Service (Differentiated Services):
Assured Forwarding (AF):
• Defines four priority classes, each with its own resources.
• Top three classes often labeled gold, silver, and bronze.
• Introduces three discard classes for congested packets: low, medium, and high, resulting in 12
service classes.
• Figure 5-37 illustrates one possible packet processing scenario under assured forwarding.
• Higher-priority packet rates may be limited by the operator as part of the service offering.
RNSIT – Depts. of CSE/ISE/AI & ML
Module 3

End

You might also like