CSC 450/550
Part 4: Network Layer
Part A: Algorithms
CSC 450/550
Summary
1) The Problem
2) The Dijkstra’s Shortest Path Algorithm
3) Distance Vector Routing
4) Link State Routing
5) Hierarchical Routing
6) Routing in Ad Hoc Networks
CSC 450/550
1. The Problem (1)
•Store-and-Forward Packet Switching
•Services Provided to the Transport Layer
•Connectionless Service
•Connection-Oriented Service
CSC 450/550
1. The Problem (2): Packet Switching
The environment of the network layer protocols.
fig 5-1
CSC 450/550
1. The Problem (3): Connectionless
Service
Routing within a diagram subnet.
CSC 450/550
1. The Problem (4): Connection-
Oriented Service
Routing within a virtual-circuit subnet.
CSC 450/550
1. The Problem (5): Connectionless
VS. Connection-Oriented
CSC 450/550
2 Shortest Path Algorithm
The first 5 steps used in computing the shortest path from A to D.
The arrows indicate the working node.
CSC 450/550
3 Distance Vector Routing (1)
(a) A subnet. (b) Input from A, I, H, K, and the new
routing table for J.
CSC 450/550
3 Distance Vector Routing (2)
The count-to-infinity problem.
CSC 450/550
3 Distance Vector Routing (3): Loop-
Breaking Heuristics
Set infinity to a limited number, e.g. 16.
Split horizon
Split horizon with poison reverse
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
Initialization
3 Example:
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
Direct
Neighbours
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
3
3
11
3
3
11
Neighbours
of neighbours
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
3
3
11
3
3
11
13
13
13
13
Neighbours
of neighbours
of neighbours
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
3
3
11
3
3
11
13
13
13
13
Stable
convergence
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
3
3
11
3
3
11
13
13
13
13
1
Good news:
A new link!
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
10
2
2
2
2
2
2
1
3
3
11
3
3
11
1
13
1
13
1
Direct
endpoints
know
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
4
2
2
2
2
2
2
1
3
3
3
3
3
3
1
3
1
3
1
Neighbours
know
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
4
2
2
2
2
2
2
1
3
3
3
3
3
3
1
3
1
3
1
Neighbours
of neighbours
know
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
4
2
2
2
2
2
2
1
3
3
3
3
3
3
1
3
1
3
1
A happy and
stable network
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
4
2
2
2
2
2
2
1
3
3
3
3
3
3
1
3
1
3
Bad news:
Link crash!!
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
2
2
2
2
2
2
1
3
3
3
3
3
3
Direct
endpoints
know
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
2
2
2
2
2
2
1
3
3
3
3
3
3
10
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
2
2
2
2
2
2
1
3
3
3
3
3
3
10
5
13
11
13
Get help
from
neighbours
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
4
1
2
2
2
2
2
2
1
3
3
3
3
7
7
10
5
13
11
13
Routing loop
(due to
inconsistent
state info)
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
8
1
2
2
2
2
2
2
1
3
3
3
3
7
7
10
9
13
11
13
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
8
1
2
2
2
2
2
2
1
3
3
3
3
11
11
10
9
13
11
13
Counting
to infinity…
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
2
2
2
2
2
2
1
3
3
3
3
11
11
10
13
13
11
13
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
2
2
2
2
2
2
1
3
3
3
3
11
13
10
13
13
11
13
CSC 450/550
1
10 2
2
2
A
B C
E
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
A
C
E
B
D
0
0
0
0
0
10
1
2
2
2
2
2
2
1
3
3
3
3
11
13
10
13
13
11
13
Stability
again
CSC 450/550
4 Link State Routing (1)
Each router must do the following:
• Discover its neighbors, learn their network
address.
• Measure the delay or cost to each of its
neighbors.
• Construct a packet telling all it has just learned.
• Send this packet to all other routers.
• Compute the shortest path to every other router.
CSC 450/550
4 Link State Routing (2): Learning
about the Neighbors
(a) Nine routers and a LAN.
(b) A graph model of (a).
CSC 450/550
4 Link State Routing (3): Measuring
Line Cost
A subnet in which the East and West parts are
connected by two lines.
CSC 450/550
4 Link State Routing (4): Building
Link State Packets
(a) A subnet. (b) The link state packets for this
subnet.
CSC 450/550
4 Link State Routing (5): Distributing
the Link State Packets
The packet buffer for router B in the previous slide (Fig.
5-13).
CSC 450/550
5 Hierarchical Routing
Hierarchical routing.
CSC 450/550
6. Routing in Ad Hoc Networks (1)
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.
CSC 450/550
6. Routing in Ad Hoc Networks (2):
Route Discovery
(a) Range of A's broadcast.
(b) After B and D have received A's broadcast.
(c) After C, F, and G have received A's broadcast.
(d) After E, H, and I have received A's broadcast.
Shaded nodes are new recipients. Arrows show possible reverse routes.
CSC 450/550
6. Routing in Ad Hoc Networks (3):
Route Discovery
Format of a ROUTE REQUEST packet.
CSC 450/550
6. Routing in Ad Hoc Networks (4):
Route Discovery
Format of a ROUTE REPLY packet.
CSC 450/550
6. Routing in Ad Hoc Networks (5):
Route Maintenance
(a) D's routing table before G goes down.
(b) The graph after G has gone down.

