CISCO设备维护操作手册.doc_第1页
CISCO设备维护操作手册.doc_第2页
CISCO设备维护操作手册.doc_第3页
CISCO设备维护操作手册.doc_第4页
CISCO设备维护操作手册.doc_第5页
已阅读5页,还剩93页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

page 102 of 98dcn网思科网络设备操作维护手册(版本号:v2.0)第 0 页 共 98 页 cisco网络设备操作维护手册第102页 共98页文 档 信 息文档名称:江苏移动dcn网络系统cisco网络设备操作维护手册文档编号: 文档版本号:v2.0文 档 变 更 记 录版 本 编 号版 本 日 期作 者说 明102005-4-30陈文祥202007-9-18刘利明增加认证、安全内容审 核 批 准批准代表签字时间江苏移动通信有限责任公司信息技术中心联创科技(南京)有限公司网络技术部版 权 说 明本文件中出现的任何文字叙述、文件格式、插图、照片、方法等内容,除另有特别注明,版权均属江苏移动通信有限责任公司和南京联创科技股份有限公司所有,受到有关产权及版权法保护。任何个人、机构未经江苏移动通信有限责任公司和南京联创科技股份有限公司的书面授权许可,不得复制或引用本文件的任何片断,无论通过电子形式或非电子形式。目 录1.路由器配置基础91.1.基本配置方式91.2.命令状态101.3.设置对话过程101.4.常用命令131.5.配置ip地址141.6.配置静态路由172.广域网协议设置182.1.hdlc182.1.1.相关命令182.1.2.举例192.1.3.举例使用ei线路实现多个 64k专线连接192.2.ppp212.3.x.25232.4.frame relay272.5.isdn312.6.pstn413.路由配置协议543.1.rip协议543.2.igrp协议563.3.ospf协议573.4.重新分配路由623.5.ipx协议设置644.服务质量及访问控制664.1.协议优先级设置664.2.队列定制674.3.访问控制685.虚拟局域网(vlan)路由695.1.虚拟局域网695.2.交换机间(isl)协议695.3.虚拟局域网(vlan)路由实例706.pppoe配置767.路由器安全配置777.1.访问列表777.1.1.标准ip访问列表787.1.2.扩展ip访问列表797.1.3.管理和使用访问表807.2.密码管理827.2.1.登录口令管理827.2.2.特权口令管理827.3.控制线路访问837.3.1.限制对vty端口的访问837.3.2.限制用户能够连接的地址837.3.3.控制用户能够使用的命令837.4.cdp837.5.http配置服务847.6.其他推荐缺省配置847.6.1.拒绝rfc1918路由857.6.2.udp和tcp服务器867.6.3.finger服务867.6.4.ip unreachable报文867.6.5.ip redirect报文877.6.6.定向广播877.6.7.proxy arp877.6.8.ip verify887.6.9.ip源路由887.7.tcp截获888.snmp908.1.snmp的来源908.2.snmp操作原理918.3.ios中的snmp配置939.dpt环的配置和管理9310.参考10110.1.cisco路由器口令恢复10110.2.ip地址分配10210.3.做线线序1021. 路由器配置基础1.1. 基本配置方式一般来说,可以用5种方式来设置路由器: 1. 通过console 口接终端或运行终端仿真软件的微机;2. 通过aux口接modem,通过电话线与远方的终端或运行终端仿真软件的微机相连;3. 通过ethernet上的tftp服务器;4. 通过ethernet 上的telnet程序;5. 通过ethernet 上的snmp网管工作站。但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下: 波特率:960o 数据位:8 停止位:1 奇偶校验:无1.2. 命令状态router路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。router#在router提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。1. router(config)#在router#提示符下键入configure terminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的 全局参数。2. router(config-if)#; router(config-line)#; router(config-router)#路由器处于局部设置状态,这时可以设置路由器某个局部的参数。3. 路由器处于rxboot状态,在开机后 60秒内按ctrl+break可以进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。4. 设置对话状态这是一台新路由器开机时自动进人的状态,在特权命令状态使用setup命令也可进入此状态,这时可通过对话方式对路由器进行设置。1.3. 设置对话过程利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。进入设置对话过程后,路由器首先会显示一些提示信息:-system configuration dialog- at any point you may enter a question mark?for help use ctrlc to abort configuration dialog at any prompt. default settings are in square bracket这是告诉你在设置对话过程中的任何地方都可以键入?得到系统的帮助,按ctrl+c 可以退出设置过程,缺省设置将显示在中。然后路由器会问是否进入设置对话: would you like to enter the initial configuration dialog? yes:如果按y或回车,路由器就会进入设置对话过程。首先你可以看到各端口当前的状况: first,would you like to see the current interface summary? yes: any interface listed with ok?value “no” does not have a valid configuration interface ip-address ok? method status protocol ethernet0 unassigned no unset up up serial0 unassigne no unset up up . . . . . . 然后,路由器就开始全局参数的设置: configuring global parameters:1. 设置路由器名:enter host name router:2. 设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示: the enable secret is a one-way cryptographic secret used instead of the enable password when it exists enter enable secret: cisco,设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置后会以明文方式显示: the enable password is used when there is no enable secret and when using older software and some boot imagesenter enable password:pass设置虚拟终端访问时的密码: enter virtual terminal password: cisco3. 询问是否要设置路由器支持的各种网络协议: configure snmp network management?yes: configure decnet?no: configure appletalk?no: configure ipx?no: configure ip?yes: configure igrp routing?yes: configure rip routing?no: .4. 如果配置的是拨号访问服务器,系统还会设置异步口的参数: configure async lines?yes:1) 设置线路的最高速度: async line speed9600:2) 是否使用硬件流控: configure for hw flow control?yes:3) 是否设置modem: configure for modems?yesno: yes4) 是否使用默认的modem命令: configure for default chat script?yes:5) 是否设置异步口的ppp参数: configure for dial-in ip slip/ppp access?no:yes6) 是否使用动态ip地址: configure for dynamic ip addresses?yes:7) 是否使用缺省ip地址: configure default ip addresses?no:yes8) 是否使用tcp头压缩: configure for tcp header compression?yes:9) 是否在异步口上使用路由表更新: configure for routing updates on async links?no:y10) 是否设置异步口上的其它协议。接下来,系统会对每个接口进行参数的设置。1. configuring interface ethernet0:1) 是否使用此接口: is this interface in use?yes:2) 是否设置此接口的ip参数: configure ip on this interface?yes:3) 设置接口的ip地址: ip address for this interface:4) 设置接口的 ip子网掩码: number of bits in subnet field0: class c network is 1921681620,0 subnet bits;mask is/24在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:the following configuration command script was created:hostname routerenable secret 51w5ohp6j7tigrmboikvxvg53uhlenable password pass.请注意在enable secret后面显示的是乱码,而enable password后面显示的是设置的内容。显示结束后,系统会问是否使用这个设置:use this configuration?yes/no: yes如果回答 yes,系统就会把设置的结果存入路由器的 nvram 中,然后结束设置对话过程,使路由器开始正常的工作。1.4. 常用命令1. 帮助 在 ios操作中,无论任何状态和位置,都可以键入“?”得到系统的帮助。2. 改变命令状态 任务 命令 进入特殊命令状态 enable 退出特权命令状态 disable 进入设置对话状态 setup 进入全局设置状态 config terminal 退出全局设置状态 end 进入端口设置状态 interface type slot/number 进入子端口设置状态 interface type number.subinterface point-to-point|multipoint 进入线路设置状态 line type slot/number 进入路由设置状态 router protocol 退出局部设置状态 exit3. 显示命令 任务 命令 查看版本即引导信息 show version 查看运行设置 show running-config 查看开机设置 show startup-config 显示端口信息 show interface type slot/number 显示路由信息 show ip router4. 拷贝命令用于ios及config的备份和升级5. 网络命令 任务 命令 登陆远程主机 telnet hostname|ip address 网络侦测 ping hostname|ip address 路由跟踪 trace hostname|ip address6. 基本设置命令 任务 命令 全局设置 config terminal 设置访问用户及密码 username username password password 设置特权密码 enable secret password 设置路由器名 hostname name 设置静态路由 ip route destination subnet-mask next-hop 启动ip路由 ip routing 启动ipx路由 ipx routing 端口设置 interface type slot/number 设置ip地址 ip address address subnet-mask 设置ipx网络 ipx network network 激活端口 no shutdown 物理线路设置 line type number 启动登陆进程 loginlocal|tacacs server 设置登陆密码 password password1.5. 配置ip地址1. ip地址分类ip地址分为网络地址和主机地址两个部分,a类地址前8位为网络地址,24位为主机地址,b类地址16位为网络地址,后16位为主机地址,c类地址前24位为网络地址,后8位为主机地址,网络地址范围如下表所示: 种类 网络地址范围 a到有效 和保留 b 到有效 到保留 c 到有效 到 保留 d 到55用于多点 广播 e 到54保留 55用于广播2. 分配接口ip地址 任务 命令 接口设置 interface type slot/number 为接口设置ip地址 ip address ip-address mask 掩码(mask)用于识别ip地址中的网络地址位数,ip地址(ipaddress)和掩码(mask)相与即得到网络地址。3. 使用可变长的子网掩码通过使用可变长的子网掩码可以让位于不同接口的同一网络编号的网络使用不同的掩码,这样可以节省ip地址,充分利用有效的ip地址空间。 如下图所示:router1和 router2的 e0端口均使用了 c类地址 作为网络地址,router1的e0的网络地址为 28,掩码为92,router2的e0的网络地址为4,掩码为92,这样就将一个c类网络地址分配给了两个网,既划分了两个子网,起到了节约地址的作用。4. 使用网络地址翻译(nat)nat(network address translation)起到将内部私有地址翻译成外部合法的全局地址的功能,它使得不具有合法ip地址的用户可以通过nat访问到外部internet当建立内部网的时候,建议使用以下地址组用于主机,这些地址是由network working group(rfc 1918)保留用于私有网络地址分配的。 class a: to 54. class b: to 54 class c: to 54命令描述如下: 任务 命令 定义一个标准访问列表 accesslist accesslistnumber permit sourcesource-wildcard 定义一个全局地址池 ip nat pool name start-ip end-ip netmask netmask | prefix-length prefix-length type rotary 建立动态地址翻译 ip name inside source list access-list-number | name pool name overload | static local-ip global-ip 指定内部和外部端口 ip nat inside | outside如下图所示,路由器的ethernet0端口为inside端口,既此端口连接内部网络,并且此端口所连接的网络应该被翻译,serial 0端口为outside端口, 其拥有合法ip地址(由nic或服务提供商所分配的合法的ip地址),来自网络 10.0.0.o/24的主机将从ip地址池c25o1中选择一个地址作为自己的合法地址,经由serial o口访问internet。命令ip nat inside source list 2 pool c2501 overload中的参数overload,将允许多个内部地址使用相同的全局地址(一个合法ip地址,它是由 nic或服务提供商所分配的地址)。命令ip nat poolc2501 2 netmask 92定义了全局地址的范围。设置如下:ip nat pool c2501 2o 2 netmask 92interface ethernet 0ip address 10.0.o.1 ip nat inside!interface serial oip address 52ip nat outside!ip route 0.o.o.0 serial oaccess-list 2 permit 0.0.o.255!dynamic nat!ip nat inside source list 2 pool c2501 overloadline console 0exectimeout 0 0!line vty 0 4end1.6. 配置静态路由通过配置静态路由,用户可以人为地指定对某一网络访问时所要经过的路径,在网络结构比较简单,且一般到达某一网络所经过的路径唯一的情况下采用静态路由。 任务 命令 建立静态路由 ip router prefix mask address | interface distance tag tag permanent prefix:所要到达的目的网络 mask:子网掩码 address:下一个跳的ip地址,即相邻路由器的端口地址。 interface:本地网络接口 distance:管理距离(可选) tag tag:tag值(可选) permanent:指定此路由即使该端口关掉也不被移掉。以下在router 1上设置了访问192.l.o.64/26这个网的下一跳地址为,即当有目的地址属于4/26的网络范围的数据包,将其路由到地址为 的相邻路由器。在router 3上设置了访问192.1.o.128/26及192.20o.10.4/30这两个网络下一跳地址为192.1.o.65,由于在router 1上端口 serial o地址为 192.2oo.10.5,192.2o0.1o.4/30这个网属于直连的网,已经存在访问/3o的路径,所以不需要添加静态路由。router 1:ip route 4 92 192.2o0.1o.6router 3:ip route 192.l.0.128 92 192.1.o.65ip route 192.200.1o.4 52 5 同时由于路由器router 3除了与路由器router 2相连外,不再与其他路由器相连,所以也可以为它赋予一条默认路由以代替以上的两条静态路由,ip route 192.1.o.65即只要没有在路由表里找到去特定目的地址的路径,则数据均被路由到地址为5的相邻路由器。2. 广域网协议设置2.1. hdlchdlc是cisco路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用hdlc封装。2.1.1. 相关命令端口设置 任务 命令 设置hdlc封装 encapsulation hdlc 设置dec端线路速度 clockrate speed 复位一个硬件接口 clear interface serial unit 显示接口状态 show interface serialunit注:1.以下给出一个显示cisco 同步串口状态的例子。 router#show interface serial 0 serial 0 is up line protocol is up hardware is mci serial internet address is o3, subnet mask is 255.255.255.o mtu 15o0 bytes、 bw 1544 kbit, dly 2000o usec,rely 255255, load 1255 encapsulation hdlc, loopback not set, keepalive set( 10 sec) last input 0:oo:07, output 0:00:00, output hang never output queue o/40, o drops;input queue 0/75, 0 drops five minute input rate 0 bitssec, 0 packetssec five minute output rate 0 bits/sec, 0 packetssec 16263 packets input, 1347238 bytes, o no buffer received 13983 broadcasts, o runts, 0 giants 2 input errors, o crc, 0 frame 0 overrun, o ignored 2 abort 22146 packets output, 2383680 bytes, 0 underuns 0 output errors, 0 collisions 2 interface resets, o restarts 1 carrier transitions2.1.2. 举例设置如下:router 1: interface serial 0 ip address 192.2oo.10.1 clockrate 1000000router 2: interface serial 0 ip address 192.20o.10.2 255.255.255.o !2.1.3. 举例使用ei线路实现多个 64k专线连接相关命令: 任务 命令进入controller配置模式 controller t1 | e1 number 选择帧类型 framingcrc4 | no-crc4选择line-code类型 linecode ami | b8zs |hdb3 建立逻辑通道组于时隙的映射 channel-group number timeslots rang显示controller接口状态 show controllers e1 slot/port2 注:1. 当链路为t1时,channel-group,编号为0-23,timeslot范围1-24;当链路为 e1时,channel编号为 o3o, timeslot范围l-31。2. 使用 show controllers e1观察 controller状态,以下为帧类型为 crc4时controllers正常的状态。 router#show controllers e1 e1 o/o is up applique type is channelized e1 unbalanced framing is crc4, line code is hdb3 no alarms detected data in current interval(725 seconds elapsed): o line code violations, 0 path code violations o slip secs, o fr loss sedc, 0 line err secs, o degraded mins 0 errored secs, 0 bursty err secs, o severely err secs, 0 unavail secs total data(last 24 hours)o line code violations,o path code violations o slip secs, 0 fr loss secs, o line err secs, o degraded mins, o errored secs, o bursty err secs, o severely err secs, 0 unavail secs以下例子为 e1连接 3条 64k专线,帧类型为 no_crc4,非平衡链路,路由器具体设置如下: shanxi#writ building configuration. current configuration: ! version 11.2no service udp-small-serversno service tcp-small-servers!hostname shanxi!enable secret 5lxn08ttr8nflop9.2rgzhcbzkkenable password shanxi!ip subnet-zero!controller e1 0framing no_crc4channel-group 0 timeslots 1channel-group 1 timeslots 2channel-group 2 timeslots 3!interface ethernet0 ip address 255.255.o.0 media-type 10baset!interface ethernetl no ip address shutdown!interface serial0:0 ip address 52 no ip mroute-cache!interface serial0:1 ip address 52 no ip mroutecache ! interface serialo:2 ip address 2o 52 no ip mroutecache ! no ip classless ip route 133.21o.40.o serial():o ip route 133.210.41.o 255.255.255.o serial():l ip route 133.210.42.o serial():2 ! line con 0 line aux o line vty 0 4 password shanxi login ! end2.2. pppppp(point-to-point protocol)是slip(erial line ip protocol)的继承者,它提供了跨过同步和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。chap(challenge handshake authentication protocol)和 pap(passwordauthentication protocol)(pap)通常被用于在ppp封装的串行线路上提供安全性认证。使用 chap和 pap认证,每个路由器通过名字来识别,可以防止未经止未经授权的访问。 chap和pap在rfc 1314上有详细的说明。1. 有关命令端口设置 任务 命令 设置ppp封装 encapsulation ppp 设置认证方式 ppp authentication chap | chap pap |pap chap|papif-neededlistname|defaultcallin 指定口令 username name password secret 设置dec端线路速度 clockrate speed注:要使用chap/pap必须使用ppp封装。在于路由器连接时,一般采用ppp封装,其他厂家路由器一般不支持cisco的hdlc封装协议。2. 举例 路由器router1和router2的s0口均封装ppp协议,采用chap作认证,在router1中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router2。同时在router2中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router1。所建的这两个用户的password必须相同。设置如下:routerl:hostname router1username router2 password xxxinterface serial0ip address clockrate 1000o00ppp authentication chap!router 2:hostname router2username routerl password xxxinterface serial0ip address 192.2o0.10.2 ppp authentication chap!2.3. x.251x25技术 x.25规范对应osi三层,x.25的第三层描述了分组的格式及分组交换的过程。 x.25的第二层由 lapb(link access procedure, balanced)实现,它定义了用于dtedce连接的帧格式。x25的第一层定义了电气和物理端口特性。 x25网络设备分为数据终端设备(dte)、数据电路终端设备(dce)及分组交换设备(pse)。dte是x.25的末端系统,如终端、计算机或网络主机,一般位于用户端,cisco路由器就是dte设备。dce设备是专用通信设备,如调制解调器和分组交换机。pse是公共网络的主干交换机。 x.25定义了数据通讯的电话网络,每个分配给用户的x.25端口都具有一 个x.121地址,当用户申请到的是svc(交换虚电路)时,x.25一端的用户在访问另一端的用户时,首先将呼叫对方x121地址,然后接收到呼叫的一端可以接受或拒绝,如果接受请求,于是连接建立实现数据传输,当没有数据传输时挂断连接,整个呼叫过程就类似我们拨打普通电话一样,其不同的是x.25可以实现一点对多点的连接。其中 x.121地址、htc均必须与x.25服务提供商分配的参数相同。 x.25 pvc(永久虚电路),没有呼叫的过程,类似ddn专线。2.有关命令 任务 命令 设置x.25封装 encapsulation x25 dce 设置x.121地址 x25 address x.121-address 设置远方站点的地址映射x25 map protocol address protocol2 tocol9 address9x121-addressoption 设置最大双向虚电路数 x25 htc citcuit-number设置一次连接可建立的虚电路数 x25 nvc count(2)设置x25在清除空闲虚电路前的等待周期 x25 idle minutes重新启动x25,或清一个svc,启动一个pvc相关参数clear x25 serial number | cmns-interface mac-address vc-number(3)清x25虚电路显示接口及x25相关信息clear x25-vcshow interface serialshow x25 interfaceshow x25 mapshow x25 vc注:1.虚电路号从1到4095,cisco路由器默认为1024,国内一般分配为16。 2.虚电路从1到8,缺省为1。 3.在改变了x.25个层的相关参数后,应重新启动x.25(使用 clear x25serial number | cmns-interfacemac-addressvc-number或clear x25-vc命令),否则设定的参数可能不能生效。同时应对照服务提供商对于x.25交换机端口的设置来配置路由器的相关参数。若出现参数不匹配可能会导致连接失败或其他意外情况。3实例:3.1在以下实例中每两个路由器间均通过svc实现连接。路由器设置如下:router1: interface serial0 encapsulation x25 ip address 1922o010.1 255255255o x25 address1 10l0l x25 htc 16 x25 nvc 2 x25 map ip 1922o0102 110102 broadcast x25 map ip 192200. 103 110103 broadcast !router2: interface serialo encapsulation x25 ip address 19220o10.2 255255255.0 x25 address 110102 x25 htc 16 x25 nvc 2 x25 map ip l92200101 11o10l broadcast x25 map ip 192200103 11o103 broadcast !router: interface serialo encapsulation x25 ip address 1922o010.3 2552552550 x25 address 110103 x25 htcl6 x25 nvc 2 x25 map ip 192.200101 11o1o1 broadcast x25 map lp 192.200102 11o102 broadcast! 相关调试命令 clear x25ve show interfaces serial show x25 map show x25 routeshow x25 ve3.2 在以下实例中路由器 router1和router2均通过svc与 router连接,但router1和router2不通过svc直接连接,此三个路由器的串口运行rip路由协议,使用了子接口的概念。由于使用了子接口,router1和route

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论