版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度大型商業(yè)綜合體招商管理合同3篇
- 2025版門(mén)樓廣告位租賃與設(shè)計(jì)制作合同4篇
- 2025年度旅行社與旅游科技研發(fā)企業(yè)合作協(xié)議4篇
- 2025年按揭車(chē)輛交易糾紛調(diào)解服務(wù)合同模板2篇
- 2025年度美食廣場(chǎng)廚師團(tuán)隊(duì)承包與節(jié)假日活動(dòng)策劃服務(wù)協(xié)議3篇
- 2025年度個(gè)人分包合作協(xié)議(智能安防設(shè)施)4篇
- 2025版壓力罐施工與施工許可證申請(qǐng)合同3篇
- 2025年水利工程勞務(wù)分包合同環(huán)境保護(hù)與綠色施工規(guī)范3篇
- 二零二五版工業(yè)自動(dòng)化設(shè)備加工制造合同3篇
- 2025年高速公路服務(wù)區(qū)停車(chē)場(chǎng)及餐飲服務(wù)合同3篇
- 2024版?zhèn)€人私有房屋購(gòu)買(mǎi)合同
- 2024爆炸物運(yùn)輸安全保障協(xié)議版B版
- 《食品與食品》課件
- 讀書(shū)分享會(huì)《白夜行》
- 光伏工程施工組織設(shè)計(jì)
- DB4101-T 121-2024 類(lèi)家庭社會(huì)工作服務(wù)規(guī)范
- 化學(xué)纖維的鑒別與測(cè)試方法考核試卷
- 2024-2025學(xué)年全國(guó)中學(xué)生天文知識(shí)競(jìng)賽考試題庫(kù)(含答案)
- 臨床微生物檢查課件 第2章細(xì)菌的生理
- 作品著作權(quán)獨(dú)家授權(quán)協(xié)議(部分授權(quán))
- 取水泵站施工組織設(shè)計(jì)
評(píng)論
0/150
提交評(píng)論