WilliamStallingsDataandComputerCommunications7thEditionChapter19InternetworkOperation19.1Multicasting组播AddressesthatrefertogroupofhostsononeormorenetworksUsesMultimedia“broadcast”TeleconferencingDatabaseDistributedcomputingRealtimeworkgroupsExampleConfig组播服务器组成员路由器局域网路由器链路BroadcastandMultipleUnicastBroadcastacopyofpackettoeachnetworkRequires13copiesofpacketMultipleUnicastSendpacketonlytonetworksthathavehostsingroup11packetsTrueMulticastDetermineleastcostpathtoeachnetworkthathashostingroupTransmitsinglepacketalongspanningtreeRoutersreplicatepacketsatbranchpointsofspanningtree8packetsrequiredMulticastExampleInternetGroupManagementProtocol(IGMP)互联网组管理协议P622RFC3376HostandrouterexchangeofmulticastgroupinfoDefinestwoIGMPmessagetypes:MembershipQuery询问:sentbyamulticastrouterMembershipReport报告:sentbyahostIGMPisagroupmanagementprotocol.Ithelpsamulticastroutercreateandupdatealistofloyalmembersrelatedtoeachrouterinterface.19.2RoutingProtocolsp626Inasimpleinternet,afixedroutingschemeispossible.Inmorecomplexinternets,dynamiccooperationisneededamongtherouters.RoutersexchangeroutinginformationusingroutingprotocolAutonomousSystems(AS)自治系统1.Setofroutersandnetworksmanagedbysingleorganization2.Groupofroutersexchangeinformationviaacommonroutingprotocol3.AconnectednetworkAutonomoussystemsInteriorRouterProtocol(IRP)ExteriorRoutingProtocol(ERP)IRP(InteriorRouterProtocol,内部路由器协议)PassesroutinginformationbetweenrouterswithinASe.g.interiorgatewayprotocol,IGPERP(exteriorrouterprotocol,外部路由器协议)RoutersneedsomeinfoaboutnetworksoutsidetheirASe.g.exteriorgatewayprotocol,EGPPopularroutingprotocolsApproachestoRoutingp627threeapproaches:distance-vectorrouting,link-staterouting,andpath-vectorrouting.Distance-vector:距离向量路由选择Eachnode(routerorhost)exchangeinformationwithneighboringnodesinthesamenetworkNodemaintainsvectoroflinkcostsforeachdirectlyattachednetworkanddistanceandnext-hopvectorsforeachdestinationfirstgenerationroutingalgorithmforARPANETUsedforRIP(Routerinformationprotocol)ApproachestoRouting–Link-state:链路状态路由选择Whenrouterinitialized,itdetermineslinkcostoneachinterfaceAdvertisessetoflinkcoststoallotherroutersintopologyEachroutercanconstructtopologyofentireconfigurationRouterconstructsroutingtable,listingfirsthoptoeachdestinationUsedinsecondgenerationroutingalgorithmforARPANETUsedforOSPF(Openshortestpathfirst)protocolApproachestoRouting––Path-vector:路径向量路由选择ProvideinformationaboutwhichnetworkscanbereachedbyagivenrouterandASscrossedtogetthereDoesnotincludedistanceorcostestimateEachblockofinformationlistsallASsvisitedonthisrouteExteriorRouterProtocolsPathvectorpacketsBorderGatewayProtocol(BGP)边界网关协议P629PreferredERPfortheInternetBGPwasdesignedtoallowrouters,calledgatewaysinthestandard,indifferentAsstocooperateintheexchangeofroutinginformation.BGPMessagesMessagessent•Open•Update•Keepalive•Notification不可行撤销BGPMessagesRouterfirstOpensTCPconnectiontotheneighborThensendsOpenmessageIncludesholdtime保持时间一方从另一方收到保活或更新报文前经过的最大秒数。若路由器在此期间内未收到,认为对方不工作。KeepAlivemessage保活报文TotellotherroutersthatthisrouterisstillhereUpdatemessage更新报文InfoaboutsingleroutesthroughinternetListofroutesbeingwithdrawnBGPMessagesNotificationMessage通知报文MessageheadererrorOpenmessageerrorUpdatemessageerrorHoldtimeexpiredFinitestatemachineerrorCeaseBGPusestheservicesofTCPonport179.OpenShortestPathFirstProtocol–OSPF开放最短路径优先协议p634IRPofInternetUsesLinkStateRoutingRoutecomputedonleastcostbasedonusercost(Dijkstraalgorithm)OSPFpacketsareencapsulatedinIPdatagrams.OpenShortestPathFirstTopologystoredasdirectedgraphVertices顶点ornodes节点RouterNetworkTransit转送网络Stub残桩网络EdgesSampleASDirectedGraphofAS•Arcs(弧)arelabeledwiththecost•Arcsleadingfromnetworkstoroutersalwayshaveacostof0SPFTreeforRouter6RoutingTableforR619.3IntegratesServicesArchitectureISA综合服务体系结构p637ISA,intendtoprovideQoS(qualityofservice)transportTrafficonanetworkcanbedividedintotwobroadcategories:Elastic弹性通信量Cancopewithwidechangesindelayand/orthroughputFTPsensitivetothroughput,E-MailinsensitivetodelayNetworkManagementsensitivetodelayWebsensitivetodelayInelastic非弹性通信量Doesnoteasilyadapttovariations.E.g.realtimetrafficFigure19.10ISAimplementedinRouter路由器中综合服务体系结构的实现P642管理代理准许控制预约协议通信量控制数据库路由选择协议路由选择数据库分类程序和路由选择分组调度程序尽最大努力排队QoS排队TokenBucketTrafficSpecification令牌桶通信量规约Tokenreplenishment(补给)rateRContinuallysustainable(可持续的)datarateBucketsizeBAmountthatdataratecanexceedRforshortperiodDuringtimeperiodTamountofdatasentcannotexceedRT+BTokenBucketScheme令牌桶机制令牌生成器令牌补充速率R1.路由器以预定速率投放令牌桶的大小为Bbit到达的分组离开的分组2.令牌可以累积到桶的大小,丢弃超出的令牌3.通行量寻求网络的许可4.路由器的队列调节器要求令牌的数量等于下一个分组的尺寸5.如果令牌足够,分组排队输出6.如果令牌不够,分组或者被标记为超出的,缓存等待稍后传输,或者被丢弃。调节器ResourceReservationProtocol:RSVP资源预约协议P647RFC2205TopreventcongestionbyallowingapplicationstoreservenetworkresourcesatagivenQoSUnicast(单播)Ifroutercannotmeetrequest,applicationinformedMulticast(组播)ismoredemandingMaybereduced