©1999,CiscoSystems,Inc.2-1第15章路由选择和路由选择协议ICND—2-2主要内容介绍路由选择和路由选择协议及区别,介绍距离矢量、链路状态和混合型三种路由选择方式,及如何解决路由选择问题。ICND—2-315.1路由选择基础172.16.1.010.120.2.0ICND—2-415.1路由选择基础NetworkProtocolDestinationNetworkConnectedLearned10.120.2.0172.16.1.0ExitInterfaceE0S0RoutedProtocol:IP•Routersmustlearndestinationsthatarenotdirectlyconnected172.16.1.010.120.2.0E0S0ICND—2-5WhatisaRoutingProtocol?Routingprotocolsareusedbetweenrouterstodeterminepathsandmaintainroutingtables.Oncethepathisdeterminedaroutercanroutearoutedprotocol.NetworkProtocolDestinationNetworkConnectedRIPIGRP10.120.2.0172.16.2.0172.17.3.0ExitInterfaceE0S0S1RoutedProtocol:IPRoutingprotocol:RIP,IGRP172.17.3.0172.16.1.010.120.2.0E0S0ICND—2-6StaticRouteUsesaroutethatanetworkadministratorentersintotheroutermanually15.2StaticRoutesICND—2-7172.16.2.1SO1、StaticRoutes172.16.1.0B172.16.2.2NetworkAConfigureunidirectionalstaticroutestoandfromastubnetworktoallowcommunicationstooccur.BStubNetworkICND—2-8DefinesapathtoanIPdestinationnetworkorsubnetRouter(config)#iproutenetwork[mask]{address|interface}[distance][permanent]StaticRouteConfigurationICND—2-9StubNetworkiproute172.16.1.0255.255.255.0172.16.2.1172.16.2.1SOStaticRouteExample172.16.1.0B172.16.2.2NetworkABThisisaunidirectionalroute.Youmusthavearouteconfiguredintheoppositedirection.ICND—2-10StubNetworkiproute0.0.0.00.0.0.0172.16.2.22、DefaultRoutes172.16.2.1SO172.16.1.0B172.16.2.2NetworkABThisrouteallowsthestubnetworktoreachallknownnetworksbeyondrouterA.ICND—2-113、路由的验证及故障排除1)是否正确配置showrunning-config2)查看路由表showiproute3)检查端口状态showinterface4)检验IP配置,并使用ping测试连通。ICND—2-12DynamicRouteUsesaroutethatanetworkroutingprotocoladjustsautomaticallyfortopologyortrafficchanges15.3DynamicRoutesOverviewICND—2-1315.4ClassesofRoutingProtocolsDistanceVectorHybridRoutingLinkStateCBADCDBA例:RIP、IGRP例:EIGRP例:OSPFICND—2-14AutonomousSystem100AutonomousSystem200IGPs:RIP,IGRPEGPs:BGP15.5AutonomousSystems:InteriororExteriorRoutingProtocols•Anautonomoussystemisacollectionofnetworksunderacommonadministrativedomain•IGPsoperatewithinanautonomoussystem•EGPsconnectdifferentautonomoussystemsICND—2-15Routerconfiguration•Selectroutingprotocols•SpecifynetworksorinterfacesNetwork160.89.0.0Network172.30.0.0IGRP,RIPNetwork172.16.0.0RIPRIPIGRPIPRoutingConfigurationTasksICND—2-16ICND—2-18•DefinesanIProutingprotocolRouter(config)#routerprotocol[keyword]•MandatoryconfigurationcommandforeachIProutingprocess•IdentifiesthephysicallyconnectednetworkthatroutingupdatesareforwardedtoRouter(config-router)#networknetwork-numberDynamicRoutingConfigurationICND—2-1919.2kbpsT1T1T1•Hopcountmetricselectsthepath•Routesupdateevery30seconds4、RIPOverviewICND—2-20•StartstheRIProutingprocessRouter(config)#routerripRouter(config-router)#networknetwork-number•Selectsparticipatingattachednetworks•ThenetworknumbermustbeamajorclassfulnetworknumberRIPConfigurationICND—2-212.3.0.0routerripnetwork172.16.0.0network10.0.0.0RIPConfigurationExamplerouterripnetwork10.0.0.02.3.0.0routerripnetwork192.168.1.0network10.0.0.0172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0E0ICND—2-22VerifyingtheRoutingProtocol—RIPRouterA#shipprotocolsRoutingProtocolisripSendingupdatesevery30seconds,nextduein0secondsInvalidafter180seconds,holddown180,flushedafter240OutgoingupdatefilterlistforallinterfacesisIncomingupdatefilterlistforallinterfacesisRedistributing:ripDefaultversioncontrol:sendversion1,receiveanyversionInterfaceSendRecvKey-chainEthernet0112Serial2112RoutingforNetworks:10.0.0.0172.16.0.0RoutingInformationSources:GatewayDistanceLastUpdate10.1.1.212000:00:10Distance:(defaultis120)172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0E0ICND—2-23DisplayingtheIPRoutingTableRouterA#shiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticroute,o-ODRT-trafficengineeredrouteGatewayoflastresortisnotset172.16.0.0/24issubnetted,1subnetsC172.16.1.0isdirectlyconnected,Ethernet010.0.0.0/24issubnetted,2subnetsR10.2.2.0[120/1]via10.1.1.2,00:00:07,Serial2C10.1.1.0isdirectlyconnected,Serial2R192.168.1.0/24[120/2]via10.1.1.2,00:00:07,Serial2172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0E0ICND—2-24ReviewQuestions1.Whatisanadvantageofusingastaticrouteratherthanadynamicroute?Whatisadisadvantage?2.WhatistheadvantageofusingIGRPratherthenRIP?Whatisapossibledisadvantage?3.ToscaleuptoverylargeIPnetworks,whatroutingprotocolsarerecommended?ICND—2-25ICND—2-26Uponcompletionofthischapter,youwillbeabletoperformthefollowingtasks:•ConfigureHDLCandPPPprotocolsonaserialWANconnection•ConfigurePAPandCHAPauthenticationonaPPPconnection•Verifyproperpoint-to-pointHDLCandPPPconfigurationObjectivesICND—2-276.3WAN广域网概述服务提供商•广域网互联各站点•根据用户的需求和花费选择不同的连接ICND—2-28租用专线串行通信电话公司电路交换异步串行服务提供商包交换同步串行1、WAN连接类型:第一层ICND—2-29LeasedLineCircuit