步骤1 要继续使用设置命令工具,请输入yes:
would you like to enter the initial configuration dialog?[yes/no]:yes
步骤2 当下列信息出现时,请输入yes 以进入基本管理设置:
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 '[]'.
basic management setup configures only enough connectivity for management of the system, extended setup will ask you to configure each interface on the system would you like to enter basic management setup?[yes/no]:yes
步骤3 输入路由器的主机名(本示例使用router):
configuring global parameters:enter host name [router]:router
步骤4 输入特权加密密码。该密码是加密的(更安全)并且查看配置时不能看到它:
the enable secret is a password used to protect access to privileged exec and configuration modes.this password, after entered, becomes encrypted in the configuration.
enter enable secret:xxxxxx
步骤5 输入不同于特权加密密码的特权密码。该密码未加密(不十分安全)并且查看配置时能看到它:
the enable password is used when you do not specify an enable secret password, with some older software versions, and some boot images.
enter enable password:xxxxxx
步骤6 输入虚拟终端密码,此密码防止通过控制台端口以外的端口进行未授权的访问:
the virtual terminal password is used to protect access to the router over a network interface.
enter virtual terminal password:xxxxxx
步骤7 根据网络的具体情况对下列提示给出合适的响应:
configure snmp network management?[yes]:community string [public]:
显示可用接口的总结。
ATTENTION:显示的接口编号视cisco 模块化路由器平台的类型和已安装的接口模块及接口卡而定。
current interface summary
controller timeslots d-channel configurable modes status(表5)
any interface listed with ok? value "no" does not have a valid configuration(表6)
步骤8 选择一个可用接口,以将路由器连接到管理网络:
enter interface name used to connect to the
management network from the above interface summary:fastethernet0/0
步骤9 根据网络的具体情况对下列提示给出合适的响应:
configuring interface fastethernet0/0:
use the 100 base-tx (rj-45) connector?[yes]:yes
operate in full-duplex mode?[no]:no
configure ip on this interface?[yes]:yes
ip address for this interface: 172.1.2.3
subnet mask for this interface [255.255.0.0] : 255.255.0.0
class b network is 172.1.0.0, 26 subnet bits; mask is /16
步骤10 显示配置:
the following configuration command script was created:
hostname router
enable secret 5 $1$d5p6$pyx41/lqiask.hcsbfo5q1
enable password xxxxxx
line vty 0 4
password xxxxxx
snmp-server community public!
no ip routing!
interface fastethernet0/0
speed 100
half-duplex
ip address 172.1.2.3 255.255.0.0!
interface fastethernet0/1
shutdown
no ip address
end
步骤11 对下列提示给出响应。请选择[2] 保存初始配置。
[0] go to the ios command prompt without saving this config.
[1] return back to the setup without saving this config.
[2] save this configuration to nvram and exit.
enter your selection [2]: 2
building configuration...
use the enabled mode 'configure' command to modify this configuration.
press return to get started!return
显示用户提示。
router]
(1)重启路由器,等待路由器开始启动时按[Ctrl+Break]键中断正常的启动过程,进入到ROM状态。
(2) 修改配置寄存器的值,并重新启动
rommon 1> confreg 0x2142 //修改寄存器的值为0x2142,目的是使得路由器跳过NVRAM配置文件的执行,从而不检查原先设置的密码。
rommon 2>i //重启路由器
(3) 等待路由器启动完毕并进入setup模式后,按[Ctrl+C]键退出setup模式,修改密码
Router> enable
Router# copy startup-config running-config //将路由器NVRAM中的配置文件调出
RouterA# config teminal
RouterA(config)# enable password cisco //修改enable密码,替换原先的密码
(4) 恢复寄存器值,保存配置并重启路由器
RouterA(config)# config-register 0x2102 //恢复寄存器的值为0x2102,目的是下次重启路由器时,执行NVRAM中的配置文件
RouterA(config)# exit
RouterA# copy running-config startup-config //将配置文件保存到NVRAM中
RouterA# reload //重启路由器,可以看到重启后原有配置还存在
利用超级终端恢复路由器密码
关闭路由器电源 在十秒后重新打开路由器电源
在路由器重启的前十秒内按CTRL+PAISE
键入命令 confreg 0x2142 ’confreg 是对路由器的寄存器进行修改的命令
’0X2142 0X2102是寄存器的值 其中的4表示在路由器启动之后
跳过配置文件
键入命令 reset 重新启动路由器
en
copy start run 将启动配置文件恢复到运行配置文件中
config t
ena sec C1 将口令改为C1
config-register 0x2102 将路由器的配置寄存器的值恢复成原值
copy runn start 将运行配置文件存盘
reload
按复位键,返回出厂设置,再重新操作。一般用户名和密码是相同的。
u changed the router name not the prome -.-||
have u ran the command:
rotuer# conf t
router(config)# hostname yang -------------------that is change router name!
============================================================
NOW this router calls "yang" not "router" any more, change it back:
yang>enable
yang# conf t
yang(config)# hostname router
rotuer(config)#end
router#exit
router>