版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 紙袋制作課件教學(xué)課件
- 防蜇課件教學(xué)課件
- 獲獎 課件教學(xué)課件
- 2024年度農(nóng)產(chǎn)品收購合同
- 2024年企業(yè)安全評價與咨詢服務(wù)合同
- 2024年度空氣能設(shè)備安裝與驗收合同
- 2024國際快遞服務(wù)全面合作協(xié)議
- 2024樁基工程施工合同范本樁基工程施工合同
- 2024年企業(yè)合并收購協(xié)議
- 2024個人租房的合同模板范本
- 《先輩們唱過的歌》 單元作業(yè)設(shè)計
- 民俗習(xí)慣的司法適用
- 實驗室安全準(zhǔn)入教育(通識A課程)學(xué)習(xí)通超星課后章節(jié)答案期末考試題庫2023年
- 《繪畫的構(gòu)圖》課件
- 三年級數(shù)學(xué)上冊第三單元《測量》課件
- 高支模施工難點
- 大學(xué)生勞動教育-合肥工業(yè)大學(xué)中國大學(xué)mooc課后章節(jié)答案期末考試題庫2023年
- 訴訟前民事調(diào)解委托書
- 孩子探視權(quán)起訴書
- 國家開放大學(xué)一網(wǎng)一平臺電大《當(dāng)代中國政治制度》形考任務(wù)1-4網(wǎng)考題庫及答案
- 無人機(jī)基礎(chǔ) 教案
評論
0/150
提交評論