Fundamentals of Systems

  • View
    18

  • Download
    0

Embed Size (px)

DESCRIPTION

Fundamentals of Systems. Lecture 23: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) Basically ripped off from slides used by Srini Seshan and Dave Anderson 15-441Fall’06. Outline. Review/Overview Routing Hierarchy Distance Vector Link State. - PowerPoint PPT Presentation

Text of Fundamentals of Systems

  • Fundamentals of SystemsLecture 23: Intra-Domain Routing

    RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

    Basically ripped off from slides used by Srini Seshan and Dave Anderson 15-441Fall06

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Outline

    Review/Overview Routing HierarchyDistance VectorLink State

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*IP ForwardingThe Story So Far IP addresses are structure to reflect Internet structureIP packet headers carry these addressesWhen Packet Arrives at RouterExamine header to determine intended destinationLook up in table to determine next hop in pathSend packet out appropriate portThis/next lectureHow to generate the forwarding table

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Graph ModelRepresent each router as nodeDirect link between routers represented by edgeSymmetric links undirected graphEdge cost c(x,y) denotes measure of difficulty of using linkdelay, $ cost, or congestion levelTaskDetermine least cost path from every node to every other nodePath cost d(x,y) = sum of link costsAEFCDB23641113

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Routes from Node APropertiesSome set of shortest paths forms treeShortest path spanning treeSolution not uniqueE.g., A-E-F-C-D also has cost 7AEFCDB23641113

    Forwarding Table for ADestCostNext HopA0AB4BC6ED7BE2EF5E

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Ways to Compute Shortest PathsCentralizedCollect graph structure in one placeUse standard graph algorithmDisseminate routing tables

    Link-stateEvery node collects complete graph structureEach computes shortest paths from itEach generates own routing table

    Distance-vectorNo one has copy of graphNodes construct their own tables iterativelyEach sends information about its table to neighbors

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Outline

    Review/Overview Routing Hierarchy Distance VectorLink State

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Routing HierarchiesFlat routing doesnt scaleStorage Each node cannot be expected to store routes to every destination (or destination network)Convergence times increaseCommunication Total message count increasesKey observationNeed less information with increasing distance to destinationNeed lower diameters networksSolution: area hierarchy

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*AreasDivide network into areasAreas can have nested sub-areasHierarchically address nodes in a networkSequentially number top-level areasSub-areas of area are labeled relative to that areaNodes are numbered relative to the smallest containing area

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Routing HierarchyPartition Network into AreasWithin areaEach node has routes to every other nodeOutside areaEach node has routes for other top-level areas onlyInter-area packets are routed to nearest appropriate border routerConstraint: no path between two sub-areas of an area can exit that area

    Backbone AreasLower-level AreasArea-BorderRouter

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Area Hierarchy Addressing1231.11.22.12.23.13.22.2.12.2.21.2.11.2.2

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Path Sub-optimality1231.11.22.12.23.13.22.2.13 hop red pathvs.2 hop green pathstartend3.2.11.2.1Can result in sub-optimal paths

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Outline

    Review/OverviewRouting HierarchyDistance VectorLink State

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance-Vector MethodIdeaAt any time, have cost/next hop of best known path to destinationUse cost when no path knownInitiallyOnly have entries for directly connected nodesAEFCDB23641113

    Initial Table for ADestCostNext HopA0AB4BCDE2EF6F

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance-Vector UpdateUpdate(x,y,z)d c(x,z) + d(z,y)# Cost of path from x to y with first hop zif d < d(x,y)# Found better pathreturn d,z# Updated cost / next hopelsereturn d(x,y), nexthop(x,y)# Existing cost / next hopxzyc(x,z)d(z,y)d(x,y)

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*AlgorithmBellman-Ford algorithmRepeatFor every node xFor every neighbor zFor every destination yd(x,y) Update(x,y,z)Until converge

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*StartAEFCDB23641113Optimum 1-hop paths

    Table for ADstCstHopA0AB4BCDE2EF6F

    Table for BDstCstHopA4AB0BCD3DEF1F

    Table for CDstCstHopABC0CD1DEF1F

    Table for DDstCstHopAB3BC1CD0DEF

    Table for EDstCstHopA2ABCDE0EF3F

    Table for FDstCstHopA6AB1BC1CDE3EF0F

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Iteration #1Optimum 2-hop pathsAEFCDB23641113

    Table for ADstCstHopA0AB4BC7FD7BE2EF5E

    Table for BDstCstHopA4AB0BC2FD3DE4FF1F

    Table for CDstCstHopA7FB2FC0CD1DE4FF1F

    Table for DDstCstHopA7BB3BC1CD0DEF2C

    Table for EDstCstHopA2AB4FC4FDE0EF3F

    Table for FDstCstHopA5BB1BC1CD2CE3EF0F

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Iteration #2Optimum 3-hop pathsAEFCDB23641113

    Table for ADstCstHopA0AB4BC6ED7BE2EF5E

    Table for BDstCstHopA4AB0BC2FD3DE4FF1F

    Table for CDstCstHopA6FB2FC0CD1DE4FF1F

    Table for DDstCstHopA7BB3BC1CD0DE5CF2C

    Table for EDstCstHopA2AB4FC4FD5FE0EF3F

    Table for FDstCstHopA5BB1BC1CD2CE3EF0F

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance Vector: Link Cost ChangesLink cost changes:Node detects local link cost change Updates distance table If cost change in least cost path, notify neighborsalgorithmterminatesgoodnews travelsfast

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance Vector: Link Cost ChangesLink cost changes:Good news travels fast Bad news travels slow - count to infinity problem!algorithmcontinueson!

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance Vector: Split HorizonIf Z routes through Y to get to X :Z does not advertise its route to X back to Y

    algorithmterminates???

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Distance Vector: Poison ReverseIf Z routes through Y to get to X :Z tells Y its (Zs) distance to X is infinite (so Y wont route to X via Z)Eliminates some possible timeouts with split horizonWill this completely solve count to infinity problem? algorithmterminates

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Poison Reverse FailuresIterations dont convergeCount to infinitySolutionMake infinity smallerWhat is upper bound on maximum path length?ForcedUpdateForcedUpdateForcedUpdateBetterRouteForcedUpdateForcedUpdate

    Table for ADstCstHopC7F

    Table for BDstCstHopC8A

    Table for FDstCstHopC1C

    Table for FDstCstHopC

    Table for ADstCstHopC

    Table for BDstCstHopC14A

    Table for DDstCstHopC9B

    Table for ADstCstHopC13D

    Table for DDstCstHopC15B

    Table for ADstCstHopC19D

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Routing Information Protocol (RIP)Earliest IP routing protocol (1982 BSD)Current standard is version 2 (RFC 1723)FeaturesEvery link has cost 1Infinity = 16Limits to networks where everything reachable within 15 hopsSending UpdatesEvery router listens for updates on UDP port 520RIP message can contain entries for up to 25 table entries

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*RIP UpdatesInitialWhen router first starts, asks for copy of table for every neighborUses it to iteratively generate own tablePeriodicEvery 30 seconds, router sends copy of its table to each neighborNeighbors use to iteratively update their tablesTriggeredWhen ever an entry changes, send copy of entry to neighborsExcept for one causing update (split horizon rule) (*NOTE*)Neighbors use to update their tablesNot immediate, but slight delay to prevent cascading updates

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*RIP Staleness / Oscillation ControlSmall InfinityCount to infinity doesnt take very longTimersUpdate: 30 seconds (Periodic advertisementsTime-out: 180s (Route is dead if update not heard within this period)Flush: 120s (Wait after time-out before deleting, during this time advertised as infinity)Hold-down [Not standard]: 90s, typical (Freeze unreachable route to prevent receiving dated information)BehaviorWhen router or link fails, can take minutes to stabilize

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Outline

    Review/OverviewRouting HierarchyDistance VectorLink State

    Lecture 10: Intra-Domain Routing

  • 9/28/2006Lecture 10: Intra-Domain Routing*Link State Protocol ConceptEvery node gets complete copy of graphEvery node floods network with data about its outgoing linksEvery node computes routes to every other nodeUsing single-source, shortest-path algorithmProcess performed whenever neededWhen connections die / reappear

    Lectur