Routing Algorithms
Routing Algorithms
Network Layer
ISP’s equipment
A’s table (initially) A’s table (later) C’s Table E’s Table
ISP’s equipment
...
Dijkstra’s algorithm to compute the shortest path
through a graph.
May 13, 2024 Dr. ASM Mostafizur Rahaman, 18
Professor of CSE
Shortest Path Algorithm (3)
...
...
...
E
D
F Router G H
B
G C
B D
E I A
F I
A C F
West East
G
C
B
F
H
A
D I
F 6 E 1
B 2 C
4 3
D D E F
A 6 Seq. Seq. Seq.
F 4 C 1 D 4
E 8 with knowingFwhen to built
Packets easily built – problem F 8 E 8
them.
Acknowled
Sent Flags ged Flags
Source Seq. Age A C F A C F Data
A 21 60 0 1 1 1 0 0
F 21 60 1 1 0 0 0 1
E 21 59 0 1 0 1 0 1
C 20 60 1 0 1 0 1 0
D 21 59 1 0 0 0 1 1
2C 1B 3 4 1C 3
2D 1B 4 5 1C 4
3A 1C 3
3B 1C 2
4A 1C 3
5B
4B 1C 4
3A 3B 4A 5A 5C
4C 1C 4
Region 3 Region 5 5A 1C 4
Region 44C 5B 1C 5
5C 1B 5
4B 5E 5D 5D 1C 6
5E 1C 5
B C
B C
A D
A
D F
F
E
E I G
I G
J
J H
H L
L N
O
N O
K
K
M
M
F H J N
A D E K G O M O
E C G D N K
H B L H
L B
May 13, 2024 Dr. ASM Mostafizur Rahaman, 45
Professor of CSE
Broadcast Routing (cont.)
Reverse Path Forwarding in spite of not being optimal
procedure:
Efficient and easy to implement Algorithm
It does not require routers to know about spanning trees.
Does not have the overhead of destination list or bit map in
each broadcast packet (as multi-destination addressing).
It does not require any special mechanism to stop the process as
flooding does (hop counter in each packed and a priori
knowledge of the subnet diameter, or a list of packets already
seen per source)
2 1
2 1
1, 1,
1, 1, 2 2 2
2 2 2
2 2
2 1
1 1
1 Spanning Tree for the leftmost
Network
Router
1 2
1 1 2 2
2
2
1
1
A Multicast Tree for group 1 A Multicast Tree for group 2
Wireless cell
Home Agent
Mobile
Host
Home LAN
Foreign
Agent
Foreign LAN
WAN MAN
REGISTRATION with Foreign Agent: When a new host enters an area, either
by connecting to it (e.g., plugging into LAN), or wandering into the cell it
must register itself with the foreign agent of that area.
foreign agent 1. Pa
c
mob ket is se
packets are
ile h
ost’s nt to the
hom
e ad
3. Se dres
nder s
agen is gi
t’s a ven
ddre forei
ss gn
tunneled to the
4. Subsequent
to the
t is tunneled
e
2. Pack gent
eigh a
for
Packets sent to the mobile host on its home LAN in NEW York are intercepted by the home
agent (step 1).
Home agent looks up mobile host’s new (temporary) location and finds the address of the
foreign agent handling the mobile host (i.e., Los Angeles).
1. It encapsulates the packet in the payload field of an outer packet and sends the latter to
the foreign agent (step 2). This mechanism is called tunneling.
After getting the encapsulated packet, the foreign agent removes the original packet from
the payload field and sends it to the mobile host as a data link frame.
2. The home agent tells the sender to henceforth send packet to the mobile host by
encapsulating them in the payload of packets explicitly addressed to the foreign agent
instead of just sending them to the mobile host's home address (step 3.) Subsequent
packets can now be routed directly to the host via foreign agent (step 4.), bypassing the
home agent entirely.
Range of A’s
Broadcast
A A A A
B C B C B C B C
D D D D
E E E E
F G F G F G F G
H I H I H I H I
Range of A’s Broadcast After B and D have After C,F and G have After E,H and I have
received of A’s Broadcast received of A’s Broadcast received of A’s Broadcast
Suppose node A can not find the information about destination node I. Thus it
needs to discover a route to node I.
Algorithm Details.
H I
After C,F and G have
received of A’s Broadcast
H I
After C,F and G have
received of A’s Broadcast
H I
After E,H and I have
received of A’s Broadcast
TheSource
Source Destination
address, Destination
Destinationaddress,
Hop Hop Life-
Counter are copied from the
incoming
Address request.
Address Sequence # Count time
Destination sequence number is taken from its counter.
The Hop count field is set to 0.
The Lifetime field controls how long the route is valid.
This packed is cast back to the node that ROUTE REQUERST packed
came form, in this case node G.
From G it follows the reverse path to D and finally to A. At each node
Hop count is incremented so the node can see how far from the
destination (I) is.
1. No route to I is known.
2. The sequence number for I in the ROUTE REPLY packed is greater than the
value in the routing table.
3. The sequence numbers are equal but the new route I s shorter.
This ensures that all nodes on the reverse route learn the route to I for free as
a byproduct of A’s route discovery.
Nodes that got the original REQUEST ROUTE packed but were not on the
reverse path (B, C, E, F, and H in this example) discard the reverse route
table entry when the associated timer expires.
A A 1 F,G A
B C
B B 1 F,G
C B 2 G D
E G 2 E
F G
F F 1 A,B
G G 1 A,B
H F 2 A,B
H I
I G 2 A,B Graph after G has gone
down
1.2
1
Maximum Carrying
capacity of subnet
0.8
Packets Delivered [%]
Desirable Performance
0.6 Congested Performance
Ideal
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Num ber of Packets in Mil.
Slow Processors:
Queue build up due to routers slow CPU’s at performing bookkeeping task:
Queueing buffers,
Updating tables, etc.
Typically the problem is that upgrading one part of the system shifts the bottleneck to the other
someplace else. The real problem frequently is a mismatch parts of the system. The problem will
persist until all components of the system are in balance.
Open-loop approach
Problem is solved at the design cycle
Once the system is running midcourse correction are NOT made.
Tools for doing open-loop control:
Deciding when to accept new traffic,
Deciding when to disregard packets and which ones.
Making scheduling decision at various points in the network.
Note that all those decisions are made without regard to the current state of the
network.
a) b)
New Virtual-Circuit
A A
B B
A choke packetDr.that
May 13, 2024 affects
ASM Mostafizur only the source..
Rahaman,
Professor of CSE
99
Load Shedding (2)