首页 路由器配置实验讲义

路由器配置实验讲义

举报
开通vip

路由器配置实验讲义路由器配置实验讲义第一章、路由器的基本设置方式一般来说,可以用5种方式来设置路由器:1.Console口接终端或运行终端仿真软件的微机;2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器;4.通过Ethernet上的TELNET程序;5.通过Ethernet上的SNMP网管工作站。但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下:波特率:9600数据位:8停止位:1奇偶校验:无Windows95/NT下,超级终端的设置.在开始-...

路由器配置实验讲义
路由器配置实验讲义第一章、路由器的基本设置方式一般来说,可以用5种方式来设置路由器:1.Console口接终端或运行终端仿真软件的微机;2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器;4.通过Ethernet上的TELNET程序;5.通过Ethernet上的SNMP网管工作站。但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下:波特率:9600数据位:8停止位:1奇偶校验:无Windows95/NT下,超级终端的设置.在开始--->程序--->附件--->超级终端--->Hypetrm设定名称为cisco,再选择一个图标.请选择"直接连接到串口1"1.选择波特率为9600bps.最后把设置的保存在cisco文件里.下一次直接从超级终端cisco中启动.第二章、路由器的命令状态网际操作系统(IOS)用户接口提供了几种不同的命令访问模式,每一个命令模式提供了一组相关的命令.为安全起见,IOS提供了两种命令访问级别:User和Priviledged.无优先级的,用户模式称作UserEXEC模式,而PriviledgedEXEC被称作超级用户模式,需要有口令才能进入.用户模式下的命令集是超级用户下命令集的子集.在超级用户级别下,可以进入配置模式和其下的十个特定的配置模式:interface,subinterface,controller,hub,map-list,map-class,line,router,ipx-router,router-map等配置.大多数系统配置命令都有no的形式,通常用no来取消掉一个配置过的命令.另外,在各种模式下的命令均可以用来查找自己所需的命令.下面列出几种命令模式.1.router>路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。2.router#在router>提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。3.router(config)#在router#提示符下键入configureterminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的全局参数。4.router(config-if)#;router(config-line)#;router(config-router)#;…路由器处于局部设置状态,这时可以设置路由器某个局部的参数。5.>路由器处于RXBOOT状态,在开机后60秒内按ctrl-break可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。6.设置对话状态这是一台新路由器开机时自动进入的状态,在特权命令状态使用SETUP命令也可进入此状态,这时可通过对话方式对路由器进行设置。第三章、设置对话过程利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。进入设置对话过程后,路由器首先会显示一些提示信息:---SystemConfigurationDialog---Atanypointyoumayenteraquestionmark''forhelp.Usectrl-ctoabortconfigurationdialogatanyprompt.Defaultsettingsareinsquarebrackets'[]'.这是告诉你在设置对话过程中的任何地方都可以键入“”得到系统的帮助,按ctrl-c可以退出设置过程,缺省设置将显示在‘[]’中。然后路由器会问是否进入设置对话:Wouldyouliketoentertheinitialconfigurationdialog[yes]:如果按y或回车,路由器就会进入设置对话过程。首先你可以看到各端口当前的状况:First,wouldyouliketoseethecurrentinterfacesummary[yes]:AnyinterfacelistedwithOKvalue"NO"doesnothaveavalidconfigurationInterfaceIP-AddressOKMethodStatusProtocolEthernet0unassignedNOunsetupupSerial0unassignedNOunsetupup……………………………然后,路由器就开始全局参数的设置:Configuringglobalparameters:1.设置路由器名:Enterhostname[Router]:2.设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示:Theenablesecretisaone-waycryptographicsecretusedinsteadoftheenablepasswordwhenitexists.Enterenablesecret:cisco3.设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置以后会以明文方式显示:Theenablepasswordisusedwhenthereisnoenablesecretandwhenusingoldersoftwareandsomebootimages.Enterenablepassword:pass4.设置虚拟终端访问时的密码:Entervirtualterminalpassword:cisco5.询问是否要设置路由器支持的各种网络协议:ConfigureSNMPNetworkManagement[yes]:ConfigureDECnet[no]:ConfigureAppleTalk[no]:ConfigureIPX[no]:ConfigureIP[yes]:ConfigureIGRProuting[yes]:ConfigureRIProuting[no]:………6.如果配置的是拨号访问服务器,系统还会设置异步口的参数:ConfigureAsynclines[yes]:1)设置线路的最高速度:Asynclinespeed[9600]:2)是否使用硬件流控:ConfigureforHWflowcontrol[yes]:3)是否设置modem:Configureformodems[yes/no]:yes4)是否使用默认的modem命令:Configurefordefaultchatscript[yes]:5)是否设置异步口的PPP参数:ConfigureforDial-inIPSLIP/PPPaccess[no]:yes6)是否使用动态IP地址:ConfigureforDynamicIPaddresses[yes]:7)是否使用缺省IP地址:ConfigureDefaultIPaddresses[no]:yes8)是否使用TCP头压缩:ConfigureforTCPHeaderCompression[yes]:9)是否在异步口上使用路由表更新:Configureforroutingupdatesonasynclinks[no]:y10)是否设置异步口上的其它协议。接下来,系统会对每个接口进行参数的设置。1.ConfiguringinterfaceEthernet0:1)是否使用此接口:Isthisinterfaceinuse[yes]:2)是否设置此接口的IP参数:ConfigureIPonthisinterface[yes]:3)设置接口的IP地址:IPaddressforthisinterface:4)设置接口的IP子网掩码:Numberofbitsinsubnetfield[0]:ClassCnetworkis,0subnetbits;maskis/24在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:Thefollowingconfigurationcommandscriptwascreated:hostnameRouterenablesecret5$1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1enablepasswordpass…………请注意在enablesecret后面显示的是乱码,而enablepassword后面显示的是设置的内容。显示结束后,系统会问是否使用这个设置:Usethisconfiguration[yes/no]:yes如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。第四章、常用命令1、帮助在IOS操作中,无论任何状态和位置,都可以键入“”得到系统的帮助。2、改变命令状态任务命令进入特权命令状态enable退出特权命令状态disable进入设置对话状态setup进入全局设置状态configterminal退出全局设置状态end进入端口设置状态interfacetypeslot/number进入子端口设置状态interfacetype[point-to-point|multipoint]进入线路设置状态linetypeslot/number进入路由设置状态routerprotocol退出局部设置状态exit3、显示命令任务命令查看版本及引导信息showversion查看运行设置showrunning-config查看开机设置showstartup-config显示端口信息showinterfacetypeslot/number显示路由信息showiprouter4.拷贝命令用于IOS及CONFIG的备份和升级5.网络命令任务命令登录远程主机telnethostname|IPaddress网络侦测pinghostname|IPaddress路由跟踪tracehostname|IPaddress6.基本设置命令任务命令全局设置configterminal设置访问用户及密码usernameusernamepasswordpassword设置特权密码enablesecretpassword设置路由器名hostnamename设置静态路由iproutedestinationsubnet-masknext-hop启动IP路由iprouting启动IPX路由ipxrouting端口设置interfacetypeslot/number设置IP地址ipaddressaddresssubnet-mask设置IPX网络ipxnetworknetwork激活端口noshutdown物理线路设置linetypenumber启动登录进程login[local|tacacsserver]设置登录密码passwordpassword第五章、配置IP寻址1、IP地址分类IP地址分为网络地址和主机地址二个部分,A类地址前8位为网络地址,后24位为主机地址,B类地址16位为网络地址,后16位为主机地址,C类地址前24位为网络地址,后8位为主机地址,网络地址范围如下表所示:种类网络地址范围A到有效和保留B到有效和保留C到有效和保留DE到用于多点广播到保留注:用于广播2.分配接口IP地址任务命令接口设置interfacetypeslot/number为接口设置IP地址ipaddressip-addressmask掩玛(mask)用于识别IP地址中的网络地址位数,IP地址(ip-address)和掩码(mask)相与即得到网络地址。3.使用可变长的子网掩码通过使用可变长的子网掩码可以让位于不同接口的同一网络编号的网络使用不同的掩码,这样可以节省IP地址,充分利用有效的IP地址空间。如下图所示:Router1和Router2的E0端口均使用了C类地址作为网络地址,Router1的E0的网络地址为,掩码为,Router2的E0的网络地址为,掩码为,这样就将一个C类网络地址分配给了二个网,既划分了二个子网,起到了节约地址的作用。4.使用网络地址翻译(NAT)NAT(NetworkAddressTranslation)起到将内部私有地址翻译成外部合法的全局地址的功能,它使得不具有合法IP地址的用户可以通过NAT访问到外部Internet.当建立内部网的时候,建议使用以下地址组用于主机,这些地址是由NetworkWorkingGroup(RFC1918)保留用于私有网络地址分配的.ClassA:toClassB:toClassC:to命令描述如下:任务命令定义一个标准访问列表access-listaccess-list-numberpermitsource[source-wildcard]定义一个全局地址池ipnatpoolnamestart-ipend-ip{netmasknetmask|prefix-lengthprefix-length}[typerotary]建立动态地址翻译ipnatinsidesource{list{access-list-number|name}poolname[overload]|staticlocal-ipglobal-ip}指定内部和外部端口ipnat{inside|outside}如下图所示:路由器的Ethernet0端口为inside端口,即此端口连接内部网络,并且此端口所连接的网络应该被翻译,Serial0端口为outside端口,其拥有合法IP地址(由NIC或服务提供商所分配的合法的IP地址),来自网络/24的主机将从IP地址池c2501中选择一个地址作为自己的合法地址,经由Serial0口访问Internet。命令ipnatinsidesourcelist2poolc2501overload中的参数overload,将允许多个内部地址使用相同的全局地址(一个合法IP地址,它是由NIC或服务提供商所分配的地址)。命令ipnatpoolc2501netmask定义了全局地址的范围。设置如下:ipnatpoolc2501netmaskinterfaceEthernet0ipaddressipnatinside!interfaceSerial0ipaddressipnatoutside!iprouteSerial0access-list2permit!DynamicNAT!ipnatinsidesourcelist2poolc2501overloadlineconsole0exec-timeout00!linevty04end第六章、配置静态路由通过配置静态路由,用户可以人为地指定对某一网络访问时所要经过的路径,在网络结构比较简单,且一般到达某一网络所经过的路径唯一的情况下采用静态路由。任务命令建立静态路由iprouteprefixmask{address|interface}[distance][tagtag][permanent]Prefix:所要到达的目的网络mask:子网掩码address:下一个跳的IP地址,即相邻路由器的端口地址。interface:本地网络接口distance:管理距离(可选)tagtag:tag值(可选)permanent:指定此路由即使该端口关掉也不被移掉。以下在Router1上设置了访问/26这个网下一跳地址为,即当有目的地址属于/26的网络范围的数据报,应将其路由到地址为的相邻路由器。在Router3上设置了访问/26及/30这二个网下一跳地址为。由于在Router1上端口Serial0地址为,/30这个网属于直连的网,已经存在访问/30的路径,所以不需要在Router1上添加静态路由。Router1:iprouteRouter3:iprouteiproute同时由于路由器Router3除了与路由器Router2相连外,不再与其他路由器相连,所以也可以为它赋予一条默认路由以代替以上的二条静态路由,iproute即只要没有在路由表里找到去特定目的地址的路径,则数据均被路由到地址为的相邻路由器。第七章、路由协议设置:RIP协议RIP(RoutinginformationProtocol)是应用较早、使用较普遍的内部网关协议(InteriorGatewayProtocol,简称IGP),适用于小型同类网络,是典型的距离向量(distance-vector)协议。文档见RFC1058、RFC1723。RIP通过广播UDP报文来交换路由信息,每30秒发送一次路由信息更新。RIP提供跳跃计数(hopcount)作为尺度来衡量路由距离,跳跃计数是一个包到达目标所必须经过的路由器的数目。如果到相同目标有二个不等速或不同带宽的路由器,但跳跃计数相同,则RIP认为两个路由是等距离的。RIP最多支持的跳数为15,即在源和目的网间所要经过的最多路由器的数目为15,跳数16表示不可达。1、有关命令任务命令指定使用RIP协议Routerrip指定RIP版本version{1|2}1指定与该路由器相连的网络networknetwork注:的RIP版本2支持验证、密钥管理、路由汇总、无类域间路由(CIDR)和变长子网掩码(VLSMs)2.举例例一:Router1:routerripversion2networknetwork!相关调试命令:showipprotocolshowiproute例二:(下一页)1、写出图中所有路由器配置RIP过程,并查看路由表:Routera(config)#interfaces0/0Routera(config-if)#ipaddressRoutera(config-if)#clockrate56000Routera(config-if)#noshutdownRoutera(config-if)#exitRoutera(config)#interfacefaste0/0Routera(config-if)#ipaddressRoutera(config-if)#noshutdownRoutera(config)#routerripRoutera(config-router)#version1Routera(config-router)#networkrouterb(config)#interfe0/0routerb(config-if)#ipaddressrouterb(config-if)#noshutdownrouterb(config)#inters0/0routerb(config-if)#ipaddressrouterb(config-if)#clockrate56000routerb(config-if)#noshutdownrouterb(config-if)#routerriprouterb(config-router)#version1routerb(config-router)#networkrouterc(config)interfaces2/0routerc(config-if)#ipaddressrouterc(config-if)#noshutdownrouterc(config)#interfs2/1routerc(config-if)#ipaddressrouterc(config-if)#noshutdownrouterc(config)#interfs2/2routerc(config-if)#ipaddressrouterc(config-if)#clockrate56000routerc(config-if)#noshutdownrouterc(config)#routerriprouterc(config-router)#version1routerc(config-router)#networkrouterc(config-router)#networkrouterc#showiprouteCodes: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-ODRGatewayoflastresortisnotsetR/24[120/1]via,00:00:29,Serial2/2/27issubnetted,1subnetsCisdirectlyconnected,Serial2/0isdirectlyconnected,Serial2/1C/24isdirectlyconnected,Serial2/2routerc#pingTypeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:!!!!!routerd(config)#interfaces0/0routerd(config-if)#ipaddressrouterd(config-if)#clockrate56000routerd(config)#interfaces0/1routerd(config-if)#ipaddressrouterd(config)#interfaces1/0routerd(config-if)#ipaddressrouterd(config)#routerriprouterd(config-router)#version1routerd(config-router)#networkrouterd(config-router)#networkroutere(config)#interfaceSerial0/1routere(config-if)#ipaddressroutere(config)#interfaceEthernet0/0routere(config-if)#ipaddressroutere(config)#routerriproutere(config-router)#version1routere(config-router)#networkroutere(config-router)#networkrouterf(config)#interfaceSerial0/0routerf(config-if)#ipaddressrouterf(config-if)#clockrate56000routerf(config)#interfaceEthernet0/0routerf(config-if)#ipaddressrouterf(config)#routerriprouterf(config-router)#version1routerf(config-router)#networkrouterf(config-router)#networkrouterf#showiprouteCodes: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,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,Serial0/0R/24[120/2]via,00:00:01,Serial0/0R/24[120/1]via,00:00:01,Serial0/0routerf#pingTypeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:!!!!!2、RTC和RTD之间的带宽是有限的。改变RIP的路由更新时间使其所占带宽减少。(仔细考虑那些路由器的时间应改变)用DEBUG命令查看.routera(config-router)#timersbasic120180240300routerb(config-router)#timersbasic120180240300routerc(config-router)#timersbasic120180240300routerd(config-router)#timersbasic120180240300routere(config-router)#timersbasic120180240300routerf(config-router)#timersbasic120180240300routerc#debiprip08:08:07:RIP:sendingv1updatetoviaSerial2/0()08:08:07:network,metric208:08:07:network,metric108:08:07:RIP:sendingv1updatetoviaSerial2/1()08:08:07:network,metric208:08:07:network,metric108:08:07:RIP:sendingv1updatetoviaSerial2/2()08:08:07:network,metric108:08:32:RIP:receivedv1updatefromonSerial2/208:08:32:in1hops08:10:03:RIP:sendingv1updatetoviaSerial2/0()08:10:03:network,metric208:10:03:network,metric108:10:03:RIP:sendingv1updatetoviaSerial2/1()08:10:03:network,metric208:10:03:network,metric108:10:03:RIP:sendingv1updatetoviaSerial2/2()08:10:03:network,metric108:10:32:RIP:receivedv1updatefromonSerial2/208:10:32:in1hops08:11:54:RIP:sendingv1updatetoviaSerial2/0()08:11:54:network,metric208:11:54:network,metric108:11:54:RIP:sendingv1updatetoviaSerial2/1()08:11:54:network,metric208:11:54:network,metric108:11:54:RIP:sendingv1updatetoviaSerial2/2()08:11:54:network,metric1^Z3、利用offset-list命令RTF使上的数据包不能到达RTF配置前的路由表如下:(注:offset-list命令可使由指定接口进入的到达某一网段的路由更新的跳数增加或减少).routerf#showiprouteCodes: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,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,Serial0/0R/24[120/2]via,00:00:01,Serial0/0R/24[120/1]via,00:00:01,Serial0/0配置如下:routerf(config)#access-list10permitrouterf(config)#routerriprouterf(config-router)#networkrouterf(config-router)#networkrouterf(config-router)#offset-list10in14s0/0routerf#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,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,Serial0/0R/24[120/1]via,00:00:02,Serial0/0二、RIPV21、验证RIP是否支持不连续网络:不连续网络是指属于同一个主网的ip子网被其它主网分割成多个分离的物理网络.如图,两个路由器间被配置了不同的主网地址.在RIPV1下:routera(config)#interfaceEthernet0/0routera(config-if)#ipaddressroutera(config)#interfaceSerial0/1routera(config-if)#ipaddressroutera(config-route)#networkroutera(config-route)#networkroutera(config-route)#version1routera#showiprouteCodes: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-ODRGatewayoflastresortisnotset/29issubnetted,1subnetsCisdirectlyconnected,Ethernet0/0C/24isdirectlyconnected,Serial0/1routerc#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.routerc(config)#inters0/0routerc(config-if)#ipaddressrouterc(config-if)#exitrouterc(config)#intere0/0routerc(config-if)#ipaddress.routerc(config-if)#exitrouterc(config)#routerriprouterc(config-router)#version1routerc(config-router)#networkrouterc(config-router)#networkrouterc#showiprouteCodes: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,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,Ethernet0/0C/24isdirectlyconnected,Serial0/0routera#pingTypeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:.....Successrateis0percent(0/5)在RIPV2下:routera(config-route)#version2routerc(config-route)#version2routera#pingTypeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:!!!!!Successrateis100percent(5/5),round-tripmin/avg/max=32/33/36ms三、RIPV2对无效路由更新提供了安全性的认证,它能够通过设立密码对无效路由加以拒绝,只有当源路由器接口的密码和目的路由器接口的密码一致时,该路由通告才被认为合法并被接受。认证有两种格式:plaintext和MD5.但plaintext易被别人截获而MD5提供了更高的安全保证。配制过程如下:1、用全局配置命令先标志一个鉴别密钥组:keychain[name-of-chain]撤除密钥链用no命令2、给密钥指定认证字符:key-string[text]text的内容可以包括1到80个字母,但不能以数字开头。3、指定在哪个接口使用认证:interface[typenumber]4、指定认证类型:ipripauthenticationmode[MD5/plaintext].下面是利用MD5进行认证的实验:B和D连接的接口配置相同的密码:routerb#conftEnterdonfigurationcommands,oneperline.EndwithCNTL/Z.routerb(config)#keychainzhaorouterb(config-keychain)#key1routerb(config-keychain-key)#key-stringciscorouterb(config-keychain-key)#interfaces0/1routerb(config-if)#ipripauthenkey-chainzhaorouterb(config-if)#ipripauthenmodemd5routerd#conftEnterdonfigurationcommands,oneperline.EndwithCNTL/Z.routerd(config)#keychainlirouterd(config-keychain)#key1routerd(config-keychain-key)#key-stringciscorouterd(config-keychain-key)#interfaces2/0routerd(config-if)#ipripauthenkey-chainlirouterd(config-if)#ipripauthenmodemd5routerd#debipripRIPprotocoldebuggingisonrouterc#4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:receivedv2updatefromonSerial2/24d03h:/28->in1hops4d03h:/24->in3hops4d03h:/24->in2hops4d03h:RIP:receivedpacketwithMD5authentication4d03h:RIP:receivedv2updatefromonSerial2/04d03h:/24->in1hops4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:receivedv2updatefromonSerial2/24d03h:/28->in1hops4d03h:/24->in3hops4d03h:/24->in2hops4d03h:RIP:receivedpacketwithMD5authentication4d03h:RIP:receivedv2updatefromonSerial2/04d03h:/24->in1hops4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:receivedv2updatefromonSerial2/24d03h:/28->in1hops4d03h:/24->in3hops4d03h:/24->in2hops^ZB和D连接的接口配置不相同的密码:(由路由表可以看到由于密码不同来自的路由通告被忽略!!!)routerc#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.routerc(config)#keychainlirouterc(config-keychain)#key1routerc(config-keychain-key)#key-stringarouterc(config-keychain-key)#^Zrouterc#routerc#debipripRIPprotocoldebuggingisonrouterc#4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:receivedv2updatefromonSerial2/24d03h:/28->in1hops4d03h:/24->in3hops4d03h:/24->in2hops4d03h:RIP:receivedpacketwithMD5authentication4d03h:RIP:ignoredv2packetfrom(invalidauthentication)4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:receivedv2updatefromonSerial2/24d03h:/28->in1hops4d03h:/24->in3hops4d03h:/24->in2hops4d03h:RIP:receivedpacketwithMD5authentication4d03h:RIP:ignoredv2packetfrom(invalidauthentication)^Z4d03h:RIP:sendingv2updatetoviaSerial2/0()4d03h:/24->,metric3,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/1()4d03h:/28->,metric2,tag04d03h:/24->,metric2,tag04d03h:/28->,metric1,tag04d03h:/24->,metric1,tag04d03h:RIP:sendingv2updatetoviaSerial2/2()4d03h:/24->,metric2,tag04d03h:/27->,metric1,tag04d03h:/24->,metric1,tag0^Z第八章、路由协议设置:IGRP协议IGRP(InteriorGatewayRoutingProtocol)是一种动态距离向量路由协议,它由Cisco公司八十年代中期设计。使用组合用户配置尺度,包括延迟、带宽、可靠性和负载。缺省情况下,IGRP每90秒发送一次路由更新广播,在3个更新周期内(即270秒),没有从路由中的第一个路由器接收到更新,则宣布路由不可访问。在7个更新周期即630秒后,CiscoIOS软件从路由表中清除路由。1、有关命令任务命令指定使用RIP协议routerigrpautonomous-system1指定与该路由器相连的网络networknetwork指定与该路由器相邻的节点地址neighborip-address注:1、autonomous-system可以随意建立,并非实际意义上的autonomous-system,但运行IGRP的路由器要想交换路由更新信息其autonomous-system需相同。2.举例例一:Router1:routerigrp200networknetwork!例二:实验目的:1通过本实验掌握IGRP的基本配制方法.2掌握metric的算法.3主要掌握开销不等均衡(unequal-costloadbalancing)实验内容:1、写出图示六个路由器IGRP配制的过程(AS=5)ROUTERA的配制及路由表:routera#conftroutera(config)#interfacee0/0routera(config-if)#ipaddressroutera(config-if)#noshutdownroutera(config-if)#exitroutera(config)#interfaces0/1routera(config-if)#ipaddressroutera(config-if)#clockrate56000routera(config-if)#noshutdownroutera(config-if)#exitroutera(config)#routerigrp50routera(config-router)#networkroutera(config-router)#exitroutera(config)#^Zroutera#showiprouteCodes: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,ia-IS-ISinterarea*-candidatedefault,U-per-userstaticroute,o-ODRP-periodicdownloadedstaticrouteGatewayoflastresortisnotsetI/24[100/84125]via,00:00:15,Seria
本文档为【路由器配置实验讲义】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
橙子到此一游
暂无简介~
格式:doc
大小:844KB
软件:Word
页数:0
分类:
上传时间:2021-02-23
浏览量:4