簡介
本文檔介紹如何在帶有嵌入式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快閃記憶體
flash:1:檔案系統是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:)。
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#
清理路由器快閃記憶體並配置自治系統
現在從路由器快閃記憶體中刪除tarball,因為不再需要它。 另外發出「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
Q:如何判斷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比較表