15 441 641 computer networks intradomain routing
play

15-441/641: Computer Networks Intradomain Routing 15-441 Fall 2019 - PowerPoint PPT Presentation

15-441/641: Computer Networks Intradomain Routing 15-441 Fall 2019 Profs Peter Steenkiste & Justine Sherry Talk with a friend Leonard has been lost on a desert island and doesnt know much about technology. How would you explain


  1. Distributed Spanning Tree Protocol • Bridge with lowest ID (MAC address) is the “root” – All ports are part of tree • Each bridge finds shortest path to the root. – Remembers port that is on the shortest path

  2. Everyone keeps a simple data structure • (Root, Path Length, Next Hop) • Root: the root of the tree • Path Length: the number of switches you have to go to to reach the root • Next Hop: The switch you should forward packets to for them to reach the root.

  3. Basic Algorithm, if you are a switch • Look at your ID (MAC address). That is your ID. Assume you are the root. Store (Me, 0, Me) in your data structure. • do{ • Tell your neighbors (root, pathLength, yourID) • Listen to your neighbors when they tell you their path to the root. • If their ID number is smaller, replace root/path with their root/path, incrementing PathLength by one • If their ID number is the same but their path length is shorter, replace your root/path with theirs, incrementing PathLength by 1 • If neighbor A and neighbor B both tell you the same ID and path length, choose to route through A since A is lower than B. while(I keep getting new updates)

  4. Basic Algorithm, if you are a switch • Now that you know where the root is and how to get it: • Disable all ports that do not • (a) Connect you to the root • (b) Connect someone to you who uses you to get to the root.

  5. 1, 0, 1 5, 0, 5 2, 0, 2 4, 0, 4 1 5 3, 0, 3 2 4 3 Note: these are special control messages which are not broadcast

  6. Things are about to get weird • This is a distributed algorithm • That means that all of the nodes operate on their own time scales, at the same time • This makes it hard to reason about the order things happen in across the whole system • It’s easiest to think about the system just one node at a time.

  7. 1, 0, 1 5, 0, 5 2, 0, 2 4, 0, 4 1 5 3, 0, 3 2 4 3

  8. 1, 0, 1 5, 0, 5 2, 0, 2 4, 0, 4 1 5 3, 0, 3 2 4 3

  9. 2, 0, 2 2

  10. Root node 2, 0, 2 ID for this new route is higher than the current node ID. I should keep my old route. 2 3, 1, 3

  11. 1, 1, 1 Root node 2, 0, 2 ID for this new route is lower than the current node ID. I should update my route! 2

  12. I 1, 1, 1 should tell my neighbors about the change!! 2

  13. 1, 1, 1 1, 2, 2 2 1, 2, 2 1, 2, 2

  14. 1, 0, 1 5, 0, 5 1, 1, 1 4, 0, 4 1 5 3, 0, 3 2 4 3 It’s hard to predict what order things will happen in: everyone is sending and updating at the same time — the only place it is easy to reason about order is at an individual node!

  15. 1, 0, 1 5, 0, 5 1, 1, 1 4, 0, 4 4,1,4 1 5 3, 0, 3 2 4 3

  16. 1, 0, 1 4,1,4 1, 1, 1 4, 0, 4 1 5 3, 0, 3 2 4 3

  17. 1, 0, 1 4,1,4 1, 1, 1 4, 0, 4 4,1,4 1 5 3, 0, 3 2 4 3

  18. 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  19. What does this mean? 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  20. Eventually… • We stop receiving “new” updates • We say that the protocol has converged. • Now: remove all links that don’t connect someone on their path to the root node.

  21. What should I remove? 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  22. What should I remove? 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  23. Let’s try it now • Your node ID is your full name. • Your neighbors are your neighbors. • Quiet down when you think you have converged.

  24. Who is the root?

  25. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Resilience : the ability to provide and maintain an acceptable level of service in the face of faults and challenges to normal operation

  26. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Fully Distributed Yes Yes Fully Distributed: does not assume the previous existence of a central coordinator.

  27. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Fully Distributed Yes Yes Learning Switch: Learning Switch: State per Node O(#nodes) O(#nodes) + Path to Root: O(constant) State: The amount of memory each node uses

  28. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Fully Distributed Yes Yes We will only talk about convergence in “big picture” terms — but analyzing convergence for routing protocols and other distributed algorithms Learning Switch: Learning Switch: State per Node is a fascinating area of theoretical computer O(#nodes) O(#nodes) + Path to science. If you’re curious about this stuff, take a Root: O(constant) class from Prof. Haeupler Need to run spanning Convergence No setup time at all! tree protocol before routing Convergence: the process of routers/switches agreeing on optimal routes for forwarding packets and thereby completing the updating of their routing table

  29. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Fully Distributed Yes Yes Do the packets go where they Learning Switch: Learning Switch: State per Node O(#nodes) need to get efficiently — without O(#nodes) + Path to Root: O(constant) wasting resources at switches? Need to run spanning Convergence No setup time at all! tree protocol before routing Still sends new Routing Efficiency Broadcast Storms connections everywhere.

  30. Broadcast Network w/ Trade-Offs Learning Switches and Broadcast Network w/ Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure We know Fully Distributed Yes Yes packets will Learning Switch: reach their Learning Switch: State per Node O(#nodes) O(#nodes) + Path to destination… Root: O(constant) but do they take the Need to run spanning Convergence No setup time at all! tree protocol before shortest path to routing get there? Still sends new Routing Efficiency Broadcast Storms connections everywhere. Shortest Path? Not Necessarily… Not Necessarily…

  31. What if 3 wants to communicate with 4? What if 5 wants to communicate with 3? 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  32. Time check…

  33. Real World • We only use broadcast routing in very small networks. • One rack in the machine room. • A wing of one floor in GHC. • To orchestrate the bigger network — across campus — we use other algorithms. • Why do you think that is?

  34. Broadcast Network w/ Distance Vector Learning Switches and Broadcast Network w/ e.g RIP Spanning Tree Learning Switches If there is a route, the Need to recompute Resilience packet will reach dest! spanning tree if failure Fully Distributed Yes Yes Learning Switch: Learning Switch: State per Node O(#nodes) O(#nodes) + Path to Root: O(constant) Need to run spanning Convergence No setup time at all! tree protocol before routing Still sends new Packets sent directly to Routing Efficiency Broadcast Storms connections everywhere. their destination. Shortest Path? Not Necessarily… Not Necessarily… Yes

  35. Recall: Spanning Tree There is exactly one node that every does have the shortest path to. 1, 0, 1 1,2,4 1, 1, 1 1,1,1 1 5 1,2,2 2 4 3

  36. How Distance-Vector (DV) Works Each router maintains its shortest distance to every destination via each of Neighbor its neighbors (next-hop) A’s Route Table via B viaC A to B Destinations to C dist C (A, D): shortest 
 to D distance from A to D via C Each router computes its shortest distance to every destination via any of its neighbors

  37. How Distance-Vector (DV) Works B D A C

  38. How Distance-Vector (DV) Works Each router maintains its shortest distance to every destination via each of its neighbors A’s Route Table via B viaC A to B 1 to C 1 to D Each router computes its shortest distance to every destination via any of its neighbors

  39. How Distance-Vector (DV) Works B 1 ms 3 ms D A 3 ms 2 ms 1 ms C Link distance doesn’t have to be 1! Could be some other value — e.g., latency of the link

  40. How Distance-Vector (DV) Works Each router maintains its shortest distance to every destination via each of its neighbors A’s Route Table via B viaC A to B 1 4 to C 4 1 to D 4 3 Each router computes its shortest distance to every destination via any of its neighbors

  41. How Distance-Vector (DV) Works A’s distance 
 vector (DV) Routers send a summary of their tables to their neighbors. min This summary is called a “distance vector” dist A’s Route Table via B viaC to A A to B to B 1 4 to C to C 2 1 to D to D 4 3 Each router computes its shortest distance to every destination via any of its neighbors

Recommend


More recommend