ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:19.63KB ,
资源ID:4389138      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/4389138.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(CISCO路由器常用命令.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

CISCO路由器常用命令.docx

1、CISCO路由器常用命令CISCO 路由器常用命令做为网管这一项是必备的技能有些命令让许多朋友记得头痛我就分批次贴在这儿吧忘了可以上来看看:)一、如何登陆到路由器可以用终端通过console连接,也可以通过TCP/IP来连接例:c:telnet 172.16.0.1Password:YourpassRouterName?#显示在用户模式下面所有可用的命令,回车隔行翻动、空格满屏翻动#RouterNameq#q或exit都可以直接退出用户模式,返还到Dos界面#RouterNameenable#从用户模式跳转到特权模式,如果有密码认证就必须输入密码才能进入#RouterName#q或exit都可

2、以直接退出特权模式,返还到Dos界面,输入disable可以退回到用户模式#RouterNamec onfig#跳转到配置模式#RouterName(config)#interface fastethernet 0/0#配置快速以太网接口模式#RouterName(config)#interface serial 0/0#配置串口模式#RouterName(config-if)#?#输入问号查看相应命令#RouterName(config-if)#encapsulation ?#显示串口的封装类型,输入exit可退出接口或以太口配式模式#RouterName(config)#exit#输入ex

3、it可退出配置模式,再输入exit可退出路由器#二、设置路由器时钟RouterName#cl?#可以查看路由器下以CL开头的所有命令#RouterName#clock ?#可以查看clock的所有参数#RouterName#clock set hh:mm:ss mouth mouth yearRouterName#show clock#查看目前系统时钟#三、系统编辑模式RouterName#terminal editing#打开系统编辑模式#RouterName#terminal no editing#关闭系统编辑模式#Ctrl+a#移动光标到开头处#Ctrl+e#移动光标到尾部#Ctrl+f

4、#向前移动光标#Ctrl+b#向后移动光标#Ctrl+p#翻动历史命令记录#RouterName#show history#显示所有记录的历史命令#RouterName#terminal history size ?#修改缓存中最大的命令记录条数,一般最大为256条#RouterName#show terminal#查看terminal状况#RouterName#show star或show run#显示所有配置信息,可以使用Tab键显示出完整命令#如show startup-config或show running-config#四、如何储存路由器的配置路由器里面有两种RAM:1.NVRAM冷

5、启动的存储配置引导2.RAM目前工作中的配置内容RouterName#copy running-config startup-configRouterName#wr#拷贝RAM里面的配置到NVRAM中#RouterName#erase start#擦除NVRAM中的配置#RouterName#reload#重启路由器#五、如何设置路由器的密码RouterName(config)#enable ?RouterName(config)#enable passwordRouterName(config)#enable secret#有两种密码形式1.secret加密的 2.password明文的#如

6、果同时起用,secret与password的密码不能相同#secret优先级password#RouterName(config)#no enable passwordRouterName(config)#no enable secret#去掉密码设置#RouterName(config)#line ? First line numberAux Auxiliary lineConsole Primary terminal linetty Terminal controllervty Virtual terminal#Aux辅助密码Console密码tty终端密码vty虚拟密码#RouterNa

7、me(config)#line con 0RouterName(config)#loginRouterName(config)#password yourpassword1RouterName(config)#line vty 0 4#定义五个虚拟端口#RouterName(config)#loginRouterName(config)#password yourpassword2RouterName(config)#line aux 0RouterName(config)#loginRouterName(config)#password yourpassword3#设置console vty

8、及Aux密码#RouterName(config)#line con 0RouterName(config)e xec-timeout 0 0#设置console口登陆后在超时后不被退出#RouterName(config)#logging synchronous#设置同步显示,输入命令时不被路由器的显示打挠#六、如何设置路由器的主机名、描述、IP地址和时钟频率RouterName(config)#hostname Yourhostname#设置路由器名称#RouterName(config)#banner ?RouterName(config)#banner motd #Enter TEXT

9、 message. End with the character #.welcome to motd Router#RouterName(config)#banner login #Enter TEXT message. End with the character #.welcome to login Router#设置路由器banner,motd优先级login#RouterName(config)#no banner motdRouterName(config)#no banner login#删除banner#RouterName(config)#interface fastether

10、net 0/0RouterName(config-if)#ip address 172.16.0.1 255.255.0.0#IP地址绑定到了快速以太网的接口上#RouterName(configif)#no shutdown#直接起用该IP,注意如果你是用telnet配置的,这时就会断线#RouterName(configif)#interface serial 0/0RouterName(configif)#ip address 172.16.1.1 255.255.0.0RouterName(configif)#no shutdown#IP地址绑定到串口上#不同接口的IP地址要保证在不同

