Your SlideShare is downloading. ×
0
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-State Routing

1,319

Published on

An easy to follow basic presentation designed to explain the core operating principles of link-state and distance-vector routing protocols, which form the basis of OSPF/IS-IS and BGP routing protocols …

An easy to follow basic presentation designed to explain the core operating principles of link-state and distance-vector routing protocols, which form the basis of OSPF/IS-IS and BGP routing protocols for the Internet, respectively. Adapted and summarized from Christian Huitema's "Routing in the Internet," bringing some of his examples "to life" as it were.

This talk/presentation is useful for...

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,319
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Internet Routing Protocols:Fundamental Concepts of Link-Stateand Distance Vector Routing**From Christian Huitema’s Routing in the Internet Vishal Sharma, Ph D Tellabs Research Center vsharma@trc tellabs com November 20, 1998
  • 2. Outline of the Talk  What does a router do?  A look at the forwarding process at a router  How does it know where to forward packets?  Distance vector routing An illustration of its operation Its drawbacks and how they affect performance Some solutions to those drawbacks  Link state routing A look at its major components An illustration of their operation Its features and advantages  OSPF: a link state based intra-domain routing protocol  BGP: a distance vector based inter-domain routing protocolCopyright © 1998 Internet Routing Protocols: Fundamental Operation 2
  • 3. Importance of Routing in the Internet The structure that glues together the worldwide Internet  Without routing there would be no Internet!Copyright © 1998 Internet Routing Protocols: Fundamental Operation 3
  • 4. Routing process at a router Receive incoming pkt.  Destination address (DA) based forwarding DA=my_add or Yes Deliver datagram to protocol module  Longest prefix matching DA= IP brdcst add. ? (TCP/UDP) specified in IP hdr. No Routing Table Yes Send pkt. to next-hop RT entry = complete DA? router or to directly DA Next hop Network connected interface. router Interface Host entry 198.168.7.3 X 2 No Host entry 198.168.7.4 X 3 RT entry = Yes Send pkt. to next-hop Host entry 198.168.7.1 198.168.7.5 1 Destn. n/w id? router or to directly connected interface. Host entry 198.168.7.2 198.168.7.5 1 No N/w entry 198.100.x.x 198.100.9.1 4 N/w entry 128.72.x.x 128.72.55.4 5 Yes Send pkt. to Default entry exists? next-hop router. Default x.x.x.x 128.84.73.1 6 No Datagram undeliverable. (Use ICMP to inform source.)Copyright © 1998 Internet Routing Protocols: Fundamental Operation 4
  • 5. Routing process at a router Longest prefix match in DA Next hop N/w Packet generated RT gives next hop router Int. router as 198 100 9 1 Host entry 198.168.7.3 X 2 DA = 198 100 9 75 and outgoing interface Host entry 198.168.7.4 X 3 as 4 198.168.7.3 Host entry 198.168.7.1 198.168.7.5 1 198.168.7.4 Host entry 198.168.7.2 198.168.7.5 1 198.168.7.1 198.168.7.5 N/w entry 198.100.x.x 198.100.9.1 4 N/w entry 128.72.x.x 128.72.55.4 5 198.100.x.x Default x.x.x.x 128.84.73.1 6 2 1 3 Routing table (RT) at 198 168 7 6 198.168.7.2 4 198.100.9.1 198.168.7.6 5 198.100.9.75 6 128.84.x.x 128.72.x.x 128.72. 55.4 128.84. 73.1  How do routers build their routing tables?  By exchanging information with each other using routing protocolsCopyright © 1998 Internet Routing Protocols: Fundamental Operation 5
  • 6. Routing Protocols: Distance vector (DV) Routing Local dispersal of global information  Each router has unique ID  Each router knows cost of its outgoing links  Router starts with distance vector “0” for itself, and “infinity” for all other destinations  Transmits DV to each neighbor -- periodically or upon change  Saves the most recently received DV from each neighbor  Calculates new DV based on minimizing cost for each destination  Recalculations occur when: DV with new values received from a neighbor Link(s) failsCopyright © 1998 Internet Routing Protocols: Fundamental Operation 6
  • 7. Operation of Distance Vector Routing (1) From A Link Cost From B Link Cost A local 0 B local 0 Letters represent Node names A B 1 A=0 2 From C Link Cost C C local 0 3 4Numbers on links representlink identifiers (not cost) 5 6 From D Link Cost D E From E Link Cost D local 0 E local 0Copyright © 1998 Internet Routing Protocols: Fundamental Operation 7
  • 8. Operation of Distance Vector Routing (2) From A Link Cost From B Link Cost A local 0 B local 0 A 1 1 B=0, A=1 A B 1 2 From C Link Cost C C local 0 3 4 D=0, A=1 5 6 From D Link Cost D E From E Link Cost D local 0 E local 0 A 3 1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 8
  • 9. Operation of Distance Vector Routing (3) From A Link Cost From B Link Cost A local 0 B local 0 B 1 1 A 1 1 D 3 1 A=0, B=1, D=1 A B 1 C=0, B=1, A=2 2 From C Link Cost C C local 0 B 2 1 3 4 A 2 2 5 6 From D Link Cost D E From E Link Cost D local 0 E=0, B=1, A=2, E local 0 A 3 1 B 4 1 D=1 A 4 2 D 6 1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 9
  • 10. Operation of Distance Vector Routing (4) From A Link Cost From B Link Cost A local 0 B local 0 B 1 1 A 1 1 D 3 1 B=0, A=1, D=2, D 1 2 C=1, E=1 C 2 1 A B E 5 1 1 2 From C Link Cost C C local 0 B 2 1 3 4 A 2 2 D=0, A=1, B=2 E=1 5 6 From D Link Cost D E From E Link Cost D local 0 E=0, B=1, A=2, E local 0 A 3 1 B 4 1 D=1, C=1 B 3 2 A 4 2 E 6 1 D 6 1 C 5 1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 10
  • 11. Operation of Distance Vector Routing (5) From A Link Cost From B Link Cost A local 0 B local 0 B 1 1 A 1 1 D 3 1 D 1 2 C 1 2 C 2 1 E 1 2 A B E 5 1 1These do not alter 2 From C Link Costrouting tables further C C local 0Thus, no new 3 4 B 2 1 A 2 2updates generated E 5 1 D 5 2 5 6 From D Link Cost D E From E Link Cost D local 0 E local 0 A 3 1 B 4 1 B 3 2 A 4 2 E 6 1 D 6 1 C 6 2 C 5 1 DV routing has now convergedCopyright © 1998 Internet Routing Protocols: Fundamental Operation 11
  • 12. Drawbacks of Distance-vector Routing  Slow convergence after topology change  “Counting to infinity” problem: Loop exists DVs do not converge till the link costs reach “infinity ”  Problematic convergence with unequal link costs  Bouncing effect: Routing and link costs temporarily stabilize, but have a loop Data packets circulate in the loop till time-to-live (TTL) expires This changes only when network converges to a new, coherent version of the routing tablesCopyright © 1998 Internet Routing Protocols: Fundamental Operation 12
  • 13. Drawbacks of Distance Vector Routing: Counting to “Infinity” (1) From A Link Cost A’s stable routing table A local 0 B 3 3 after link 1 fails D 3 1 C 3 3 E 3 2 A B 1 A=0, B=3, D=1, 2 C=3, E=2 C A transmits its last 3 4 DV before D does Link 6 fails 5 6 From D Link Cost D E D local 0 A 3 1 D’s routing table B 6 inf immediately E 6 inf C 6 inf after link 6 failsCopyright © 1998 Internet Routing Protocols: Fundamental Operation 13
  • 14. Drawbacks of Distance Vector Routing: Counting to “Infinity” (2) From A Link Cost A local 0 B 3 3 D 3 1 C 3 3 E 3 2 A B 1 D transmits its 2 C updated DV D=0, A=1, B=4, 3 4 E=3, C=4 5 6 From D Link Cost D E D local 0 A 3 1 B 3 4 E 3 3 C 3 4 D updates its routing tableCopyright © 1998 Internet Routing Protocols: Fundamental Operation 14
  • 15. Drawbacks of Distance Vector Routing: Counting to “Infinity” (3) From A Link Cost Then A updates its routing table A local 0 B 3 5 D 3 1 A=0, B=5, D=1, C 3 5 C=5, E=4 E 3 4 A B 1 A transmits its 2 C updated DV 3 4 We are in an infinite loop! 5 6 From D Link Cost D E D local 0 A 3 1 B 3 4 Infinite loop broken by some E 3 3 C 3 4 convention on the representation of “infinity ”Copyright © 1998 Internet Routing Protocols: Fundamental Operation 15
  • 16. Drawbacks of Distance Vector Routing: Bouncing Effect (1) All links except 5 have unit From A Link Cost cost, link 5 cost = 10 From B Link Cost A local 0 B local 0 B 1 1 A 1 1 C 1 2 C 2 1 D 3 1 D 1 2 E 3 2 A B E 4 1 1 2 C Routes towards C 3 4 From Link Cost AC 1 2 BC 1 1 5 CC local 0 DC 3 3 6 EC 4 2 From D Link Cost D E From E Link Cost D local 0 E local 0 A 3 1 A 5 2 B 3 2 B 4 1 C 3 3 C 4 2 E 5 1 D 5 1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 16
  • 17. Drawbacks of Distance Vector Routing: Bouncing Effect (2) All links except 5 have unit From A Link Cost cost, link 5 cost = 10 From B Link Cost B’s routing table A local 0 B local 0 immediately after B 1 1 A 1 1 C 1 2 C 2 inf link 2 fails D 3 1 D 1 2 E 3 2 A B E 4 1 1 Link 2 fails A=0, B=1, C=2, 2 D=1,E=2 C Routes towards C A transmits its DV 3 4 From Link Cost before B does AC 1 2 BC 1 inf 5 CC local 0 DC 3 3 6 EC 4 2 From D Link Cost D E From E Link Cost D local 0 E local 0 Routes towards C A 3 1 A 5 2 immediately after B 3 2 B 4 1 C 3 3 C 4 2 B’s update of its E 5 1 D 5 1 routing tableCopyright © 1998 Internet Routing Protocols: Fundamental Operation 17
  • 18. Drawbacks of Distance Vector Routing: Bouncing Effect (3) All links except 5 have unit From A Link Cost cost, link 5 cost = 10 From B Link Cost However, B updates its routing A local 0 B local 0 B transmits its new DV A 1 1 table based on DV B 1 1 C 1 2 B=0, A=1, C=3, C 1 3 from A (causing the D 3 1 D=1,E=1 D 1 2 E 4 1 route towards C to E 3 2 A B 1 change also) 2 C Routes towards C 3 4 From Link Cost AC 1 2 BC 1 3 A’s DV produces 5 CC local 0 no change at D DC 3 3 6 EC 4 2 From D Link Cost D E From E Link Cost D local 0 E local 0 A 3 1 A 5 2 B 3 2 B 4 1 C 3 3 C 4 2 E 5 1 D 5 1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 18
  • 19. Drawbacks of Distance Vector Routing: Bouncing Effect (4) All links except 5 have unit From A Link Cost cost, link 5 cost = 10 From B Link Cost A local 0 B local 0 B 1 1 A 1 1 C 1 4 C 1 3 D 3 1 D 1 2 E 3 2 A B E 4 1 1Further DV exchanges 2produce no change in C Routes towards Crouting tables! Both 3 4 From Link Costrouting and distances AC 1 4 Loop!have (temporarily) BC 1 3 5 CC local 0stabilized DC 3 3 6 EC 4 4 From D Link Cost D E From E Link Cost D local 0 E local 0 A 3 1 A 5 2 B 3 2 B 4 1 C 3 3 C 4 4 E 5 1 D 5 1 Packets for C can now “bounce” between A and BCopyright © 1998 Internet Routing Protocols: Fundamental Operation 19
  • 20. Some Solutions for Problems in Distance Vector Routing  Split Horizon: If A routes packets for X via B, it should not announce to B that X is a short distance from A! A B X Simple algo : Omit from DV any info about destinations routed on the link  “Poisonous reverse” algo : Set distance of destination routed on the link to infinity  Triggered Updates: transmit updates as soon as routing table changes, don’t wait for end of update periodCopyright © 1998 Internet Routing Protocols: Fundamental Operation 20
  • 21. Routing Protocols: Link State (LS) Routing Global dispersal of local information Each router:  Identifies itself to all its neighbors  Constructs a link state packet (LSP) with: Names of each neighbor Cost of link to each neighbor  Floods its LSP in the network  Stores most recent copy of LSP from every other router  Using LSPs constructs a full map of network topology, and computes shortest route(s) to each destination (using an appropriate shortest path algorithm, such as Dijkstra’s)Copyright © 1998 Internet Routing Protocols: Fundamental Operation 21
  • 22. Operation of Link State Routing (1)  Meeting neighbors A Hello B  Xmit special pkt over link Hello C (if pt to pt ) or to a group address (if broadcast n/w or Hello LAN) D Hello E Name of neighbor Cost of Link to that neighbor A B/1 B D/1 A/1 C/1 C  Construct Link State Packet A B E/1 B/1 1 D/1 (LSP) LSP is sent when: Letters represent 2 C  Neighbor changes Node names 4  Link goes up/down 5  Also, periodically E Numbers on links are D D 6 D/1 E/1 E C/1 link identifiers (not cost) A/1 B/1Copyright © 1998 Internet Routing Protocols: Fundamental Operation 22
  • 23. Operation of Link State Routing (2)  Disseminate LSP to all Receive message from A, say routers in the network LSP distrn cannot use Record in database No - Add to database, - Broadcast message. routing database ⇒ use from A ? Flooding algorithm Yes Each LSP has “msg #” and Record # in Yes - Replace record by database < “age” to enable receiving Record # in new value. - Broadcast message. msg.? node to distinguish between old and new info No Record # in No Transmit database database = value on incoming  Advantage: Record # in msg.? interface. LSP can be forwarded Yes without any shortest path Do nothing. computation, so fasterCopyright © 1998 Internet Routing Protocols: Fundamental Operation 23
  • 24. Operation of Link State Routing: The Flooding Protocol at Work (1) Link State A B D’s Link State Database Packet, LSP B/1 A/1 (amalgamation of LSPs from D/1 C A B C/1 remaining network nodes) 1 E/1 B/1 Node name LSP # D/1 2 C A #1 B #1 C #1 D #1 E #1 B/1 A/1 B/1 E/1 D/1 3 4 D/1 C/1 D/1 A/1 C/1 E/1 B/1 5 E D 6 D/1 D E/1 E C/1 A/1 B/1 B #2 A/inf A B C/1 1 E/4 A #1 B #1 C #1 D #1 E #1 A #2 2 C B/1 A/1 B/1 E/1 D/1 B/inf D/1 C/1 D/1 A/1 C/1 3 D/1 4 E/1 B/1 5 6 D E Internet Routing Protocols: Fundamental Operation 24Copyright © 1998
  • 25. Operation of Link State Routing: The Flooding Protocol at Work (2) A B D’s Link State Database 1 2 C A #2 B #1 C #1 D #1 E #1 B #2 B/inf A/1 B/1 E/1 D/1 3 A/inf 4 D/1 C/1 D/1 A/1 C/1 C/1 E/1 E/1 B/1 5 B #2 A/inf A #2 6 C/1 D E E/1 B/inf D/1 A B 1 2 A #2 B #2 C #1 D #1 E #1 B #2 A #2 C 4 B/inf A/inf B/1 E/1 D/1 A/inf 3 B/inf C/1 D/1 D/1 C/1 D/1 A/1 C/1 E/1 E/1 B/1 5 6 D ECopyright © 1998 Internet Routing Protocols: Fundamental Operation 25
  • 26. Operation of Link State Routing: The Flooding Protocol at Work (3) A #2 D’s Link State Database B/inf A B D/1 1 A #2 B #2 C #1 D #1 E #1 2 C B/inf A/inf B/1 E/1 D/1 D/1 C/1 D/1 A/1 C/1 3 4 E/1 B/1 5 6 No further changes take place D E in the LS database D (and all other nodes) can now calculate the shortest path to every destinationCopyright © 1998 Internet Routing Protocols: Fundamental Operation 26
  • 27. Advantages of Link State Routing  Fast, loopless convergence: Rapid new-information transfer via flooding Local computation of shortest path tree  Supports precise and multiple metrics  Full topology database ⇒ eliminates long convergence time of DV protocols for unequal cost links  One DV database per metric (!) vs small overhead per metric in LSP  Supports multiple paths to a destination  Enables load splitting, which is known to be efficient (less congestion)  Gives smoother rerouting on failure of one path (reliability)  Better representation of external routes  Not limited by “infinity” of DV protocols Computation for N routers is O(N logN) versus O(N^2) for DVCopyright © 1998 Internet Routing Protocols: Fundamental Operation 27
  • 28. Open Shortest Path First (OSPF)  Operates within an autonomous system (AS)  Therefore, example of an interior gateway protocol (IGP)  Based on the link-state routing algorithmCopyright © 1998 Internet Routing Protocols: Fundamental Operation 28
  • 29. OSPF Features (1)  Runs directly over IP (with protocol field = 189)  Organized into “ASs” and “areas ”  Area border routers summarize reachable destinations, so that area routers can pick a more optimal exit point Legend External world AS Boundary routers Area 1 Area 2 Area backbone routers Area border routers OSPF Autonomous System (AS) Designated routers Area 3 Area routersCopyright © 1998 Internet Routing Protocols: Fundamental Operation 29
  • 30. OSPF Features (2)  Reduces adjacencies over broadcast networks by electing a designated router (DR) and backup designated router (BDR)Copyright © 1998 Internet Routing Protocols: Fundamental Operation 30
  • 31. OSPF Features (3)  Five link state advertisement (LSA) types:  Router links: links that start from the advertising router (flooded in an area)  Network links:advertised by designated routers for transit networks (broadcast and non-broadcast)  Network summary links: networks reachable from outside the area via area border router  Boundary router summary links: path from generating area backbone router to AS boundary routers  External links: path from AS bdry router to destinations outside ASCopyright © 1998 Internet Routing Protocols: Fundamental Operation 31
  • 32. Border Gateway Protocol (BGP)  Operates across autonomous systems (AS)  Therefore, example of an exterior gateway protocol (EGP)  Based on the distance-vector routing algorithm, but modified to eliminate looping (and its associated problems)Copyright © 1998 Internet Routing Protocols: Fundamental Operation 32
  • 33. BGP Features  Runs over TCP, which ensures reliable communication  Eliminates need for complex error recovery mechanisms  Makes BGP message size independent of IP pkt size  BGP routers transmit a sequence of AS #s along the path to a destination Intermediate router on detecting its AS # terminates the path to prevent a loop  Allows for policy routing:  BGP router uses configuration info to rank routes  Important when determining transit rules between ASsCopyright © 1998 Internet Routing Protocols: Fundamental Operation 33

×