简介
本文档显示如何在带有嵌入式AP802的ISR(集成多业务路由器)上执行接入点映像恢复。 此处描述的方法依赖于AP802的闪存分区可从主机路由器直接访问这一事实。 此技术不能从具有嵌入式AP801的路由器使用;在这些平台上,您需要从AP801控制台(引导加载程序)执行AP(接入点)映像恢复(如何判断您有AP801还是AP802)。
路由器CLI日志示例
以下示例是在运行IOS(网际操作系统)15.2(4)M5的819HWD上执行的。
路由器闪存内容
819HWD#dir all-filesystems
[ ... ]
Directory of flash:1:/
2 -rw- 100041 Aug 1 2014 19:37:46 +00:00 event.log
25 -rw- 215 Sep 15 2014 17:17:38 +00:00 env_vars
4 -rw- 125729 Aug 1 2014 12:29:16 +00:00 event.capwap
5 -rw- 281 Jun 9 2014 23:28:12 +00:00 info
6 -rw- 8216 Sep 15 2014 17:17:50 +00:00 private-multiple-fs
7 drw- 0 Dec 26 2013 19:52:46 +00:00 ap802-rcvk9w8-mx
17 -rw- 3072 Dec 26 2013 20:02:30 +00:00 cpconfig-ap802.cfg
3 -rw- 0 Sep 15 2014 17:18:02 +00:00 config.txt
18 -rw- 5 Jun 25 2014 21:06:00 +00:00 private-config
19 -rw- 64 Jun 24 2014 23:12:10 +00:00 sensord_CSPRNG1
20 -rw- 64 Jun 24 2014 23:21:44 +00:00 sensord_CSPRNG0
21 drw- 0 Jul 31 2014 18:29:32 +00:00 configs
重新格式化AP闪存
闪存:1:filesystem是AP802使用的分区。 在测试中,我们将格式化此文件系统以将其擦除,然后重新启动AP802,使其引导到AP引导加载器。(注:除非必要,请勿重新格式化AP闪存 — 此处为说明目的。)
819HWD#format flash:1:/
Format operation may take a while. Continue? [confirm]y
Format operation will destroy all data in "flash:1:". Continue? [confirm]y
Format: All system sectors written. OK...
Format: Total sectors in formatted partition: 80801
Format: Total bytes in formatted partition: 41370112
Format: Operation completed successfully.
Format of flash:1: complete
819HWD#service-module wlan-ap 0 reset
Use reset only to recover from shutdown or failed state
AP config will not be saved
Do you want to reset?[confirm]y
Trying to reload Service Module wlan-ap0.
Pause - wait for open files to finish...
819HWD#
*Sep 15 17:28:30.232: %SECONDCORE-5-BOOTSTAGE: ROMMON on 2nd core UP
*Sep 15 17:28:30.248: %SECONDCORE-5-BOOTSTAGE: AP-BOOTLOADER on 2nd core UP
连接到AP802
连接到AP802的控制台,以验证其闪存现在为空。
819HWD#service-module wlan-ap 0 session
Trying 192.168.148.8, 2002 ... Open
Connecting to AP console, enter Ctrl-^ followed by x,
then "disconnect" to return to router prompt
ap: dir flash:
Directory of flash:/
41168896 bytes available (139264 bytes used)
ap:
Ctrl-^x
819HWD#disco
Closing connection to 192.168.148.8 [confirm]y
将AP IOS复制到路由器闪存
将所需的AP IOS目标从TFTP(简单文件传输协议)服务器复制到路由器的主闪存分区。 在本例中,我们使用ap802-k9w7-tar.152-4.JB5.tar,它是自治IOS 15.2(4)JB5。 (请参阅“了解接入点IOS映像”一文。)
819HWD#copy tftp flash:
Address or name of remote host [192.168.148.1]?
Source filename [/192.168.148.1/ap802-k9w7-tar.152-4.JB5.tar]? ap802-k9w7-tar.152-4.JB5.tar
Destination filename [ap802-k9w7-tar.152-4.JB5.tar]?
Accessing tftp://192.168.148.1/ap802-k9w7-tar.152-4.JB5.tar...
Loading ap802-k9w7-tar.152-4.JB5.tar from 192.168.148.1 (via GigabitEthernet0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 13834240 bytes]
13834240 bytes copied in 46.368 secs (298357 bytes/sec)
提取AP IOS
使用archive tar /xtract命令将tarball解捆到AP闪存(flash:1:)上(flash:1:)。
819HWD#archive tar /xtract ap802-k9w7-tar.152-4.JB5.tar flash:1:
extracting info (282 bytes)
ap802-k9w7-mx.152-4.JB5/ (directory)
ap802-k9w7-mx.152-4.JB5/html/ (directory)
[ ... ]
extracting info.ver (282 bytes)
819HWD#dir flash:1:
Directory of flash:1:/
4 -rw- 282 Sep 15 2014 17:31:40 +00:00 info
5 drw- 0 Sep 15 2014 17:31:42 +00:00 ap802-k9w7-mx.152-4.JB5
199 -rw- 282 Sep 15 2014 17:33:38 +00:00 info.ver
41308160 bytes total (26963968 bytes free)
配置AP以启动新的IOS映像
控制台连接到AP802的引导加载程序,并将其配置为引导IOS映像。 请注意,AP的IOS映像通常称为flash:/platform-featureset-mx.version/platform-featureset -mx-version。 然后启动AP IOS。
819HWD#service-module wlan-ap 0 session
Trying 192.168.148.8, 2002 ... Open
ap: dir flash:
Directory of flash:/
4 -rw- 282
info
5 drw- 0
ap802-k9w7-mx.152-4.JB5
199 -rw- 282
info.ver
26963968 bytes available (14344192 bytes used)
ap:
set BOOT flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5
ap: reset
Are you sure you want to reset the system (y/n)?y
System resetting...
*Sep 15 17:35:12.758: %SECONDCORE-5-BOOTSTAGE: AP-IOS on 2nd core SAFE FOR RESET
IOS Bootloader - Starting system.
[ ... ]
*Sep 15 17:35:25.329: %SECONDCORE-5-BOOTSTAGE: ROMMON on 2nd core UP
*Sep 15 17:35:25.345: %SECONDCORE-5-BOOTSTAGE: AP-BOOTLOADER on 2nd core UPLoading "flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5"...###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
File "flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5" uncompressed and installed, entry point: 0x18003000
[ ... ]
Cisco IOS Software, AP802 Software (AP802-K9W7-M), Version 15.2(4)JB5, RELEASE SOFTWARE (fc1)
[ ... ]
*Sep 15 17:37:29.371: %SECONDCORE-5-BOOTSTAGE: AP-IOS on 2nd core UP
*Sep 15 17:37:37.435: %WLAN_AP_SM-6-UNIFIED_IMAGE: Embedded AP will change boot image to mini-IOS also called LWAPP recovery
Please check router config to ensure connectivity between WLC and AP
Use service-module wlan-ap 0 reload to boot up mini-IOS image on AP
Save the autonomous configuration file with a file name other than
flash:[config.txt] as it will be erased upon AP reload
Press RETURN to get started!
ap>
Ctrl-^x 819HWD#disco
Closing connection to 192.168.148.8 [confirm]y
819HWD#
清除路由器闪存并配置自治
现在从路由器闪存中删除目标,因为不再需要它。 另请处理“WLAN_AP_SM-6-UNIFIED_IMAGE”消息,该消息表示路由器认为AP应运行轻量IOS,因此我们需要使用service-module-wlan n bootimage命令告诉路由器AP正在运行自主(或轻量)。
819HWD#del flash:/ap802-k9w7-tar.152-4.JB5.tar
Delete filename [ap802-k9w7-tar.152-4.JB5.tar]?
Delete flash:/ap802-k9w7-tar.152-4.JB5.tar? [confirm]
819HWD#conf t
Enter configuration commands, one per line. End with CNTL/Z.
819HWD(config)#service-module wlan-ap 0 bootimage autonomous
819HWD(config)#end
819HWD#wri
Building configuration...[OK]
如何判断ISR是具有AP801还是AP802
问:您如何判断ISR是具有AP801还是AP802?
A1.在AP上执行show version。
A2. http://www.cisco.com/c/en/us/products/routers/800-series-routers/brochure-listing.html > Cisco 800系列ISR比较表