11、的网段上#RouterName(configif)#description WAN link to BeiJing#描述说明Wan link to BeiJing#RouterName(configif)#bandwidth 512#带宽大小#RouterName(configif)#clock rate 64000#时钟频率#RouterName(configif)#endRouterName#show interface serial 0/0七、如何创建静态路由项RouterName(config)#ip route 192.168.0.0 255.255.255.0 172.16.0.2

12、RouterName(config)#copy run start#创建静态项,并保存#RouterName(config)#no ip route 192.168.0.0 255.255.255.0 172.16.0.2#删除静态项#RouterName(config)#ping 192.168.0.1#可以用ping功能测试是否成功#RouterName#show ip protocol#显示当前协议类型#RouterName#show ip route#显示路由配置,C表示直连 S表示静态路由项 R表示RIP I表示IGRP#八、使用RIP协议来配置动态路由RouterName(conf

13、ig)#no ip route 192.168.0.0 255.255.255.0 172.16.0.2#在创建动态路由前,必须把静态路由全部删除#因为静态路由优先级为1IGRPRIP#RouterName(config)#router ripRouterName(config-router)#network 192.168.0.0#这儿不需要输入掩码,因为RIP只支持默认掩码#RouterName(config-router)#end九、使用IGRP协议来配置动态路由RouterName(config)#router igrp ?RouterName(config)#router igrp

14、100#100项可任选,如果确定,那么其它路由器也要选择100项#RouterName(config-router)#network 192.168.0.0RouterName(config-router)#endRouterName#traceroute 192.168.0.15#可以用traceroute命令测试经过的路由#RouterName(config)#router igrp 100RouterName(config-router)#variance ?RouterName(config-router)#variance 1RouterName(config-router)#tra

15、ffic-share ?balanced Share inversely proportional to metricmin All traffic shared among min metric paths#balanced表示可以平衡即多个包可以同时走多条路#min表示只允许走最快的一条路#十、Cisco交换机Vlan的划分SwitchAenable#进入特权模式#SwitchA#show vlan#显示当时信息,一般默认所有Port都处于Vlan1#SwitchA#vlan database#进入Vlan的配置模式#SwitchA(vlan)#?#查看当前所有可用命令#SwitchA(v

16、lan)#vlan ?SwitchA(vlan)#vlan 2SwitchA(vlan)#exit#建立一个vlan并退出#SwitchAc onfig#进入配置模式#SwitchA(config)#interface fastethernet0/3SwitchA(config-if)#switchport ?#显示所有类型#SwitchA(config-if)#switchport access ?SwitchA(config-if)#switchport access vlan 2SwitchA(config-if)#endSwitchA#show vlan#可以再次查看vlan情况#十一

17、、如何备份路由器的IOS首先要在PC电脑上装载cisco TFTP服务下载地址见下面链接保证TFTP正常运作Feedomnet#ping 172.16.10.5#假设TFTP服务器地址为172.16.10.5#ping以确保能否与TFTP服务器正常通信#Feedomnet#show flash#显示闪存中空间状况#Feedomnet#show version#显示版本号,起动时间,注册码等等#System image file is flash:c2600-i-mz.120-7.T#载取show version中的版本部分,当然也可以用show flash查看#Feedomnet#copy f

18、lash tftpSource filename ?c2600-i-mz.120-7.T#要求我们输入源文件名即IOS文件名#注意这儿大小写是敏感的#Address or name of remote host ?172.16.10.5#要求我们输入目标主机的ip#Destination filename c2600-i-mz.120-7.T?#要求我们输入目标文件名称,回车即可#开始copy,!表示成功无误,TFTP是使用UDP方式传输包#copy过程中,路由器与TFTP服务器是双向进行的#IOS文件的备份是非常重要的一个部份#完成拷贝后TFTP会提示Successful而路由器也会提示完成

19、并自动回到特权模式#在TFTP-View-Option-TFTP server root可以看到IOS备份的路径#十二、如何更新路由器的IOSFeedomnet#copy tftp falshAddress or name of remote host ?172.16.10.5Source filename ?c2600-i-mz.120-7.TDestiantion filename c2600-i-mz.120-7.T?#如果目标文件名换成新的文件名#那么在路由器中将存在两个IOS文件,如果空间不成问题#如果直接回车,表示不更改文件名称,那么将复盖原来的IOS文件#Do you want

20、to over write?confirm#不更改文件名,回车确认复盖#Erase flash:before copying? confirmErasing the flash filesystem will remove all files! continue? confirmVerifying Checksum. OK (0XBDFF)十三、如何备份路由器的配置Feedomnet#copy run tftpAddress or name of remote host ?172.16.10.5Destination filename 2620a-config?#拷贝running-confi

