口令恢复的关键在于对配置登记码(Configuration Register Value)进行修改,从而让路由器从不同的内存中调用不同的参数表进行启动。有效口令存放在NVRAM中,因此修改口令的实质是先让登记码不起作用,从而可以进行直接启动,完成后再将登记码恢复(如忘记恢复,路由器重新启动后修改的配置可能会丢失)。
Configuration Register Value 含义 0X2102 缺省设置 Bit13=0X2000 Flash引导失败5次后,自动从ROM引导 Bit8=0X0100 关闭Break键 Boot field=0X20X2101 从Flash中引导正常运行模式 Boot field=0X10X142 进入boot ROM运行模式Router(boot)> Bit8=0X0040 进入boot monitor运行模式>或rommon> Boot field=0X2 从Flash中引导正常运行模式 |
具体的操作步骤
>o/r0x2142 Cisco 2500系列 rommon 1>confreg 0x2142 Cisco 2600 1600系列 boot#set ios-conf=0x2142 Cisco 800系列 |
Router#configure memory |
Router#configure terminal Router(config)#config-register 0x2102 Router(config)#interface xx Router(config)#no shut |
Router#show configure (show startup-config) |
Router#configure termonal Router#enable secret xxxxxxx Router(config)#line console 0 Router(config-line)#login Router(config-line)#password xxxxxxx Router(config-line)# |
检较位:无
数据位:8
停止位:1
流控:无
cisco 3745 (R7000) processor (revision 2.0) with 116736K/14336K bytes of memory. Processor board ID JPE0810106M R7000 CPU at 350Mhz, Implementation 39, Rev 3.3, 256KB L2, 2048KB L3 Cache Channelized E1, Version 1.0. Bridging software. X.25 software, Version 3.0.0. Primary Rate ISDN software, Version 1.1. 2 FastEthernet/IEEE 802.3 interface(s) 4 Channelized E1/PRI port(s) DRAM configuration is 64 bits wide with parity disabled. 151K bytes of non-volatile configuration memory. 31168K bytes of ATA System CompactFlash (Read/Write) --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]: n Press RETURN to get started! |
Router#
Router#write
Cisco2500系列路由器(以2509为例)登陆密码的恢复具体操作方法:
configuration register=0X2102 at last boot
……
rommon 2>reset
2509#configure terminal 2509(config)#config?register 0X2102 2509(config)#interface e0/1 2509(config)#no shutdown |
2509#configure terminal 2509(config)line console 0 2509(config line)#login 2509(config line)#password xxxxxxx 2509(config line)# 2509(config line)#write memory (copy running config startup?config) |
0
收藏
转载于:https://blog.51cto.com/ciscolj/73053
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/111026.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...