ROM ROM Bootstrap POST show version Mini IOS
ROM 功能 ROM Bootstrap POST show version Mini IOS ROM monitor 控制臺 存放完成基本功能的微代碼 5
路由器啟動流程圖 Boot field =1 0 x 1 START Boot system 命令 ? 檢查 start-up config No Yes Boot field =0 0 x 0 做所述 之開機 No No Yes Yes 有效的 IOS在 Flash 中? Yes 從Flash 使用 IOS 嘗試 從網路 取得 IOS 5次 失敗? 執行 ROM Monitor No 用ROM中 IOS (RXBoot 模式) 載入 IOS Yes Config reg bit 13=1 ? Config reg bit 6=1 ? Yes No No 成功 ? Yes 有效的 config ? No 從網路 使用檔案 完成 正常的 啟動 Yes SETUP DIALOG 7
檢查組態暫存器 Boot field =1 0 x 1 START Boot system 命令 ? 檢查 start-up config No Yes Boot field =0 0 x 0 做所述 之開機 No No Yes Yes 有效的 IOS在 Flash 中? Yes 從Flash 使用 IOS 嘗試 從網路 取得 IOS 5次 失敗? 執行 ROM Monitor No 用ROM中 IOS (RXBoot 模式) 載入 IOS Yes Config reg bit 13=1 ? Config reg bit 6=1 ? Yes No No 成功 ? Yes 有效的 config ? No 從網路 使用檔案 完成 正常的 啟動 Yes SETUP DIALOG 8
確認目前的組態暫存器值 wg_ro_a#show version Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C 2500 -JS-L), Version 12. 0(3), RELEASE SOFTWARE (fc 1) Copyright (c) 1986 -1999 by cisco Systems, Inc. Compiled Mon 08 -Feb-99 18: 18 by phanguye Image text-base: 0 x 03050 C 84, data-base: 0 x 00001000 ROM: System Bootstrap, Version 11. 0(10 c), SOFTWARE BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11. 0(10 c), RELEASE SOFTWARE (fc 1) wg_ro_a uptime is 20 minutes System restarted by reload System image file is "flash: c 2500 -js-l_120 -3. bin" --More-Configuration register is 0 x 2102 用命令show version所顯示的組態暫存器值 9
設定組態暫存器的值 Router#configure terminal Router(config)#config-register 0 x 2102 [Ctrl-Z] Router#reload – 組態暫存器的3, 2, 1和0位元是啟動選項位元 10
設定組態暫存器的值 Router#configure terminal Router(config)#config-register 0 x 2102 [Ctrl-Z] Router#reload – 組態暫存器的3, 2, 1和0位元是啟動選項位元 組態暫存器啟動選項部分 的值 0 x 0 涵義 進入ROM monitor模式 (人 啟動時用 b 命令) 11
路由器啟動流程圖 Boot field =1 0 x 1 START Boot system 命令 ? 檢查 start-up config No Yes Boot field =0 0 x 0 做所述 之開機 No No Yes Yes 有效的 IOS在 Flash 中? Yes 從Flash 使用 IOS 嘗試 從網路 取得 IOS 5次 失敗? 執行 ROM Monitor No 用ROM中 IOS (RXBoot 模式) 載入 IOS Yes Config reg bit 13=1 ? Config reg bit 6=1 ? Yes No No 成功 ? Yes 有效的 config ? No 從網路 使用檔案 完成 正常的 啟動 Yes SETUP DIALOG 14
boot system flash 從Flash載入IOS映像檔 16
boot system tftp 從TFTP伺服器載入IOS映像檔 17
boot system rom 從ROM開機 18
路由器啟動流程圖 Boot field =1 0 x 1 START Boot system 命令 ? 檢查 start-up config No Yes Boot field =0 0 x 0 做所述 之開機 No No Yes Yes 有效的 IOS在 Flash 中? Yes 從Flash 使用 IOS 嘗試 從網路 取得 IOS 5次 失敗? 執行 ROM Monitor No 用ROM中 IOS (RXBoot 模式) 載入 IOS Yes Config reg bit 13=1 ? Config reg bit 6=1 ? Yes No No 成功 ? Yes 有效的 config ? No 從網路 使用檔案 完成 正常的 啟動 Yes SETUP DIALOG 19
從Flash載入IOS映像檔 RAM IOS Flash IOS 控制臺 show flash ● Flash中的映像檔解壓縮到RAM中 20
使用 show flash 命令 wg_ro_a# sh flash System flash directory: File Length Name/status 1 10084696 c 2500 -js-l_120 -3. bin [10084760 bytes used, 6692456 available, 16777216 total] 16384 K bytes of processor board System flash (Read ONLY) 21
Flash 毀損情形 ● 若路由器有 flash 映像檔毀損情形,在開機時 會顯示錯誤訊息,此錯誤訊息可能為如下形式 之一: – – ● open: read error. . . requested 0 x 4 bytes, got 0 x 0 trouble reading device magic number boot: cannot open "flash: " boot: cannot determine first file name on device "flash: "u 若 flash 映像毀損,則須重新上載 IOS 到路由 器。 22
載入組態檔 RAM NVRAM Config IOS show running-config show startup-config 控制臺 Setup utility – 從NVRAM中載入並運行組態檔 – 如果NVRAM中沒有組態檔, 進入setup模式 23
使用 show running 和 show startup 命令 存在RAM中 wg_ro_c#show running-config Building configuration. . . Current configuration: ! version 12. 0 ! -- More -- 存在NVRAM中 wg_ro_c#show startup-config Using 1359 out of 32762 bytes ! version 12. 0 ! -- More -- 顯示當前運行的和保存的配置情況 24
從何處配置參數 RAM Config – copy running startup copy startup running (合併) NVRAM Config NVRAM 25
從何處配置參數 RAM Config copy running startup copy startup running (合併) NVRAM Config config term (合併) – NVRAM – Terminal 26
從何處配置參數 RAM copy running startup Config copy startup running (合併) NVRAM Config config term (合併) copy tftp run (合併) Console copy tftp start copy run tftp – NVRAM – Terminal – TFTP 伺服器 copy start tftp TFTP 伺服器 27
從何處配置參數 RAM copy running startup Config copy startup running (合併) NVRAM Config config term (合併) copy tftp run (合併) – NVRAM – Terminal – TFTP server – 刪除啟動組態檔 Console copy tftp start copy run tftp copy start tftp TFTP 伺服器 erase start Blank 000000 28
使用copy run tftp 和 copy tftp run 命令 wg_ro_a#copy running-config tftp Address or name of remote host []? 10. 1. 1. 1 Destination filename [running-config]? wgroa. cfg. !! 1684 bytes copied in 13. 300 secs (129 bytes/sec) wg_ro_a#copy tftp running-config Address or name of remote host []? 10. 1. 1. 1 Source filename []? wgroa. cfg Destination filename [running-config]? Accessing tftp: //10. 1. 1. 1/wgroa. cfg. . . Loading wgroa. cfg from 10. 1. 1. 1 (via Ethernet 0): ! [OK - 1684/3072 bytes] 1684 bytes copied in 17. 692 secs (99 bytes/sec) 29
Cisco檔案系統與設備 RAM NVRAM system: nvram: TFTP 伺服器 Flash flash: tftp: 30
IOS 12. 0版之前的命令 IOS 12. x 版之命令 configure network (IOS 10. 3版以前 copy ftp: system: running-config ) copy rcp: system: running-config copy rcp running-config copy tftp: system: running-config copy tftp running-configure overwrite-network (IOS 10. 3版以前) copy rcp startup-config copy tftp startup-config copy ftp: nvram: startup-config copy rcp: nvram: startup-config copy tftp: nvram: startup-config show configuration (IOS 10. 3版以 前) show startup-config more nvram: startup-config 34
IOS 12. 0版之前的命令(IOS 10. 3版 IOS 12. x 版之命令 以前) write erase (IOS 10. 3版以前) erase nvram: erase startup-config write memory (IOS 10. 3版以前) copy running-config startup-config copy system: running-config nvram: startup-config write network (IOS 10. 3版以前) copy running-config rcp copy running-config tftp copy system: running-config ftp: copy system: running-config rcp: copy system: running-config tftp: write terminal (IOS 10. 3版以前) show running-config more system: running-config 35
管理IOS映像檔 c 2500 -js-l_120 -3. bin 路由器 FLASH 網路 伺服器 42
確認存貯空間並解析檔案名 wg_ro_a#show flash System flash directory: File Length Name/status 1 10084696 c 2500 -js-l_120 -3. bin [10084760 bytes used, 6692456 available, 16777216 total] 16384 K bytes of processor board System flash (Read ONLY) 確認Flash中有足夠空間來存放IOS映像檔 47
進行映像檔的備份 FLASH copy flash tftp 網路 伺服器 wg_ro_a#copy flash tftp Source filename []? c 2500 -js-l_120 -3. bin Address or name of remote host []? 10. 1. 1. 1 Destination filename [c 2500 -js-l_120 -3. bin]? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <output omitted> 10084696 bytes copied in 709. 228 secs (14223 bytes/sec) wg_ro_a# • 在升級IOS前備份當前的映像檔 48
從網路升級IOS FLASH 網路 伺服器 wg_ro_a#copy tftp flash Address or name of remote host [10. 1. 1. 1]? Source filename []? c 2500 -js-l_120 -3. bin Destination filename [c 2500 -js-l_120 -3. bin]? Accessing tftp: //10. 1. 1. 1/c 2500 -js-l_120 -3. bin. . . Erase flash: before copying? [confirm] Erasing the flash filesystem will remove all files! Continue? [confirm] Erasing device. . . eeeee (output omitted). . . erased Erase of flash: complete Loading c 2500 -js-l_120 -3. bin from 10. 1. 1. 1 (via Ethernet 0): !!!!!!!!!! (output omitted) [OK - 10084696/20168704 bytes] Verifying checksum. . . OK (0 x 9 AA 0) 10084696 bytes copied in 309. 108 secs (32636 bytes/sec) wg_ro_a# – 載入新的映像檔前對Flash作適當的檔刪除 – 注意關於映像檔已經存在的提示資訊 49
- Slides: 49