• 415.00 KB
  • 40页

第05章 IP交付和路由选择ppt课件.ppt

  • 40页
  • 当前文档由用户上传发布,收益归属用户
  1. 1、本文档共5页,可阅读全部内容。
  2. 2、本文档内容版权归属内容提供方,所产生的收益全部归内容提供方所有。如果您对本文有版权争议,可选择认领,认领后既往收益都归您。
  3. 3、本文档由用户上传,本站不保证质量和数量令人满意,可能有诸多瑕疵,付费之前,请仔细先通过免费阅读内容等途径辨别内容交易风险。如存在严重挂羊头卖狗肉之情形,可联系本站下载客服投诉处理。
  4. 文档侵权举报电话:19940600175。
Chapter5DeliveryandRoutingofIPPacketsConnectionDeliveryRoutingmethodsStaticvs.dynamicroutingRoutingtableandroutingmoduleClasslessaddressing:CIDR1 ArchitectureoftheInternetInformation:IPpacketNode:routerChannel:physicalnetworkSelectthepathForwardIPpacketsRRRRRR2 DeliveryandRoutingDelivery(交付,递交)对分组的物理转发Routing(路由选择,选路)为分组寻找路径Routedprotocol:沿选定的路径交付分组Routingprotocol:寻找到达目的的最佳路径Route1Route2SourceDestinationIP协议Route,路由路径Routing,路由路由选择选路3 5.1Connection-orientedvs.ConnectionlessServicesService(服务)Networkapplication:业务OSI/RM:下层为上层提供的一组操作Thischapter:通信协议面向连接无连接通信过程建立连接交付分组终止连接交付分组路由选择仅在建立连接时选路每个分组独立选路传输路径相同可以不同4 DiscussionIP分组传输环境多个网络多个路由器多条可能的路径IP通信——无连接通信多种网络都能满足的通信方式允许多种选路策略(如:带宽、延时)尽最大努力交付,best-effortdelivery差异:通信能力、分组长度、延时独立选路5 5.2Directvs.IndirectDeliveryDirectdelivery(直接交付)分组目的与分组的发送接口在同一IP网络中Indirectdelivery(间接交付)分组目的与分组的发送接口在不同IP网络中Net1Net2SD1D2directdeliveryindirectdeliverydirectdelivery6 DeliveryMethod分组目的IP与其发送接口是否在同一IP网络中?目的IP&发送口掩码==发送口IP&发送口掩码相等:直接交付不等:间接交付Operation——地址映射:IP地址物理地址直接交付:目的IP地址物理地址间接交付:下一跳IP地址物理地址?ARP7 Net1Net2Net3IPAIP11IP12IP21IP22IPBNextHop(下一跳)SrcIP=IPA,DstIP=IPB1stdelivery:2nddelivery:3thdelivery:indirect,Next-hopIP=IP11indirect,Next-hopIP=IP21direct,DstIP=IPB主机A的默认网关8 IndirectDeliveryConfigurationoftheHostWindows使用TCP/IP与网外通信时使用的间接交付地址,一般设置为可与外网进行通信的路由器。命令:winipcfg(ipconfig)9 Discussion一次交付过程0或多个间接交付+1个直接交付(最后的交付)分组:(源IP地址,目的IP地址)保持不变帧:(源物理地址,目的物理地址)逐跳改变Net1Net2Net3AB11122122(IPA,IPB)(PhA,Ph11)(IPA,IPB)(Ph12,Ph21)(IPA,IPB)(Ph22,PhB)10 思考下图所示的以太网中,哪几对主机间能进行IP通信?哪几对不能进行IP通信?为什么?SolutionIP网内:直接交付目的IP地址IP网间:间接交付下一跳IP地址(路由器)能通信:AB,CD不能通信:IP网间,没有路由器200.1.1.1/24200.1.1.2/24200.1.2.1/24200.1.2.2/24ABCD11 5.3RoutingMethods2categories:basedonwhenandhowtheroutesarediscoveredProactiverouting(先应式路由选择)Table-drivenrouting(表驱动路由选择)Routingtable(路由选择表)Reactiverouting(反应式路由选择)On-demandrouting12 Table-DrivenRoutingIdea使用尽可能少的信息实现选路InformationforroutingDestinationHowtoget?节约路由表的存储空间,提高查表效率简化路由表,每个路由器独立选路Network-specificroutingNext-hoprouting13 ExampleDst.NetworkNext-hopAddressIPMaskN1Mask1-N2Mask2I12N3Mask3I12N4Mask4I13Dst.NetworkNext-hopAddressIPMaskN1Mask1I21N2Mask2-N3Mask3-N4Mask4I21I11I12I13I21I22I42I41I31I32Net1N1,Mask1Net2N2,Mask2Net4N4,Mask4Net3N3,Mask314 Discussion路由表的大小只与网络的个数有关,与每个网络的大小(包含的主机数多少)无关路由器独立选路,从Net1到Net2的路径可能与从Net2到Net1的路径不是同一条只有最后一个路由器才知道目的主机是否存在Net1Net2ADBCENet1ABCNet2Net1ADENet215 Host-specificroutingArouteforaspecifichostFeatureHostmask:all1sFunctionRoutecheckSecurityManagementNet2I2,Mask2Net3I3,Mask3I22I31Net1I1,Mask1I32I21I12I11IAIBMaskIPI12Mask3I3-Mask1I1Next-hopAddressDst.NetworkI11/32IBNet3HostB16 DefaultroutingUseadefaultrouteifnoentryfordestinationnetworkintheroutingtableFeatureDestinationnetworkaddress=0.0.0.0Destinationnetworkmask=0.0.0.0FunctionMaketheroutingtablesmallerAlotofroutinginformationishidden17 MaskIPI130.0.0.00.0.0.0-Mask2I2-Mask1I1Next-hopAddressDst.NetworkExampleHostRouterRestoftheInternetNet1I1,Mask1Net2I2,Mask2I13I12I21I11DefaultRouterMaskIP地址I130.0.0.00.0.0.0I12Mask2I2-Mask1I1Next-hopAddressDst.Network18 MaskIPI22/00.0.0.0-Mask1I1Next-hopAddressDst.Network-Mask2I2MaskIPI21/00.0.0.0-Mask2I2Next-hopAddressDst.Network-Mask3I3思考主机和路由器的默认路由设置Net1I1,Mask1Net2I2,Mask2I31I11I21I22Net4Net3I3,Mask3Net4I4,Mask4Routingloops19 5.4Staticvs.DynamicRoutingStaticrouting(静态路由选择)ArouteisformedandupdatedmanuallyAdvantages:lowprocessoroverhead,nobandwidthutilization,secure,andpredictabilityDisadvantages:highmaintenance,noadaptabilityDynamicrouting(动态路由选择)ArouteisdiscoveredandupdatedbyoneofthedynamicroutingprotocolsAdvantages:highadaptability,lowmaintenanceDisadvantages:highprocessoroverhead,highbandwidthutilization20 5.5RoutingTableandRoutingModulePolicy:DirectdeliveryDefaultrouteNetwork-specificdeliveryHost-specificdelivery最长匹配(longestmatch)21 RoutingTableForwardingtable(转发表)Next-hopaddressDirectdelivery:destinationaddressIndirectdelivery:next-hopaddressMaskDestinationaddressNext-hopaddressFlagsReferencecountUseInter-face255.0.0.0…………124.0.0.0…………145.6.7.2…………UG…………4…………20……m2……22 Example:aHost’sRoutingTable23 Example1192.168.1.0/26192.168.1.80/28192.168.1.64/28RARCRB192.168.1.96/30192.168.1.100/3024 RoutingTableofRouterRARA#showiproute…………192.168.1.0/24isvariablysubnetted,6subnets,3masksC192.168.1.96/30isdirectlyconnected,serial1C192.168.1.100/30isdirectlyconnected,serial0R192.168.1.64/28[120/1]via192.168.1.97,serial1R192.168.1.80/28[120/1]via192.168.1.102,serial0C192.168.1.0/26isdirectlyconnected,ethernet0显示的顺序25 Questions在RA的路由表中查找到达以下目的的路径192.168.1.2192.168.1.65192.168.1.10526 Solution:192.168.1.2RA#showiproute…………192.168.1.0/24isvariablysubnetted,6subnets,3masksC192.168.1.96/30isdirectlyconnected,serial1C192.168.1.100/30isdirectlyconnected,serial0R192.168.1.64/28[120/1]via192.168.1.97,serial1R192.168.1.80/28[120/1]via192.168.1.102,serial0C192.168.1.0/26isdirectlyconnected,ethernet027 Solution:192.168.1.65RA#showiproute…………192.168.1.0/24isvariablysubnetted,6subnets,3masksC192.168.1.96/30isdirectlyconnected,serial1C192.168.1.100/30isdirectlyconnected,serial0R192.168.1.64/28[120/1]via192.168.1.97,serial1R192.168.1.80/28[120/1]via192.168.1.102,serial0C192.168.1.0/26isdirectlyconnected,ethernet028 Solution:192.168.1.105RA#showiproute…………192.168.1.0/24isvariablysubnetted,6subnets,3masksC192.168.1.96/30isdirectlyconnected,serial1C192.168.1.100/30isdirectlyconnected,serial0R192.168.1.64/28[120/1]via192.168.1.97,serial1R192.168.1.80/28[120/1]via192.168.1.102,serial0C192.168.1.0/26isdirectlyconnected,ethernet0没有匹配项,路由选择失败,发送ICMP差错报文29 Example2路由器R1的路由表如下:MaskDestinationNextHopInterface255.255.0.0110.70.0.0--m0255.255.0.0180.14.0.0--m2255.255.0.0190.17.0.0--m1255.255.0.0130.4.0.0190.17.6.5m1255.255.0.0135.9.0.0190.17.6.5m1255.255.0.0140.6.0.0180.14.2.5m20.0.0.00.0.0.0110.70.4.6m0根据以上路由表画出网络拓扑图。30 SolutionMaskDestinationNextHopInterface255.255.0.0110.70.0.0--m0255.255.0.0180.14.0.0--m2255.255.0.0190.17.0.0--m1255.255.0.0130.4.0.0190.17.6.5m1255.255.0.0135.9.0.0190.17.6.5m1255.255.0.0140.6.0.0180.14.2.5m20.0.0.00.0.0.0110.70.4.6m0130.4.0.0/16140.6.0.0/16因特网的其余部分190.17.0.0/16m1180.14.0.0/16m2110.70.0.0/16m0R16.52.54.6135.9.0.0/1631 5.6ClasslessAddressing:CIDRClasslessInter-DomainRouting无类别域间路由Aroutingtechnology,notaroutingprotocolRFC1518,RFC1519Function:reducethesizeoftheroutingtableHierarchicalandgeographicalroutingRouteaggregation(路由聚合)32 RouteAggregation202.4.5.0/24202.4.4.0/24202.4.5.0/24202.4.4.0/24R1R2R2R3IR1IR2IR1IR24:00000105:0000010254:1111111001014&254=45&254=4202.4.4.0/23IR2IR1R1Network/MaskNext-hop/24IR2/24IR2202.4.4.0202.4.5.033 聚合推论在R1上都通过同样的下一站路径,可以有多种组网结构如果把掩码再向左缩小1bit,则该表项能实现对.4、.5、.6、.7四个网络的寻址,条件是这四个网络的路径都通过同样的下一站。默认路由项是容纳所有网络的路由如果把连续的IP地址块合理地组织,可以在路由器中有效的合并选路项数。34 聚合应用合理的IP地址规划有效减少关键路由器选路表项,充分发挥路由器的转发性能隐藏网络结构自主管理网络边界使用路由器(即R2)与外界相连,在不改变原有IP地址范围的条件下,网络内部任意划分子网、改变拓扑结构等,都不会影响外部的路由器(即R1)选路表项。自主管理网络R1R235 RoutingTableSearchAlgorithmsClassfuladdressingTheroutingtableisdividedinto3partsbasedonclassA,B,andCEachaddresshasself-containedinformationthatfacilitatesroutingtablesearchingClasslessaddressingTheroutingtableisdividedinto32partsbasedonthesizeofprefixThesimplestmethod:longestmatch(最长匹配)Othermethods:tree,trie,…36 5.7Summary:Concept交付、路由选择面向连接、无连接协议直接交付、间接交付:地址映射路由表:作用、内容、查找规则路由类型网络拓扑:直连路由、非直连路由目的范围:主机路由、网络路由、默认路由获得方式:静态路由、动态路由37 Summary:Application根据网络拓扑或分组的源、目的IP地址判断直接交付和间接交付根据路由表查找到达给定目的的路径路由聚合38 ToreceiveIPPacketsHostRouter接收报文IP报文I1I2I3dIP与I1、I2、I3相符?丢弃dIP与I1、I2、I3不符接收报文IP报文I1I2I3dIP与I1、I2、I3相符?dIP与I1、I2、I3不符转发39 ToSendIPPackets选路表IP报文选路算法目的IP下一跳IPARP物理网NI接口直接投递下一跳IP=目的IP间接投递下一跳IP=中继IP发送报文目的物理地址IP报文40