網(wǎng)絡(luò)實(shí)驗(yàn)計(jì)算機(jī)網(wǎng)絡(luò)l_第1頁
網(wǎng)絡(luò)實(shí)驗(yàn)計(jì)算機(jī)網(wǎng)絡(luò)l_第2頁
網(wǎng)絡(luò)實(shí)驗(yàn)計(jì)算機(jī)網(wǎng)絡(luò)l_第3頁
網(wǎng)絡(luò)實(shí)驗(yàn)計(jì)算機(jī)網(wǎng)絡(luò)l_第4頁
網(wǎng)絡(luò)實(shí)驗(yàn)計(jì)算機(jī)網(wǎng)絡(luò)l_第5頁
已閱讀5頁,還剩48頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

ComputerNetworks

Lecture11JingXu(徐晶)Dept.ofElectronicsandInformationEng.HuazhongUniversityofScienceandTechnologyJuly.2012ProbleminChapter4:ThereIsMoreThanOneNetwork-2-ReviewIPmechanismsdealingwithheterogeneitydefineabest-effortservicemodelandprovideunreliabledatagramsdeliveryacommonpacketformat,andfragmentation/reassemblymechanismtoworkovernetworkswithdifferentMTUsaglobaladdressspaceforidentifyingallhosts,andARPmechanismtoworkovernetworkswithdifferentphysicaladdressingschemesIPmechanismsdealingwithscalehierarchicalaggregationinaddress,IPaddressesarepartitionedintonetworkandhostcomponents-3--4-Lecture9Chapter4.PacketSwitchingProblem:ThereIsMoreThanOneNetwork4.1SimpleInternetworking(IP)4.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)4.2.4Metrics4.2.5RoutingforMobileHosts4.3GlobalInternet4.4Multicast4.5MultiprotocolLabelSwitching(MPLS)4.6Summary-5-ForwardingandRoutingDataInDataOutControlPlaneDataPlaneQueueingRoutingRoutingMessagesRouteLookupForwardingTableRoutingTableRoutingMessagesRoutingtableandforwardingtableRoutingtableisbuiltupbytheroutingalgorithmsasaprecursortobuildingtheforwardingtablecontainsmappingsfromnetworknumberstonexthopsForwardingtableisusedwhenapacketisbeingforwardedandsomustcontainenoughinformationtoaccomplishtheforwardingfunctioncontainsthemappingfromanetworknumbertoanoutgoinginterfaceandsomeMACinformation,suchastheEthernetaddressofthenexthop-6-Routinginthissectionweareconsideringtheproblemofroutinginthecontextofsmalltomidsizednetworks,notforanetworkthesizeoftheInternet.RoutinginthissectionDoesthissolutionscale?NOdesignedfornetworksoffairlymodestsize—fewerthanahundrednodestheprotocolsdescribedinthissectionarecollectivelyknownasintradomainroutingprotocols,orinteriorgatewayprotocols(IGPs)-7--8-Lecture94.2Routing4.2.1NetworkasaGraphNetworkasagraphRoutingprotocols4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)4.2.4Metrics4.2.5RoutingforMobileHosts-9-4.2.1NetworkasaGraphAnetworkcanberepresentedbyagraphnode:routeredge:linkedgecost:cost,delay,…Routingisessentiallyaproblemofgraphtheorytofindoutthelower-costpathbetweenanytwonodes-10-uyxwvz2213112535Graph:G=(N,E)N=setofrouters={u,v,w,x,y,z}E=setoflinks={(u,v),(u,x),(v,x),(v,w),(x,w),(x,y),(w,y),(w,z),(y,z)}Graphabstraction-11-Graphabstraction:costsuyxwvz2213112535c(x,x’)=costoflink(x,x’)-e.g.,c(w,z)=5costcouldalwaysbe1,orinverselyrelatedtobandwidth,orinverselyrelatedtocongestionCostofpath(x1,x2,x3,…,xp)=c(x1,x2)+c(x2,x3)+…+c(xp-1,xp)Question:What’stheleast-costpathbetweenuandz?Solution:Routingalgorithm,findingleast-costpath-12-ShortestPathGeneralizedistancetoweightedsettingDigraphG=(V,E)withweightfunctionW:ER(assigningrealvaluestoedges)Weightofpathp=v2…vkisShortestpath=apathoftheminimumweightApplicationsstatic/dynamicnetworkroutingrobotmotionplanningmap/routegenerationintraffic-13-Shortest-PathProblems Shortest-PathproblemsSingle-source(single-destination).Findashortestpathfromagivensource(vertexs)toeachofthevertices.Single-pair.Giventwovertices,findashortestpathbetweenthem.Solutiontosingle-sourceproblemsolvesthisproblemefficiently,too.All-pairs.Findshortest-pathsforeverypairofvertices.Dynamicprogrammingalgorithm.-14-Shortest-PathProblems Shortest-PathProblemsingraphtheoryBi-direction,weightedwithrealnumberMoregeneralcasesTwoalgorithmsDijkstra'sAlgorithmExchangeinformationgloballyBellman-FordAlgorithmExchangeinformationamongpairsInfact,thepracticalalgorithmsdeployedinnetworkingismuchmoresimply-15-Lecture94.2Routing4.2.1NetworkasaGraphNetworkasagraphRoutingprotocols4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)4.2.4Metrics4.2.5RoutingforMobileHosts-16-RoutingProtocolRunsamongroutersbasedonaroutingalgorithmChallenges:distributed,dynamic,...ConsistsoftwopartstopologyinformationdisseminationroutecomputationTypesdistancevectorlinkstatepathvector-17-TopologyInformationDisseminationHowtoobtaintopologyinformationwhenanodestartsuporaddsalinktoothernode,itadvertisesitsconnectivityinformationanodeknowsfailureofitsneighbornodeoralinkbycontinualprobingwithcontrolpacketbeingawareofthatithasnotreceivedperiodictopologyinformationforseveralcycles-18-TopologyInformationDisseminationWhentodisseminatetopologyinformationperiodicdistributionfrequencyamountofinformationtriggeredupdatecausedbychangesoftopologyandroutes,e.g.,node/linkfailure,routeschanges-19-Lecture94.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)DistancevectorroutingRIPProtocol4.2.3LinkState(OSPF)4.2.4Metrics4.2.5RoutingforMobileHosts-20-Distance-VectorRoutingBasicideaAnodeconstructsavectorofdistances(costs)toallothernodesThendistributesthevectortoitsimmediateneighborsAndcomputesitsshortestpathstoallothernodesaccordingtothedistancevectorsreceivedEventuallygetscompleteroutingtableafterrecursivedistancevectorexchangesandcomputations-21-Distance-VectorRoutingStep1:anodeinitiallysetsacostof1toitsimmediateneighbors,and∞toallothernodesinitsdistancevectorStep2:thenodesendsitsdistancevectortoitsimmediateneighborsStep3:basedonreceiveddistancevectorfromitsimmediateneighborY,thenodeXcomputesnewdistancetoeachnode(e.g.Z)indicatedinY’svectorbyaddingitsdistancetoY(i.e.1)toY’sdistancetothatnode(e.g.Z)comparesthisnewdistancewithitsownone:ifshorter,replacesitsownoneandrecordsNextHopisY-22-Distance-VectorRouting:ExampleInitialdistancevectors A:(0,1,1,∞,1,1,∞) B:(1,0,1,∞,∞,∞,∞) C:(1,1,0,1,∞,∞,∞) E:(1,∞,∞,∞,0,∞,∞) F:(1,∞,∞,∞,∞,0,1)dst.costNextHopB1BC1CD∞-E1EF1FG∞-InitialroutingtableatnodeADistanceVector–LocalViewDestCostNextHopB1BC1CD–E1EF1FG–23DestCostNextHopA1AC1CD–E–F–G–DestCostNextHopA1AB1BD1DE–F–G–DestCostNextHopA–B–C1CE–F–G1GDestCostNextHopA1AB–C–D–F–G–DestCostNextHopA1AB–C–D–E–G1GDestCostNextHopA–B–C–D1DE–F1FDistanceVector–1stUpdateDestCostNextHopB1BC1CD2CE1EF1FG2F24DestCostNextHopA1AC1CD2CE2AF2AG–DestCostNextHopA1AB1BD1DE2AF2AG2GDestCostNextHopA2CB2CC1CE–F2GG1GDestCostNextHopA1AB2AC2AD–F2AG–DestCostNextHopA1AB2AC2AD2GE2EG1GDestCostNextHopA2FB–C2DD1DE–F1FDistanceVector–2ndUpdateDestCostNextHopB1BC1CD2CE1EF1FG2F25DestCostNextHopA1AC1CD2CE2AF2AG3CDestCostNextHopA1AB1BD1DE2AF2AG2GDestCostNextHopA2CB2CC1CE3CF2GG1GDestCostNextHopA1AB2AC2AD3AF2AG3ADestCostNextHopA1AB2AC2AD2GE2EG1GDestCostNextHopA2FB3DC2DD1DE3FF1F-26-Example(contd.)dst.costNextHopB1BC1CD2CE1EF1FG2FFinalroutingtableatnodeAdst.costNextHopB1BC1CD∞-E1EF1FG∞-InitialroutingtableatnodeA-27-PracticalissuesHowtodistributetheroutingupdates?Solution1:PeriodicupdateEachnodeautomaticallysendsanupdatemessageineveryperiodevenifnothinghaschanged.Thisservestolettheothernodesknowthatthisnodeisstillrunning.Italsomakessurethattheykeepgettinginformationthattheymayneediftheircurrentroutesbecomeunviable.Thefrequency:secondstominutes.-28-PracticalissuesHowtodistributetheroutingupdates?Solution2:TriggeredupdateThemechanismhappenswheneveranodereceivesanupdatefromoneofitsneighborsWheneveranode’sroutingtablechanges,itsendsanupdatetoitsneighborsThismayleadtoachangeintheirtables,causingthemtosendanupdatetotheirneighbors.AadvertisesadistanceofinftytoEandupdatesitsneighborsCadvertisesadistanceof2toEviaABadvertisesadistanceof3toEviaCAupdatesitstableandadvertisesadistanceof4viaBCupdatesitstableandadvertisesadistanceof5viaA…Count-to-InfinityProblem29SolutionsforCount-to-InfinityProblemSolA:UseamaximumhopcountinsteadofinfinitySolB:SplitHorizonDonotsendupdatesontheneighborthatprovidedtheinfoforaparticularroute.E.g.:BdoesnotsendanupdateforEtoA,sinceitlearnedaboutEfromASolC:SplitHorizonwithPoisonReverseBadvertisesarouteofcostinfinitytoEtoensurethatBdoesnotuseBtogettoESolutionsdonotalwaysworkforloopswithmorethan3nodes30-31-Lecture94.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)DistancevectorroutingRIPProtocol4.2.3LinkState(OSPF)4.2.4Metrics4.2.5RoutingforMobileHosts-32-RoutingInformationProtocol(RIP)Anroutingprotocolbuiltondistance-vectoralgorithmdistancevectoralgorithmincludedinBSD-UNIXDistributionin1982distancemetric:#ofhops(max=15hops)Arouteradvertisesthecostsofreachingnetworksratherthantheonesofreachingotherrouters-33-RIPMessageFormat-34-FeaturesofRIPVersion:1,and2Supportsmultipleprotocolfamilies(notjustIP)Topologyinformationdisseminationevery30secondswheneveranupdatefromanotherroutercausesaroutertochangeitsroutingtableCosts(metrics)associatedwithlinksalllinkcostsequal1validdistancesare1through15,with16denotinginfinity-35-Lecture94.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)ReliablefloodingRoutecalculationOSPFprotocol4.2.4Metrics4.2.5RoutingforMobileHosts-36-Link-StateRoutingBasicideaeverynodeknowshowtoreachitsdirectlyconnectedneighbors(linkstate),andadvertisesthisknowledgetoeveryothernodes,soeverynodecanobtainacompletemapofthenetworktobuilditsroutingtableReliesontwomechanismsreliablefloodingoflinkstatescalculationofroutesbasedonthecollectionofalltheaccumulatedlinkstates-37-FloodingFlooding:advertisedmessagesreachallthenodesReliableFloodingLinkstatemessageLink-statepacket,LSPtheIDofthenodethatcreatedthelinkstatemessagealistof<AdjacentNode,Cost>pairsinwhichthecostisassociatedwiththelinktothatadjacentnodeasequencenumberatimetoliveforthismessageHowtomakethelinkstatefloodingreliableusingacknowledgementsandretransmissionsbysequencenumbernotsendingthemessageback-38-ReliableFlooding(contd.)Newlinkstatesmessagesfloodedasquicklyaspossible,andoldonesremovedasquicklyaspossiblebytheusageofsequencenumberandTTLlongsequencenumberper-hopdecrementofTTLMinimizethetotalamountoflinkstatemessagesfloodedaroundthenetworkperiodicgenerationwithlongtimertriggeredondemand-39--40-TriggerofLinkStateFloodingSimilartoRIP,newlinkstatemessageisgeneratedwhenaperiodictimeexpires,orchangeoftopologyoccursDetectionoftopologychangenewnode/link:byitsadvertisementoflinkstatemessagefailureofnode/linkbylink-layerprotocolperiodic“hello”messageexchange-41-Lecture94.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)ReliablefloodingRoutecalculationOSPFprotocol4.2.4Metrics4.2.5RoutingforMobileHosts-42-RouteCalculationBasedonDijkstraalgorithmNotation s:thenodeexecutingthealgorithm N:thesetofallnodesinthenetwork l(i,j):costassociatedwiththelinkbetweennodesi,j∈N M:thesetofnodescurrentlyincorporatedbythealgorithm C(n):thecostofthepathfromstonodenM={s}foreachninN-{s} C(n)=l(s,n)while(M≠N) findoutwsuchthatC(w)istheminimumforallnodesw∈(N-M) M=M∪{w} foreachn∈(N-M) C(n)=MIN(C(n),C(w)+l(w,n))-43-RealizationofDijkstraAlgorithm:

