用路由器和交换机搭建实验环境
实现管理员主机对交换机和路由器的远程管理
设备上配置的密码都要被加密
对于路由器的步骤如下:
对于交换机的步骤如下:
1分钟内按【Ctrl+Break】键进入ROM监控(ROM Monitor ) rommon模式,如下所示:
- ####################################
- monitor: command "boot" aborted due to user interrupt
- rommon 1 >
rommon 1 > confreg 0x2142
- rommon 2 > reset
- //路由器重启后会询问是否进入到setup配置模式,用【CtrH+C】或回答“n",退出 setup模式
- Router>enable
- Router#copy startup-config running-config
- Destination filename [running-config]?
- R1(config)#enable secret cisco123
-
- R1(config)#line console 0
- R1(config-line)#password cisco123
- R1(config-line)#login
- R1(config-line)#exit
- R1(config)#config-register 0x2102
- R1(config)#exit
-
- R1#copy running-config startup-config //保存配置
R1#reload
这表示已经进入一个专门用来做故障恢复的简单I0S,由于没有密码
正常的IOS无法进入,因此只能先在这里做一些参数设定
- The password-recovery mechanism is enabled.
- The system has been interrupted prior to initializing the flash filesystem.
- The following commands will initialize
- the flash filesystem,and finish loading the operating
- system software:
- flash init
- boot
- Switch:
- Switch: flash init
- Initializing Flash....
- flashfs[0]:350 files,5 directories
- flashfs[0]: 0 orphaned files,0 orphaned directories
- flashfs[0]:Total bytes:15998976
- flashfs[0]: Bytes used: 8311296
- flashfs[0]: Bytes available: 7687680
- flashfs[0]: flashfs fsck took 16 seconds.
- ······done Initializing Flash.
- Boot Sector Filesystem (bs:) installed,fsid: 3
- Switch:
Switch: rename flash:config.text flash:config.old
Switch:boot
Switch# rename flash:config.old flash:config.text
Switch# copy flash:config.text system;running-config
至此试验结束。