上一篇我们谈到“交换机密码恢复”,今天南京CCIE培训在和大家介绍一下交换机密码恢复管理。
即使是一个规模较大的公司,可能需要的路由器设备是少数的,可以将路由器放在机房的机柜里,锁上机房门和机柜门,一般人是碰不到路由器设备的。
但是如果由于公司人数众多,或者由于场地的原因,或者再由于别的原因,如双绞线的有效传输范围为100米,也就表示主机离交换机的距离不能超过100米,在这些情况下,可能需要将交换机放置在离员工近距离的地方,有时选择直接放在员工办公的Office房间里。
因为我们知道,当交换机放置在一个能让人物理接触到的位置时,就可以通过绕过密码的方式对交换机进行配置修改,比如网络管理员在交换机上对网络做过某些访问限制,或者QOS带宽限制,那么就有人会尝试着接触交换机修改其中的配置,这对于网络管理员来说,是不容易发现的。
因为无论是路由器还是交换机,都可以通过物理接触来绕过密码,从而修改配置信息,而由于交换机的特殊性,所以交换机系统集成了一个特殊的功能,就是可以开启或关闭对交换机密码恢复功能,如果此功能打开,则可以通过物理接触来绕过密码,如果关闭,则交换机的全部配置信息会自动全部删除,在因为交换机被别人误动而造成配置全部丢失,作为网络管理员,是有足够的理由发现的。 南京CCIE培训
配置管理密码恢复
1.查看当前的密码恢复功能
(1)查看默认的交换机密码恢复功能
Switch#sh version
Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M), Version
12.2(35)SE1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Tue 19-Dec-06 10:54 by antonino
Image text-base: 0x00003000, data-base: 0x01362CA0
(输出被省略)
cisco WS-C3560-24TS (PowerPC405) processor (revision D0) with 122880K/8184K
bytes of memory.
Processor board ID CAT1047RJNU
Last reset from power-on
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is disabled.
(输出被省略)
Switch#
说明:可以看到,3560默认的密码恢复功能是关闭的,此特性会因为交换机型号的不同,默认会有所不同,如3550是默认打开的。 南京CCIE培训
2.测试关闭了密码恢复功能的效果
(1)为交换机配置enable密码
Switch(config)#enable secret cisco
(2)保存配置
Switch#wr
Building configuration...
[OK]
Switch#
(3)通过物理接触来做密码恢复
在做密码恢复时,交换机会出现以下提示: 南京CCIE培训
Switch#
Base ethernet MAC Address: 00:1a:6c:6f:fb:00
Xmodem file system is available.
The password-recovery mechanism is disabled.
Initializing Flash...
flashfs[0]: 30 files, 3 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 11811840
flashfs[0]: Bytes available: 20702208
flashfs[0]: flashfs fsck took 13 seconds.
...done Initializing Flash.
Boot Sector Filesystem (bs) installed, fsid: 3
done.
The password-recovery mechanism has been triggered, but
is currently disabled. Access to the boot loader prompt
through the password-recovery mechanism is disallowed at
this point. However, if you agree to let the system be
reset back to the default system configuration, access
to the boot loader prompt can still be allowed.
Would you like to reset the system back to the default configuration (y/n)?
说明:提示信息说明交换机的密码恢复功能已被关闭,并给出提问,如果回答n,则等于什么都没有做,交换机将做正常启动,如下: 南京CCIE培训
Would you like to reset the system back to the default configuration (y/n)?n
Boot process continuing...
Loading "flash:c3560-advipservicesk9-mz.122-35.SE1.bin"...
(4)回答y
说明:如果上一问中回答y,则像上述所说一样,配置将被全部清除,以下是回答y后,进行配置密码恢复的结果:
Would you like to reset the system back to the default configuration (y/n)?y
The system has been interrupted, and the config file
has been deleted. The following command will finish
loading the operating system software:
boot
switch:
switch: flash_init
Initializing Flash...
...The flash is already initialized.
Setting console baud rate to 9600...
switch: load_helper
switch: dir flash:
Directory of flash:/
2 -rwx 8450865 <date> c3560-advipservicesk9-mz.122-35.SE1.bin
3 drwx 832 <date> crashinfo_ext
26 -rwx 24 <date> private-config.text
7 drwx 832 <date> crashinfo
20706304 bytes available (11807744 bytes used)
switch:
说明:可以看到,回答y,交换机已经自动删除配置,而进入之后会发现flash:中根本就已经没有了config.text这个文件。被人误清除了配置的交换机,管理员是应该有责任发现的。
以上是南京万和CCIE培训机构讲师对于Switching交换机密码恢复管理技术的详解,后续会为大家提供更多的技术讲解。