版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年全国人大代表建言:推动碳资产变资本加快建设统一碳市场
- 2026年生物质电厂设备维护检修标准化手册
- 2026届浙江省宁波市海曙区三校联考初三第二学期综合练习(一)化学试题含解析
- 2026届福建省郊尾、枫亭五校教研小片区市级名校初三下学期第一次阶段考试(5月)化学试题含解析
- 辽宁省辽阳县重点名校2026届广东中考全真生物试题模拟试卷含解析
- 2026年广西南宁市天桃实验校联盟测试化学试题含解析
- 四川省乐山市2026年初三第二次调查研究考试化学试题含解析
- 云南省涧南彝族自治县市级名校2026届初三第三次月考化学试题含解析
- 2026年江西省抚州市宜黄县达标名校下学期初三化学试题第三次统一练习试题含解析
- 2026年液晶电视机开关电源电路故障快速诊断
- 2026年六安职业技术学院单招职业适应性考试题库附答案详解(预热题)
- 2026天津市津南区事业单位招聘37人考试参考试题及答案解析
- 2026年南京机电职业技术学院单招职业适应性测试题库(含答案详解)
- 2026年春节后复工复产“开工第一课”安全生产培训课件
- 专题学习《改革开放简史》
- 地下车库消防系统施工方案
- 灵活用工人员安全培训课件
- 用电安全进校园宣传课件
- 2026年中国速冻水饺市场运行(产业链、市场规模、价格等)现状及未来发展趋势分析
- (新教材)2026年人教版一年级下册数学 第二单元 20以内的退位减法 整 理和复习 课件
- 2026年无锡科技职业学院单招综合素质考试必刷测试卷必考题
评论
0/150
提交评论