cisco router基本命令.doc_第1页
cisco router基本命令.doc_第2页
cisco router基本命令.doc_第3页
cisco router基本命令.doc_第4页
cisco router基本命令.doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

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

文档简介

cisco router基本命令网际操作系统(IOS)用户接口提供了几种不同的命令访问模式,每一个命令模式提供了一组相关的命令.为安全起见,IOS 提供了两种命令访问级别:User和Priviledged.无优先级的,用户模式称作 User EXEC 模式,而 Priviledged EXEC 被称作超级用户模式,需要有口令才能进入.用户模式下的命令集是超级用户下命令集的子集 .在超级用户级别下,你可以进入配置模式和其下的十个特定的配置模式: interface, subinterface, controller, hub, map-list, map-class, line, router, ipx-router, router-map 等配置.大多数系统配置命令都有no 的形式,通常用no来取消掉一个配置过的命令.另外,在各种模式下的命令均可以用 ? 来查找自己所需的命令.下表列出几种命令模式,进入及退出的方法等等.命令模式 进入方式 提示符 退出方法 User EXEC 登录上路由器 Router 用logout命令退出 Priviledged EXEC User模式下,用enable命令Routerenable Router# 用exit或 disable命令退到 user EXEC模式 Gobal Configuration 在priviledged EXEC 模式下,configuration命令Router#config terminal Router(config)# 用exit或 end或 Ctrl-Z命令退到 priviledged EXEC模式 Interface Configuration 在Global configuration下,用interface命令进入具体的端口Router(config)#interface interface-type interface-number Router(config-if)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 subinterface configuration 在interface模式下用 interface进入指定子端口Router(config-if)#interface interface-type interface-number.number Router(config-subif)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 controller configuration 在Global configuration模式下,用 controller命令配置T1或E1端口Router(config)#controller e1 slot/port 或 number Router(config-controller)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 Hub configuration 在Global configuration模式下,用 hub 命令指定具体的hub端口Router(config)#hub ethernet number port Router(config-hub)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 Line configuration 在Global configuration模式下,用line 命令指定具体的line端口Router(config)#line number 或 vty| aux |con number Router(config-line)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 Router configuration 在Global configuration模式下,用router igrp 命令指定具体的路由协议 Router(config)#router protocol option Router(config-router)# 用exit退出configuration 模式,或用Ctrl-Z直接退到priviledged EXEC模式 * User EXEC 模式当用终端上路由器后,系统直接进入User EXEC模式,它的命令是超级用户下的子集.通常,User EXEC模式命令可以连接远端路由器,完成基本测试和系统信息显示.在User EXEC下的系统提示符是路由器名和后面紧跟的号:Router在此下面,用户可以 ? 列出命令提示.*Priviledged EXEC 模式为安全起见,象UNIX操作系统一样,在路由器的指令系统中,设定了一个超级用户模式,在这个级别下,用户可以更改配置,监控网络状态等等.在User EXEC下,enable进入超级用户下.Router enablePassword:Router#*Global 配置模式Global配置模式是在超级用户下实现的,它下面还有十个子模式,针对不同的配置方式.Router#configure terminalRouter(config)#*保存配置文件Cisco IOS 的指令系统是配置完后即时生效的,但当关掉电源后会自动丢失.因此,要想保留作的配置,必须在关机前把当前配置写入NVRAM中,下次开机时,自动从NVRAM中调入配置文件并执行.Router#write memory*监控程序在Global模式下,Cisco IOS作了许多监控程序,它可以帮助用户调试,监控网络状态,性能等等.Router# show ?在 ? 下有许多信息,帮助你找寻想要的命令.例如:Router# show conf 显示配置文件的配置Router# show running-config 显示当前正在运行的配置Router# show interface ethernet 0 查看以太口0的状态*slot/port在Cisco 7000/7500路由器上,不同的端口是在不同的接口卡上的.故指定某一个端口必须包括槽口号和端口号.例如:interface serial 4/5就表示串口卡在槽4上的第五个串口cisco router调试初步对于每一个路由器来说,都有一个控制台接口(Console),管理员可以通过RS-232 线缆把控制口和一个终端的主口连接起来,通过这个终端对路由器进行配置.终端通讯参数设置为:速度: 9600bps 起始位: 1位 数据位: 8位 停止位: 1或2位 校验: 无 待终端通讯参数设置完毕后,接好路由器控制台,请先打开终端电源,后开路由器电源,之后就进入初始配置了.屏幕出现(以Cisco 2501为例):System Bootstrap, Version 5.2(5), RELEASE SOFTWARECopyright (c) 1986-1994 by cisco Systems2500 processor with 2048 Kbytes of main memory大约停顿1-2分钟,系统调入boot,请耐心等待F3: 3996764+54172+225404 at 0x3000060Restricted Rights LegendUse, duplication, or disclosure by the Government issubject to restrictions as set forth in subparagraph(c) of the Commercial Computer Software - RestrictedRights clause at FAR sec. 52.227-19 and subparagraph(c) (1) (ii) of the Rights in Technical Data and ComputerSoftware clause at DFARS sec. 252.227-7013.cisco Systems, Inc.170 West Tasman DriveSan Jose, California 95134-1706Cisco Internetwork Operating System SoftwareIOS (tm) 2500 Software (C2500-I-L), Version 11.2(1), MAJOR RELEASE SOFTWARE (fc1)Copyright (c) 1986-1996 by cisco Systems, Inc.Compiled Mon 30-Sep-96 12:07 by ajchopraImage text-base: 0x030215A4, data-base: 0x00001000cisco 2500 (68030) processor (revision D) with 2048K/2048K bytes of memory.Processor board ID 02327592, with hardware revision 00000000Bridging software.X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.1 Ethernet/IEEE 802.3 interface(s)2 Serial network interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash (Read ONLY)Notice: NVRAM invalid, possibly due to write erase.- 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 .Would you like to enter the initial configuration dialog? yes:Return你是否要进入初始化配置?默认是.First, would you like to see the current interface summary? yes:Return首先,你是否想看一下当前端口的状态?默认是.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 down Serial0 unassigned NO unset down down Serial1 unassigned NO unset down down Configuring global parameters:Enter host name Router: JSRouter设置系统名,如JSRouter.The enable secret is a one-way cryptographic secret usedinstead of the enable password when it exists.Enter enable secret: cisco设置进入priviledged EXEC 的密码The enable password is used when there is no enable secretand when using older software and some boot images.Enter enable password: cisco1 (1)Enter virtual terminal password: cisco设置进入虚拟终端登录到路由器的口令,即远程登录(telnet)的口令Configure SNMP Network Management? yes:Return是否设置简单网管协议?Community string public:ReturnConfigure IP? yes:Return是否设置IP协议?Configure IGRP routing? yes:Return (2)是否设置IGRP 路由协议?Your IGRP autonomous system number 1:Return (3)你的IGRP 路由协议自治系统号(AS),默认为1.Configuring interface parameters:下面配置端口参数Configuring interface Ethernet0:ReturnIs this interface in use? yes:ReturnConfigure IP on this interface? yes:ReturnIP address for this interface: Number of bits in subnet field 0:Return (4)Class A network is , 0 subnet bits; mask is /8以上是配置以太口0,假设IP地址是,掩码是.Configuring interface Serial0:ReturnIs this interface in use? yes:ReturnConfigure IP on this interface? yes:ReturnConfigure IP unnumbered on this interface? no:ReturnIP address for this interface: Number of bits in subnet field 0:ReturnClass A network is , 0 subnet bits; mask is /8以上是配置串口0,假设IP地址是,掩码是.Configuring interface Serial1:ReturnIs this interface in use? yes: no以上是当不需要用串口1时,请敲入no.The following configuration command script was created:hostname JSRouterenable secret 5 $1$Bv.r$j/Zm2B6jw9UTQPxLGZjAz.enable password cisco1line vty 0 4password ciscosnmp-server community public!ip routing!interface Ethernet0ip address !interface Serial0ip address !interface Serial1shutdownno ip address!router igrp 1network network !endUse this configuration? yes/no: yes (5)确认当前配置后,把当前配置写入NVRAM 中.这样以后开机自动把配置调入内存,不需要重新配置了.Building configuration.Use the enabled mode configure command to modify this configuration.Press RETURN to get started!%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down%LINK-3-UPDOWN: Interface Ethernet0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINK-3-UPDOWN: Interface Serial1, changed state to down%LINK-5-CHANGED: Interface Serial1, changed state to administratively down%SYS-5-RESTART: System restarted -Cisco Internetwork Operating System SoftwareIOS (tm) 2500 Software (C2500-I-L), Version 11.2(1), MAJOR RELEASE SOFTWARE (fc1)Copyright (c) 1986-1996 by cisco Syst

温馨提示

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

评论

0/150

提交评论