计算机网络/计算机科学与应用/系统/运维/开发

2、密码恢复和基本配置


一、如果路由器的登录密码忘记如何操作?

1、先打开终端连接 比如打开pc 命令窗口

2、将路由器的电源开关先关后开  同时查看步骤1  按ctrl+break 或者 ctrl+c

image.png


3、
image.png


输入命令

rommon 1>confreg 0x2142

rommon 1> reset


4、

image.png


5、恢复原有配置

image.png


6、设置新口令

(1)、进入全局配置模式

Rt99a# configure terminal

(2)、将特权模式口令设置为新口令 99cisco

Rt99a# enable secret 99cisco

(3)、将本地登录口令设置为新口令 99con0

Rt99a(config)# line con  0

Rt99a(config-line)# password 99con0

Rt99a(config-line)# login


7、恢复配置寄存器正常值 0x2102

Rt99a(config-line)# exit

Rt99a(config)# config-register 0x2102

Rt99a(config)#end


9、保存配置

Rt99a# copy running-config  startup-config

Destination filename [startup-config]?


10、重启路由器

Rt99a# reload


注意:以上配置必须要接触路由器开关电源设备。


注意以下几个问题:

1、

image.png


2、

Rt99a(config)#line con

Rt99a(config)#line con 0    #本地登录

Rt99a(config-line)#log

Rt99a(config-line)#logging s

Rt99a(config-line)#logging synchronous   #同步日志信息避免干扰

Rt99a(config-line)#exe

Rt99a(config-line)#exec-timeout 0 0   # 取消自动退出保持连接

Rt99a(config-line)#line vty 0 4

Rt99a(config-line)#logging s

Rt99a(config-line)#logging synchronous  #同步日志信息避免干扰

Rt99a(config-line)#no ex

Rt99a(config-line)#no exec-timeout  # 取消自动退出保持连接

Rt99a(config-line)#exit   # 退出到配置模式

Rt99a(config)#ser

Rt99a(config)#service pas

Rt99a(config)#service password-encryption   # 所有密码加密保存  

Rt99a(config)#end   # 退出到特权模式

Rt99a#

%SYS-5-CONFIG_I: Configured from console by console


Rt99a#w    #加密保存

Building configuration...

[OK]

Rt99a#


二、路由器基本配置

Router>

Router>

Router>conf t

^

% Invalid input detected at '^' marker.

Router>

Router>en

Router#conf t

Router#conf terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#

Router(config)#hsotname Rt99a

^

% Invalid input detected at '^' marker.

Router(config)#no ip dom

Router(config)#no ip domain-l

Router(config)#no ip domain-lookup

Router(config)#en

Router(config)#ena

Router(config)#enable s

Router(config)#enable secret 99secret

Router(config)#

Router(config)#ser

Router(config)#service p

Router(config)#service password-encryption

Router(config)#line con

Router(config)#line console 0

Router(config-line)#

Router(config-line)#logging s

Router(config-line)#logging synchronous

Router(config-line)#pas

Router(config-line)#password 99con0

Router(config-line)#login

Router(config-line)#line vty 0 4

Router(config-line)#loggin

Router(config-line)#logging s

Router(config-line)#logging synchronous

Router(config-line)#exec-t

Router(config-line)#exec-timeout 0 0

Router(config-line)#pas

Router(config-line)#password 99vty04

Router(config-line)#login

Router(config-line)#hostname Rt99a

Rt99a(config)#

Rt99a(config)#

image.png

三、查看路由器基本信息

进入特权模式后

#show running-config   #查看运行配置

#show startup-config  # 查看启动配置

#show interfaces   # 查看接口信息

#show version  #查看ios版本信息

#show flash  # 查看闪存内容

#show  protocols # 查看网络协议

#show processes # 查看进程

# show ip arp  #  查看ARP信息


人生在世,不如意事十之八九;人生的滋味,哪怕是酸甜或苦辣,也要靠自己去品。人活一口气:气质看一个人的过去,气度看一个人的未来

评论

^