1 / 42

Part 4: Network Layer Part A: Algorithms

Part 4: Network Layer Part A: Algorithms. Summary. The Problem The Dijkstra’s Shortest Path Algorithm Distance Vector Routing Link State Routing Hierarchical Routing Routing in Ad Hoc Networks. 1. The Problem (1). Store-and-Forward Packet Switching

cphil
Download Presentation

Part 4: Network Layer Part A: Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Part 4: Network LayerPart A: Algorithms

  2. Summary • The Problem • The Dijkstra’s Shortest Path Algorithm • Distance Vector Routing • Link State Routing • Hierarchical Routing • Routing in Ad Hoc Networks

  3. 1. The Problem (1) • Store-and-Forward Packet Switching • Services Provided to the Transport Layer • Connectionless Service • Connection-Oriented Service

  4. 1. The Problem (2): Packet Switching fig 5-1 The environment of the network layer protocols.

  5. 1. The Problem (3): Connectionless Service Routing within a diagram subnet.

  6. 1. The Problem (4): Connection-Oriented Service Routing within a virtual-circuit subnet.

  7. 1. The Problem (5): Connectionless VS. Connection-Oriented

  8. 2 Shortest Path Algorithm • The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.

  9. 3 Distance Vector Routing (1) (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

  10. 3 Distance Vector Routing (2) The count-to-infinity problem.

  11. 3 Distance Vector Routing (3): Loop-Breaking Heuristics • Set infinity to a limited number, e.g. 16. • Split horizon • Split horizon with poison reverse

  12. 3 Example: A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 0 0 0 0 Initialization 0

  13. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 10 2 0 1 2 2 2 0 10 0 Direct Neighbours 0 2 2

  14. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 2 2 0 10 3 Neighbours of neighbours 0 0 11 2 2

  15. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 10 3 Neighbours of neighbours of neighbours 0 13 13 0 11 2 13 2

  16. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 10 3 0 Stable convergence 13 13 0 11 2 13 2

  17. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 1 10 3 Good news: A new link! 0 13 13 0 11 2 13 2

  18. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 1 10 3 0 Direct endpoints know 1 1 0 11 2 13 2

  19. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 10 2 3 0 1 2 3 3 3 2 2 0 1 4 3 Neighbours know 0 1 1 0 3 2 3 2

  20. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 1 4 3 Neighbours of neighbours know 0 1 1 0 3 2 3 2

  21. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 1 4 3 A happy and stable network 0 1 1 0 3 2 3 2

  22. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 4 3 Bad news: Link crash!! 0 1 1 0 3 2 3 2

  23. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 3 Direct endpoints know 0 0 2 2

  24. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 10 3 0 0 2 2

  25. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 3 4 2 3 0 1 2 3 3 3 2 2 0 10 3 Get help from neighbours 0 5 13 0 11 2 13 2

  26. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 7 4 2 3 0 1 2 3 3 7 2 2 0 10 3 Routing loop (due to inconsistent state info) 0 5 13 0 11 2 13 2

  27. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 7 8 2 3 0 1 2 3 3 7 2 2 0 10 3 0 9 13 0 11 2 13 2

  28. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 8 2 3 0 1 2 3 3 11 2 2 0 10 3 Counting to infinity… 0 9 13 0 11 2 13 2

  29. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 11 2 2 0 10 3 0 13 13 0 11 2 13 2

  30. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 10 3 0 13 13 0 11 2 13 2

  31. A A A A A B B B B B D A C C C C C 1 2 D D D D D E E E E E 2 E 10 2 B C 1 0 11 10 2 3 0 1 2 3 3 13 2 2 0 10 3 Stability again 0 13 13 0 11 2 13 2

  32. 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.

  33. 4 Link State Routing (2): Learning about the Neighbors • Nine routers and a LAN. • A graph model of (a).

  34. 4 Link State Routing (3): Measuring Line Cost • A subnet in which the East and West parts are connected by two lines.

  35. 4 Link State Routing (4): Building Link State Packets • (a) A subnet. (b) The link state packets for this subnet.

  36. 4 Link State Routing (5): Distributing the Link State Packets • The packet buffer for router B in the previous slide (Fig. 5-13).

  37. 5 Hierarchical Routing • Hierarchical routing.

  38. 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.

  39. 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.

  40. 6. Routing in Ad Hoc Networks (3): Route Discovery • Format of a ROUTE REQUEST packet.

  41. 6. Routing in Ad Hoc Networks (4): Route Discovery • Format of a ROUTE REPLY packet.

  42. 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.

More Related