1、路由器进入特权命令状态router#后,不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。此时就可以对路由器的名字、密码等进行设置。3、router(config)#在router#提示符下键入configure terminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的全局参数。4、router(config-if)#; router(config-line)#; router(config-router)#;路由器处于局部设置状态,这时可以设置路由器某个局部的参数。5、路由器处于RXBOOT状态,在开机后60秒内按ctrl-br
2、eak可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。在此状态下,可以进行口令恢复。三、常用命令 1.帮助在IOS操作中,无论任何状态和位置,都可以键入“?”得到系统的帮助。系统会显示此时可以使用的命令。2.改变命令状态任务命令进入特权命令状态enable退出特权命令状态disable进入设置对话状态Setup进入全局设置状态config terminal退出全局设置状态End进入端口设置状态interface type slot/number进入子端口设置状态interface type number.subinterface point-to-point | mul
3、tipoint进入线路设置状态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路由跟踪T
4、race 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
5、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 mar
6、k ? 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 yo
7、u like to see the current interface summary?Any interface listed with OK? value NO does not have a valid configurationInterfaceIP-AddressOK?MethodStatusProtocolEthernet0unassignedNOunsetupupSerial0unassignedNOunsetupup然后,路由器就开始全局参数的设置:Configuring global parameters:1设置路由器名:Enter host name Router:2设置进
8、入特权状态的密文(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 softw
9、are and some boot images.Enter enable password: pass4设置虚拟终端访问时的密码:Enter virtual terminal password:5询问是否要设置路由器支持的各种网络协议:Configure SNMP Network Management? Configure DEet? no:Configure AppleTalk?Configure IPX?Configure IP?Configure IGRP routing?Configure RIP routing?6如果配置的是拨号访问服务器,系统还会设置异步口的参数:Configu
10、re Async lines?1)设置线路的最高速度:Async line speed 9600:2)是否使用硬件流控:Configure for HW flow control?3)是否设置modem:Configure for modems? yes/no: yes4)是否使用默认的modem命令:Configure for default chat script?5)是否设置异步口的PPP参数:Configure for Dial-in IP SLIP/PPP access?6)是否使用动态IP地址:Configure for Dynamic IP addresses?7)是否使用缺省I
11、P地址:Configure Default IP addresses?是否使用TCP头压缩:Configure for TCP Header pression?9)是否在异步口上使用路由表更新:Configure for routing updates on async links? y10)是否设置异步口上的其它协议。接下来,系统会对每个接口进行参数的设置。1Configuring interface Ethernet0:1)是否使用此接口:Is this interface in use?2)是否设置此接口的IP参数:Configure IP on this interface?3)设置接
12、口的IP地址:IP address for this interface: 192.168.162.24)设置接口的IP子网掩码:Number of bits in subnet field 0:Class C network is 192.168.162.0, 0 subnet bits; mask is /24在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:The following configuration mand script was created:hostname Routerenable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG5
13、3Uh1enable password pass请注意在enable secret后面显示的是乱码,而enable password后面显示的是设置的内容。就是说,secret密码的优先级比较高,在两个密码都设了的情况下,secret密码起作用。显示结束后,系统会问是否使用这个设置:Use this configuration?如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。广域网协议设置PPPPPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的继承者,它提供了跨过同步
14、和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封装的串行线路上提供安全性认证。使用CHAP和PAP认证,每个路由器通过名字来识别,可以防止XX的访问。设置PPP封装encapsulation ppp1设置认证方法ppp authentication chap | chap pap | pap chap | pap if-n
15、eeded 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 passw
16、ord xxxinterface Serial0ip address 192.200.10.1 255.255.255.0clockrate 1000000ppp authentication chap!Router2:hostname router2username router1 password xxxip address 192.200.10.2 255.255.255.0ISDN1.综合数字业务网(ISDN)综合数字业务网(ISDN)由数字和数据传输服务两部分组成,一般由局提供这种服务。ISDN的基本速率接口(BRI)服务提供2个B信道和1个D信道(2B+D)。BRI的B信道速率为6
17、4Kbps,用于传输用户数据。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 protoco
18、l 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 sw
19、itchesEuropebasic-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 switc
20、hesJapanntt 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 t
21、ype 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)实例:user router2 password ciscoisdn switch-type basic-net3interface bri 0encapsulation pppdialer map ip 192.200.10.2 n
22、ame router2 572dialer load-threshold 80ppp multilinkdialer-group 1!dialer-list 1 protocol ip permituser router1 password ciscodialer map ip 192.200.10.1 name router1 571dialer load-threshold 80Cisco路由器同时支持回拨功能,我们将路由器Router1作为Callback Server,Router2作为Callback Client。与回拨相关命令:映射协议地址和,并在接口上使用在全局模式下定义的PP
23、P回拨的映射类别。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 requestdialer map ip 192.200.10.2 name router2 class s3 572ppp c
24、allback acceptmap-class dialer s3dialer callback-server usernameppp callback request相关调试命令:debug dialerdebug isdn eventdebug isdn q921debug isdn q931debug ppp authenticationdebug ppp errordebug ppp negotiationdebug ppp packetshow dialershow isdn status举例:执行debug dialer命令观察router2呼叫router1,router1回拨rou
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1