ForwardSearchEachroutermaintainstwolists,i.e.,TentativeandConfirmedEachlistcontainsasetofentriesintheformof(Destination,Cost,NextHop)FinalConfirmedlististheexpectedresult–routingtableatthisrouterStepsatanode(seenextpage)InitializetheConfirmedwiththeentry(Myself,0,-)SelectthelinkstatelistofnodeNextthatisjustaddedtotheConfirmedFor(eachNeighborofNext) theCosttothisNeighbor=thecostfrommyselftoNext+thecostfromNexttoNeighbor -IfNeighborisonneithertheConfirmednortheTentative,thenadd(Neighbor,Cost,NextHop)totheTentative,whereNextHopisthedirectionIgotoreachNext -IfNeighborisontheTentative,andtheCostislessthanthecurrentlylistedcostforNeighbor,thenreplacethecurrententrywith(Neighbor,Cost,NextHop),whereNextHopisthedirectionIgotoreachNextIftheTentativeisempty,stop;otherwise,picktheentryfromtheTentativewiththelowestcost,moveittotheConfirmed,andreturntostep2-45-ExampleofForwardSearchStep1234567Confirmed(D,0,-)(D,0,-)(D,0,-)(C,2,C)(D,0,-)(C,2,C)(D,0,-)(C,2,C)(B,5,C)(D,0,-)(C,2,C)(B,5,C)(D,0,-)(C,2,C)(B,5,C)(A,10,C)Tentative(B,11,B)(C,2,C)(B,11,B)(B,5,C)(A,12,C)(A,12,C)(A,10,C)RouterD-46-CommentsonLink-StateRoutingMeritsstabilizedquicklydoesnotgeneratemuchtrafficrespondsrapidlytotopologychangesDemeritstheamountoflinkstateinformationDifferencebetweenthelink-stateandthedistance-vectoralgorithmslink-state:eachnodetellsallothernodeonlythestateofitsdirectlyconnectedlinksdistance-vector:eachnodetellsitsdirectlyconnectednodesbuteverythingithaslearnedaboutdistances-47-Lecture94.2Routing4.2.1NetworkasaGraph4.2.2DistanceVector(RIP)4.2.3LinkState(OSPF)ReliablefloodingRoutecalculationOSPFprotocol4.2.4Metrics4.2.5RoutingforMobileHosts-48-OSPF(OpenShortestPathFirst)“open”:publiclyavailableusesLinkStatealgorithmLSpacketdisseminationtopologymapateachnoderoutecomputationusingDijkstra’salgorithmOSPFadvertisementcarriesoneentryp

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論