Network Layer - Routing protocols in networks

  • 1.
    CSC 450/550 Part 4:Network Layer Part A: Algorithms
  • 2.
    CSC 450/550 Summary 1) TheProblem 2) The Dijkstra’s Shortest Path Algorithm 3) Distance Vector Routing 4) Link State Routing 5) Hierarchical Routing 6) Routing in Ad Hoc Networks
  • 3.
    CSC 450/550 1. TheProblem (1) •Store-and-Forward Packet Switching •Services Provided to the Transport Layer •Connectionless Service •Connection-Oriented Service
  • 4.
    CSC 450/550 1. TheProblem (2): Packet Switching The environment of the network layer protocols. fig 5-1
  • 5.
    CSC 450/550 1. TheProblem (3): Connectionless Service Routing within a diagram subnet.
  • 6.
    CSC 450/550 1. TheProblem (4): Connection- Oriented Service Routing within a virtual-circuit subnet.
  • 7.
    CSC 450/550 1. TheProblem (5): Connectionless VS. Connection-Oriented
  • 8.
    CSC 450/550 2 ShortestPath Algorithm The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.
  • 9.
    CSC 450/550 3 DistanceVector Routing (1) (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
  • 10.
    CSC 450/550 3 DistanceVector Routing (2) The count-to-infinity problem.
  • 11.
    CSC 450/550 3 DistanceVector Routing (3): Loop- Breaking Heuristics Set infinity to a limited number, e.g. 16. Split horizon Split horizon with poison reverse
  • 12.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 Initialization 3 Example:
  • 13.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 Direct Neighbours
  • 14.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 3 3 11 3 3 11 Neighbours of neighbours
  • 15.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 3 3 11 3 3 11 13 13 13 13 Neighbours of neighbours of neighbours
  • 16.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 3 3 11 3 3 11 13 13 13 13 Stable convergence
  • 17.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 3 3 11 3 3 11 13 13 13 13 1 Good news: A new link!
  • 18.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 10 2 2 2 2 2 2 1 3 3 11 3 3 11 1 13 1 13 1 Direct endpoints know
  • 19.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 4 2 2 2 2 2 2 1 3 3 3 3 3 3 1 3 1 3 1 Neighbours know
  • 20.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 4 2 2 2 2 2 2 1 3 3 3 3 3 3 1 3 1 3 1 Neighbours of neighbours know
  • 21.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 4 2 2 2 2 2 2 1 3 3 3 3 3 3 1 3 1 3 1 A happy and stable network
  • 22.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 4 2 2 2 2 2 2 1 3 3 3 3 3 3 1 3 1 3 Bad news: Link crash!!
  • 23.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 2 2 2 2 2 2 1 3 3 3 3 3 3 Direct endpoints know
  • 24.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 2 2 2 2 2 2 1 3 3 3 3 3 3 10
  • 25.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 2 2 2 2 2 2 1 3 3 3 3 3 3 10 5 13 11 13 Get help from neighbours
  • 26.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 4 1 2 2 2 2 2 2 1 3 3 3 3 7 7 10 5 13 11 13 Routing loop (due to inconsistent state info)
  • 27.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 8 1 2 2 2 2 2 2 1 3 3 3 3 7 7 10 9 13 11 13
  • 28.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 8 1 2 2 2 2 2 2 1 3 3 3 3 11 11 10 9 13 11 13 Counting to infinity…
  • 29.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 2 2 2 2 2 2 1 3 3 3 3 11 11 10 13 13 11 13
  • 30.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 2 2 2 2 2 2 1 3 3 3 3 11 13 10 13 13 11 13
  • 31.
    CSC 450/550 1 10 2 2 2 A BC E D A C E B D A C E B D A C E B D A C E B D A C E B D 0 0 0 0 0 10 1 2 2 2 2 2 2 1 3 3 3 3 11 13 10 13 13 11 13 Stability again
  • 32.
    CSC 450/550 4 LinkState Routing (1) Each router must do the following: • Discover its neighbors, learn their network address. • Measure the delay or cost to each of its neighbors. • Construct a packet telling all it has just learned. • Send this packet to all other routers. • Compute the shortest path to every other router.
  • 33.
    CSC 450/550 4 LinkState Routing (2): Learning about the Neighbors (a) Nine routers and a LAN. (b) A graph model of (a).
  • 34.
    CSC 450/550 4 LinkState Routing (3): Measuring Line Cost A subnet in which the East and West parts are connected by two lines.
  • 35.
    CSC 450/550 4 LinkState Routing (4): Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
  • 36.
    CSC 450/550 4 LinkState Routing (5): Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13).
  • 37.
    CSC 450/550 5 HierarchicalRouting Hierarchical routing.
  • 38.
    CSC 450/550 6. Routingin Ad Hoc Networks (1) 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.
  • 39.
    CSC 450/550 6. Routingin Ad Hoc Networks (2): Route Discovery (a) Range of A's broadcast. (b) After B and D have received A's broadcast. (c) After C, F, and G have received A's broadcast. (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes.
  • 40.
    CSC 450/550 6. Routingin Ad Hoc Networks (3): Route Discovery Format of a ROUTE REQUEST packet.
  • 41.
    CSC 450/550 6. Routingin Ad Hoc Networks (4): Route Discovery Format of a ROUTE REPLY packet.
  • 42.
    CSC 450/550 6. Routingin Ad Hoc Networks (5): Route Maintenance (a) D's routing table before G goes down. (b) The graph after G has gone down.

Editor's Notes

  • #3 Research on DTN, Localization
  • #4 Research on DTN, Localization
  • #5 Research on DTN, Localization
  • #6 Research on DTN, Localization
  • #7 Research on DTN, Localization