21、g到tftp#Feedomnet#copy startup-config tftpAddress or name of remote host ?172.16.10.5Destination filename startup-config?2620a-startup#可以随便起个名字#拷贝startup-config到tftp#可以回到tftp服务器找到该两个配置内容#可以用记事本打开查看#十四、如何使用CDP协议Feedomnet#show cdpFeedomnetc onfigFeedomnet(config)#cdp timer ?Feedomnet(config)#cdp timer

22、60Feedomnet#show cdp ?Feedomnet#show cdp interface#显示当前路由器CDP的状态#Feedomnet#show cdp entry *#显示所有直接连接设备的具体信息#Feedomnet#show cdp neighbor#显示所有直接连接的邻居#Feedomnet#show cdp neighbor detail#显示所有直接连接的邻居设备的细节#Feedomnetc onfigFeedomnet(config)#no cdp run#禁用cdp#Feedomnet(config)#cdp run#启用cdp#Feedomnet#show cd

23、p n#显示#十五、如何正确的使用telnet使用consol连上本地路由器Feedomnet#telnet 192.168.0.1#连接到远端的路由器#Router1#exit#退回到本机路由器#Feedomnet#telnet 192.168.0.2#连接到远端的路由器2#Router2#exit#退回到本机路由器#Feedomnet#show sessions#显示历史连接记录#Conn Host Address Byte Idle Conn Name1 192.168.0.1 192.168.0.1 0 1 192.168.0.1* 2 192.168.0.2 192.168.0.2

24、0 0 192.168.0.2Feedomnet#1#可以选择曾经连接过的路由器#按两次回车马上进入#不选择两次回车进入默认的路由器即星号的路由器#Feedomnet#192.168.0.1#telnet到该路由器,可缺省telnet命令#Router1#show user#显示该路由器使用的用户#Router1#clear line 22#断开使用者的会话#十六、如何完成解析主机名Feedomnet#Feedomnetc onfigFeedomnet(config)#ip host RouterA 172.16.0.2Feedomnet(config)#ip host RouterB 172

25、.16.0.3#增加IP主机影射项#Feedomnet(config)#endFeedomnet#ping RouterAFeedomnet#ping RouterBFeedomnet#show hosts#显示所有刚刚添加的主机项目#Feedomnet(config)#no ip host RouterA#删除主机项#十七、如何配置IP标准的访问列表Feedomnet(config)#access-list ?#查看所有的访问列表的类型#Feedomnet(config)#access-list 10 permit 172.16.10.100 ?Feedomnet(config)#acces

26、s-list 10 permit 172.16.10.100 0.0.0.0Feedomnet(config)#int fast0/0Feedomnet(config-if)#ip access-group 10 inFeedomnet(config-if)#endFeedomnet#show access-list十八、如何配置IP扩展的访问列表#注意在配置扩展前要把标准的列表给删除掉#Feedomnet(config)#access-list 110 deny ?Feedomnet(config)#access-list 110 deny tcp host 172.16.10.6 host

27、 172.16.10.254 eq telnet log#拒绝172.16.10.6这台电脑用telnet访问172.16.10.254路由器#Feedomnet(config)#access-list 110 permit ip any any#允许所有的通过,以上两条命令一般都是联系起来做的#Feedomnet(config)#int f0/0Feedomnet(config-ip)#ip access-group 110 in#把所配的110配置与快速以太网口联系起来#Feedomnet(config-ip)#endFeedomnet#sh run十九、如何配置ppp协议#首先在路由器A

28、进行配置#FeedomA#show int s0/0#可以查看当前的封装模式#FeedomAc onfigFeedomA(config)#int s0/0FeedomA(config-if)#encapsulation pppFeedomA(config-if)#exitFeedomA(config)#username FeedomB password ciscoFeedomA(config)#int s0/0FeedomA(config-if)#ppp authintication chapFeedomA(config-if)#endFeedomA#show int s0/0#再次显示当前的

29、封装类型以确认#再到路由器B进行配置#FeedomB#show int s0/0#可以查看当前的封装模式#FeedomBc onfigFeedomB(config)#int s0/0FeedomB(config-if)#encapsulation pppFeedomB(config-if)#exitFeedomB(config)#username FeedomA password cisco#这里注意双方密码要一致#FeedomB(config)#int s0/0FeedomB(config-if)#ppp authintication chapFeedomB(config-if)#endFeedomB#show int s0/0#再次显示当前的封装类型以确认#FeedomB#debug ppp authen#起用ppp的验证调试#二十、使用HDLC来配置serial口FeedomA(config)#int s0/0FeedomA(config-if)#encapsulation hdlc#以下跳到另一台路由器#FeedomB(confi

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1