已阅读5页,还剩24页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一、基本设置方式一般来说,可以用5种方式来设置路由器:1.Console口接终端或运行终端仿真软件的微机;2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器;4.通过Ethernet上的TELNET程序;5.通过Ethernet上的SNMP网管工作站。但路由器的第一次设置必须通过第一种方式进行,一般用超级终端通过com口进行控制。此时终端的硬件设置如下:波特率:9600数据位:8停止位:1奇偶校验: 无二、命令操作CISCO路由器所用的操作系统是IOS.共有以下几种状态:1、router在router提示符下,路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。此时输入?并回车,可以查看到在此状态下可以用的命令。(IOS允许你在任何时候用这种方式查看在某种状态下可以用的命令)。在敲入enable并回车后,按照系统提示输入密码,(在新的路由器第一次进行调试的时候不需要输入密码,直接回车即可)进入#提示符,就可以对路由器进行各种操作了。2、router#路由器进入特权命令状态router#后,不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。此时就可以对路由器的名字、密码等进行设置。3、router(config)#在router#提示符下键入configure terminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的全局参数。4、router(config-if)#; router(config-line)#; router(config-router)#;路由器处于局部设置状态,这时可以设置路由器某个局部的参数。5、路由器处于RXBOOT状态,在开机后60秒内按ctrl-break可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。在此状态下,可以进行口令恢复。三、常用命令 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启动登录进程login local|tacacs server设置登录密码password password四、总体设置 在router#特权命令状态下,可以用setup对路由器进行总体设计,利用这个设计过程可以省略手工设置的烦琐。但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。进入设置对话过程后,路由器首先会显示一些提示信息:- System Configuration Dialog -At any point you may enter a question mark ? for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets .这是告诉你在设置对话过程中的任何地方都可以键入“?”得到系统的帮助,按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 configurationInterfaceIP-AddressOK?MethodStatusProtocolEthernet0unassignedNOunsetupupSerial0unassignedNOunsetupup然后,路由器就开始全局参数的设置:Configuring global parameters:1设置路由器名:Enter host name Router:2设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示:The enable secret is a one-way cryptographic secret usedinstead of the enable password when it exists.Enter enable secret: cisco3设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置以后会以明文方式显示:The enable password is used when there is no enable secretand when using older software and some boot images.Enter enable password: pass4设置虚拟终端访问时的密码:Enter virtual terminal password: cisco5询问是否要设置路由器支持的各种网络协议: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:6如果配置的是拨号访问服务器,系统还会设置异步口的参数:Configure Async lines? yes:1)设置线路的最高速度:Async line speed 9600:2)是否使用硬件流控:Configure for HW flow control? yes:3)是否设置modem:Configure for modems? yes/no: 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: yes是否使用TCP头压缩:Configure for TCP Header Compression? yes:9)是否在异步口上使用路由表更新:Configure for routing updates on async links? no: y10)是否设置异步口上的其它协议。接下来,系统会对每个接口进行参数的设置。1Configuring 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 field 0:Class C network is , 0 subnet bits; mask is /24在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:The following configuration command script was created:hostname Routerenable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1enable password pass请注意在enable secret后面显示的是乱码,而enable password后面显示的是设置的内容。就是说,secret密码的优先级比较高,在两个密码都设了的情况下,secret密码起作用。显示结束后,系统会问是否使用这个设置:Use this configuration? yes/no: yes如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。广域网协议设置PPPPPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的继承者,它提供了跨过同步和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封装的串行线路上提供安全性认证。使用CHAP和PAP认证,每个路由器通过名字来识别,可以防止未经授权的访问。任务命令设置PPP封装encapsulation ppp1设置认证方法ppp authentication chap | chap pap | pap chap | pap if-needed list-name | default callin 指定口令username name password secret设置DCE端线路速度clockrate speed举例路由器Router1和Router2的S0口均封装PPP协议,采用CHAP做认证,在Router1中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router2。同时在Router2中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router1。所建的这两用户的password必须相同。设置如下:Router1:hostname router1username router2 password xxxinterface Serial0ip address clockrate 1000000ppp authentication chap!Router2:hostname router2username router1 password xxxinterface Serial0ip address ppp authentication chap!ISDN1.综合数字业务网(ISDN)综合数字业务网(ISDN)由数字电话和数据传输服务两部分组成,一般由电话局提供这种服务。ISDN的基本速率接口(BRI)服务提供2个B信道和1个D信道(2B+D)。BRI的B信道速率为64Kbps,用于传输用户数据。D信道的速率为16Kbps,主要传输控制信号。在北美和日本,ISDN的主速率接口(PRI)提供23个B信道和1个D信道,总速率可达1.544Mbps,其中D信道速率为64Kbps。而在欧洲、澳大利亚等国家,ISDN的PRI提供30个B信道和1个64Kbps D信道,总速率可达2.048Mbps。我国电话局所提供ISDN PRI为30B+D。2.基本命令任务命令设置ISDN交换类型isdn switch-type switch-type1接口设置interface bri 0设置PPP封装encapsulation ppp设置协议地址与电话号码的映射dialer map protocol next-hop-address name hostname broadcast dial-string启动PPP多连接ppp multilink设置启动另一个B通道的阈值dialer load-threshold load显示ISDN有关信息show isdn active | history | memory | services | status dsl | interface-type number | timers注:1.交换机类型如下表,国内交换机一般为basic-net3。按区域分关键字交换机类型Australiabasic-ts013 Australian TS013 switchesEuropebasic-1tr6 German 1TR6 ISDN switches basic-nwnet3 Norway NET3 switches (phase 1) basic-net3 NET3 ISDN switches (UK, Denmark, and other nations); covers the Euro-ISDN E-DSS1 signalling system primary-net5 NET5 switches (UK and Europe) vn2 French VN2 ISDN switches vn3 French VN3 ISDN switchesJapanntt Japanese NTT ISDN switches primary-ntt Japanese ISDN PRI switchesNorth Americabasic-5ess AT&T basic rate switches basic-dms100 NT DMS-100 basic rate switches basic-ni1 National ISDN-1 switches primary-4ess AT&T 4ESS switch type for the U.S. (ISDN PRI only) primary-5ess AT&T 5ESS switch type for the U.S. (ISDN PRI only) primary-dms100 NT DMS-100 switch type for the U.S. (ISDN PRI only)New Zealandbasic-nznet3 New Zealand Net3 switches3.ISDN实现DDR(dial-on-demand routing)实例:设置如下:Router1:hostname router1user router2 password cisco!isdn switch-type basic-net3!interface bri 0ip address encapsulation pppdialer map ip name router2 572dialer load-threshold 80ppp multilinkdialer-group 1ppp authentication chap!dialer-list 1 protocol ip permit!Router2:hostname router2user router1 password cisco!isdn switch-type basic-net3!interface bri 0ip address encapsulation pppdialer map ip name router1 571dialer load-threshold 80ppp multilinkdialer-group 1ppp authentication chap!dialer-list 1 protocol ip permit!Cisco路由器同时支持回拨功能,我们将路由器Router1作为Callback Server,Router2作为Callback Client。与回拨相关命令:任务命令映射协议地址和电话号码,并在接口上使用在全局模式下定义的PPP回拨的映射类别。dialer map protocol address name hostname class classname dial-string设置接口支持PPP回拨ppp callback accept在全局模式下为PPP回拨设置映射类别map-class dialer classname通过查找注册在dialer map里的主机名来决定回拨. dialer callback-server username设置接口要求PPP回拨ppp callback request设置如下:Router1:hostname router1user router2 password cisco!isdn switch-type basic-net3!interface bri 0ip address encapsulation pppdialer map ip name router2 class s3 572dialer load-threshold 80ppp callback acceptppp multilinkdialer-group 1ppp authentication chap!map-class dialer s3dialer callback-server usernamedialer-list 1 protocol ip permit!Router2:hostname router2user router1 password cisco!isdn switch-type basic-net3!interface bri 0ip address encapsulation pppdialer map ip name router1 571dialer load-threshold 80ppp callback requestppp multilinkdialer-group 1ppp authentication chap!dialer-list 1 protocol ip permit!相关调试命令:debug dialerdebug isdn eventdebug isdn q921debug isdn q931debug ppp authenticationdebug ppp errordebug ppp negotiationdebug ppp packetshow dialershow isdn status举例:执行debug dialer命令观察router2呼叫router1,router1回拨router2的过程.router1#debug dialerrouter2#ping router1#00:03:50: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up00:03:50: BRI0:1PP callback Callback server starting to router2 57200:03:50: BRI0:1: disconnecting call00:03:50: %LINK-3-UPDOWN: Interface BRI0:1, changed state to down00:03:50: BRI0:1: disconnecting call00:03:50: BRI0:1: disconnecting call00:03:51: %LINK-3-UPDOWN: Interface BRI0:2, changed state to up00:03:52: callback to router2 already started00:03:52: BRI0:2: disconnecting call00:03:52: %LINK-3-UPDOWN: Interface BRI0:2, changed state to down00:03:52: BRI0:2: disconnecting call00:03:52: BRI0:2: disconnecting call00:04:05: : Callback timer expired00:04:05: BRI0:beginning callback to router2 57200:04:05: BRI0: Attempting to dial 57200:04:05: Freeing callback to router2 57200:04:05: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up00:04:05: BRI0:1: No callback negotiated00:04:05: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up00:04:05: dialer Protocol up for Vi100:04:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed stateto up00:04:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up00:04:11: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 572#router14.ISDN访问首都在线263网实例:本地局部网地址为/24,属于保留地址,通过NAT地址翻译功能,局域网用户可以通过ISDN上263网访问Internet。263的ISDN电话号码为2633,用户为263,口令为263,所涉及的命令如下表:任务命令指定接口通过PPP/IPCP地址协商获得IP地址ip address negotiated指定内部和外部端口ip nat inside | outside使用ppp/pap作认证ppp authentication pap callin指定接口属于拨号组1dialer-group 1定义拨号组1允许所有IP协议dialer-list 1 protocol ip permit设定拨号,号码为2633dialer string 2633设定登录263的用户名和口令ppp pap sent-username 263 password 263设定默认路由ip route bri 0设定符合访问列表2的所有源地址被翻译为bri 0所拥有的地址ip nat inside source list 2 interface bri 0 overload设定访问列表2,允许所有协议access-list 2 permit any具体配置如下:hostname Cisco2503!isdn switch-type basic-net3!ip subnet-zerono ip domain-lookupip routing!interface Ethernet 0ip address ip nat insideno shutdown!interface Serial 0shutdownno descriptionno ip address!interface Serial 1shutdownno descriptionno ip address!interface bri 0ip address negotiatedip nat outsideencapsulation pppppp authentication pap callinppp multilinkdialer-group 1dialer hold-queue 10dialer string 2633dialer idle-timeout 120ppp pap sent-username 263 password 263 no cdp enableno ip split-horizonno shutdown!ip classless! Static Routes!ip route bri 0! Access Control List 2!access-list 2 permit any!dialer-list 1 protocol ip permit! Dynamic NAT!ip nat inside source list 2 interface bri 0 overloadsnmp-server community public ro!line console 0exec-timeout 0 0!line vty 0 4!end路由协议配置RIP协议RIP(Routing information Protocol)是应用较早、使用较普遍的内部网关协议(Interior Gateway Protocol,简称IGP),适用于小型同类网络,是典型的距离向量(distance-vector)协议。文档见RFC1058、RFC1723。RIP通过广播UDP报文来交换路由信息,每30秒发送一次路由信息更新。RIP提供跳跃计数(hop count)作为尺度来衡量路由距离,跳跃计数是一个包到达目标所必须经过的路由器的数目。如果到相同目标有二个不等速或不同带宽的路由器,但跳跃计数相同,则RIP认为两个路由是等距离的。RIP最多支持的跳数为15,即在源和目的网间所要经过的最多路由器的数目为15,跳数16表示不可达。1.有关命令任务命令指定使用RIP协议router rip指定RIP版本version 1|21指定与该路由器相连的网络network network注:1.Cisco的RIP版本2支持验证、密钥管理、路由汇总、无类域间路由(CIDR)和变长子网掩码(VLSMs)2.举例Router1:router ripversion 2network network !相关调试命令:show ip protocolshow ip routeIGRP协议IGRP (Interior Gateway Routing Protocol)是一种动态距离向量路由协议,它由Cisco公司八十年代中期设计。使用组合用户配置尺度,包括延迟、带宽、可靠性和负载。缺省情况下,IGRP每90秒发送一次路由更新广播,在3个更新周期内(即270秒),没有从路由中的第一个路由器接收到更新,则宣布路由不可访问。在7个更新周期即630秒后,Cisco IOS 软件从路由表中清除路由。1.有关命令任务命令指定使用igrp协议router igrp autonomous-system1指定与该路由器相连的网络network network指定与该路由器相邻的节点地址neighbor ip-address注:1、autonomous-system可以随意建立,并非实际意义上的autonomous-system,但运行IGRP的路由器要想交换路由更新信息其autonomous-system需相同。2举例Router1:router igrp 200network network !虚拟局域网(VLAN)当前在我们构造企业网络时所采用的主干网络技术一般都是基于交换和虚拟网络的。交换技术将共享介质改为独占介质,大大提高网络速度。虚拟网络技术打破了地理环境的制约,在不改动网络物理连接的情况下可以任意将工作站在工作组或子网之间移动,工作站组成逻辑工作组或虚拟子网,提高信息系统的运作性能,均衡网络数据流量,合理利用硬件及信息资源。同时,利用虚拟网络技术,大大减轻了网络管理和维护工作的负担,降低网络维护费用。随着虚拟网络技术的应用,随之必然产生了在虚拟网间如何通讯的问题交换机间链路(ISL)协议ISL(Interior Switching Link)协议用于实现交换机间的VLAN中继。它是一个信息包标记协议,在支持ISL接口上发送的帧由一个标准以太网帧及相关的VLAN信息组成。如下图所示,在支持ISL的接口上可以传送来自不同VLAN的数据。虚拟局域网(VLAN)路由实例3.1. 例一:设备选用Catalyst5500交换机1台,安装WS-X5530-E3管理引擎,多块WS-X5225R及WS-X5302路由交换模块,WS-X5302被直接插入交换机,通过二个通道与系统背板上的VLAN 相连,从用户角度看认为它是1个1接口的模块,此接口支持ISL。在交换机内划有3个虚拟网,分别名为default、qbw、rgw,通过WS-X5302实现虚拟网间路由。以下加重下横线部分,如set system name5500C为需设置的命令。设置如下:Catalyst 5500配置:beginset password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set prompt Consoleset length 24 defaultset logout 20set banner motd CC!#systemset system baud9600set system modem disableset system name5500Cset system location set system contact!#ipset interface sc0 1 40 55set interface sc0 upset interface sl0 set interface sl0 upset arp agingtime 1200set ip redirect enableset ip unreachable enableset ip fragmentation enableset ip route 5 1set ip alias default !#Command alias!#vtpset vtp domain hneset vtp mode serverset vtp v2 disableset vtp pruning disableset vtp pruneeligible 2-1000clear vtp pruneeligible 1001-1005set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 777 name rgw type ethernet mtu 1500 said 100777 state active set vlan 888 name qbw type ethernet mtu 1500 said 100888 state active set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active bridge 0x0 stp ieee set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active bridge 0x0 stp ibm set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active parent 0 ring 0x0 mode srb aremaxhop 7 stemaxhop 7 !#set boot commandset boot config-register 0x102set boot system flash bootflash:cat5000-sup3.4-3-1a.bin!#module 1 : 2-port 1000BaseLX Supervisorset module name1set vlan 11/1-2set port enable 1/1-2!#module 2 : empty!#module 3 : 24-port 10/100BaseTX Ethernetset module name3set module enable3set vlan 13/1-22set vlan 7773/23set vlan 8883/24set trunk 3/1on isl 1-1005#module 4 empty!#module 5 empty!#module 6 : 1-port Route Switchset module name6set port level6/1normalset port trap 6/1disableset port name 6/1set cdp enable 6/1set cdp interval 6/1 60set trunk 6/1on isl 1-1005!#module 7 : 24-port 10/100BaseTX Ethernetset module name7set module enable7set vlan 17/1-22set vlan 8887/23-24set trunk 7/1 on isl 1-1005set trunk 7/2 on isl 1-1005!#module 8 empty!#module 9 empty!#module 10 : 12-port 100BaseFX MM Ethernetset module name10 set module enable10set vlan 110/1-12set port channel 10/1-4 offset port channel 10/5-8 offset port channel 10/9-12 offset port channel 10/1-2 onset port channel 10/3-4 onset port channel 10/5-6 onset port channel 10/7-8 onset port channel 10/9-10 onset port channel 10/11-12 on#module 11 empty!#module 12 empty!#module 13 empty!#switch port analyzer!set span 1 1/1 both inpkts disableset span disable!#camset cam a
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 48245-2026太阳能半球向太阳辐射和直接太阳辐射测量仪器的规格和分类
- 2026年银行从业资格考试银行风险管理实务模拟试卷及答案
- 护士资格证考试助产士技能操作模拟试题及答案
- 网络营销师考试移动营销与APP推广专项训练题库及答案
- 2026年护士资格考试护理法律法规模拟试卷及答案
- 2026年无人机驾驶员执照考试无人机飞行控制与导航系统知识考核题库及答案
- 考研数学一高等数学模拟试题及答案
- 2026年人教版初中英语下册第11单元听力测试卷及答案
- 《健康养老职业素养与安全》习题库及答案 模块三 单元一:沟通素养
- 2026年公务员考试行政职业能力测验专项训练试卷(附答案)
- 2026年深圳网约车考试题库(含答案)
- 内科疾病护理消化科
- 提高透析充分性(spKt-V)全方位精细化管理策略
- (2026年)依诺肝素的正确注射方法及注意事项课件
- 2026首创水务工程岗面试核心题库及专业参考答题答案
- 新生儿呼吸窘迫综合征个案护理报告
- GB/T 31887.3-2025自行车照明和回复反射装置第3部分:照明和回复反射装置的安装和使用
- 手足保护安全培训课件
- 危险化学品及危险废物仓库项目建设可行性研究报告
- 垃圾房清洁管理制度
- 青海省城乡建设领域碳达峰实施方案
评论
0/150
提交评论