PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:ios-select-boot:ios-select-boot

This is an old revision of the document!


起動時に使用する IOS を選択する

Preparation

CCIE RSv5 の試験では IOS 15 系使うっぽかったんで IOS 15 系入ってるルータ 1 個調達したんでした。
そしてそれを他の IOS バージョン 12 のルータにも展開。
ちな、プラットフォームが異なったら IOS 15 系の IOS イメージだからといって動くわけじゃありゃあせん。
C1841だったらC1841用のIOSが必要です。

R2#sh flash
-#- --length-- -----date/time------ path
1     47454756 Sep 29 2015 00:59:58 +00:00 c1841-adventerprisek9-mz.151-4.M10.bin
2         1038 Mar 24 2016 05:45:14 +00:00 home.shtml
3         2746 Mar 24 2016 05:45:28 +00:00 sdmconfig-18xx.cfg
4      1697952 Mar 24 2016 05:45:46 +00:00 securedesktop-ios-3.1.1.45-k9.pkg
5       415956 Mar 24 2016 05:45:58 +00:00 sslclient-win-1.1.4.176.pkg
6       527849 Mar 24 2016 05:46:08 +00:00 128MB.sdf
7      1505280 Mar 24 2016 05:46:30 +00:00 common.tar
8       931840 Mar 24 2016 05:46:40 +00:00 es.tar
9       112640 Mar 24 2016 05:46:48 +00:00 home.tar
10     6389760 Mar 24 2016 05:47:26 +00:00 sdm.tar

5017600 bytes available (59056128 bytes used)

入れたい

13925828 bytes = 13599.44141 KiB = 13.2807045 MiB

R2>en
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#ip addr 172.16.128.254 255.255.255.0
R2(config-if)#no shut
R2(config-if)#
*Jan 28 23:54:36.219: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Jan 28 23:54:37.219: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2#copy tftp c1841-ipbase-mz.124-1a.bin
Address or name of remote host []? 172.16.128.4
Source filename []? c1841-ipbase-mz.124-1a.bin
Destination filename [c1841-ipbase-mz.124-1a.bin]? flash:c1841-ipbase-mz.124-1a.bin
Accessing tftp://172.16.128.4/c1841-ipbase-mz.124-1a.bin...
Loading c1841-ipbase-mz.124-1a.bin from 172.16.128.4 (via FastEthernet0/0): !
%Error copying tftp://172.16.128.4/c1841-ipbase-mz.124-1a.bin (Not enough space on device)
R2#copy tftp flash:c1841-ipbase-mz.124-1a.bin
Address or name of remote host [172.16.128.4]?
Source filename [c1841-ipbase-mz.124-1a.bin]?
Destination filename [c1841-ipbase-mz.124-1a.bin]? flash:c1841-ipbase-mz.124-1a.bin
Accessing tftp://172.16.128.4/c1841-ipbase-mz.124-1a.bin...
Loading c1841-ipbase-mz.124-1a.bin from 172.16.128.4 (via FastEthernet0/0): !
%Error copying tftp://172.16.128.4/c1841-ipbase-mz.124-1a.bin (Not enough space on device)
R1#sh flash
-#- --length-- -----date/time------ path
2           76 Jul 8 2015 16:30:58 +00:00 System Volume Information/IndexerVolumeGuid
3     47454756 Apr 30 2015 02:06:24 +00:00 c1841-adventerprisek9-mz.151-4.M10.bin
(snip)
446        151 Jul 22 2015 00:45:34 +00:00 ccpexp/templates2/deleteATMInterfacePppoe.txt
447         41 Jul 22 2015 00:45:36 +00:00 ccpexp/templates2/deleteDHCPDefaultRoute.txt
448        105 Jul 22 2015 00:45:36 +00:00 ccpexp/templates2/deleteEthernetInterfacePppoe.txt
449         72 Jul 22 2015 00:45:36 +00:00 ccpexp/templates2/deleteNATInterface.txt
450         98 Jul 22 2015 00:45:36 +00:00 ccpexp/templates2/deleteNATIntwithPort.txt
451         62 Jul 22 2015 00:45:38 +00:00 ccpexp/templates2/deleteNATVal.txt
452         88 Jul 22 2015 00:45:38 +00:00 ccpexp/templates2/deleteOldNAT.txt
453         85 Jul 22 2015 00:45:38 +00:00 ccpexp/templates2/deleteSerialPPP.txt
454         61 Jul 22 2015 00:45:38 +00:00 ccpexp/templates2/interfaceWithDHCPPool.txt
455         57 Jul 22 2015 00:45:40 +00:00 ccpexp/templates2/setPrimarySimSlot.txt
456        255 Jul 22 2015 00:45:40 +00:00 ccpexp/templates2/vpnIkev1Modified.txt
457     132462 Jul 22 2015 00:43:54 +00:00 ccpexp/CCPExpress_3.1_Open_Source_Documentation.html
458         70 Jul 22 2015 00:47:46 +00:00 ccpexp/version.txt
459       2885 Jul 22 2015 00:47:48 +00:00 home.shtml
460     180508 Mar 13 2016 14:32:08 +00:00 crashinfo_20160313-143209-UTC
461          0 Mar 17 2016 14:26:38 +00:00 crashinfo_20160317-142638-UTC

69320704 bytes available (60411904 bytes used)

R1 に入れられそう。

改めて R1 のフラッシュメモリ(CF: Compact Flash)にダウンロードする。

R1#copy tftp c1841-ipbase-mz.124-1a.bin
Address or name of remote host []? 172.16.128.4
Source filename []? c1841-ipbase-mz.124-1a.bin
Destination filename [c1841-ipbase-mz.124-1a.bin]? flash:c1841-ipbase-mz.124-1a.bin
Accessing tftp://172.16.128.4/c1841-ipbase-mz.124-1a.bin...
Loading c1841-ipbase-mz.124-1a.bin from 172.16.128.4 (via FastEthernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!
[OK - 13925828 bytes]

13925828 bytes copied in 70.756 secs (196815 bytes/sec)

これで IOS 15 系と IOS 12 系がいる状態になったかな。

R1#sh flash | include .bin
3     47454756 Apr 30 2015 02:06:24 +00:00 c1841-adventerprisek9-mz.151-4.M10.bin
462   13925828 Jan 29 2018 22:30:04 +00:00 c1841-ipbase-mz.124-1a.bin
R1#sh flash | include bytes available
55394304 bytes available (74338304 bytes used)

Cisco IOS ソフトウェアの検索順序

ルータの場合。コンフィグレーションレジスタの値が 0x2102 であるなら startup-configboot system コマンドの指定を確認する。

R1#sh ver | inc Configuration
Configuration register is 0x2102

boot system

R1#show flash: | include .bin
3     47454756 Apr 30 2015 02:06:24 +00:00 c1841-adventerprisek9-mz.151-4.M10.bin
462   13925828 Jan 29 2018 22:30:04 +00:00 c1841-ipbase-mz.124-1a.bin
R1#sh ver | inc image file is
System image file is "flash:c1841-adventerprisek9-mz.151-4.M10.bin"

まずリロード。

R1#reload

System configuration has been modified. Save? [yes/no]: no
Proceed with reload? [confirm]

*Jan 29 23:21:47.498: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.4(13r)T5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
(snip)
*Jan 29 23:24:22.559: %CRYPTO-6-GDOI_ON_OFF: GDOI is OFF
*Jan 29 23:24:22.559: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
*Jan 29 23:24:22.563: %CRYPTO-6-GDOI_ON_OFF: GDOI is OFF
R1>en
R1#sh ver | inc image is
R1#sh ver | inc image file is
System image file is "flash:c1841-adventerprisek9-mz.151-4.M10.bin"

では IOS 12 系で起動する。

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#boot sys
R1(config)#boot system fla
R1(config)#boot system flash ?
  WORD  System image filename
  <cr>

R1(config)#boot system flash c1841-ipbase-mz.124-1a.bin
R1(config)#^Z
R1#
*Jan 29 23:27:18.287: %SYS-5-CONFIG_I: Configured from console by console
R1#wr
Building configuration...
[OK]
R1#reload
Proceed with reload? [confirm]

*Jan 29 23:27:42.299: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.4(13r)T5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2007 by cisco Systems, Inc.
PLD version 0x10
GIO ASIC version 0x127
c1841 platform with 393216 Kbytes of main memory
Main memory is configured to 64 bit mode with parity disabled


Upgrade ROMMON initialized
program load complete, entry point: 0x8000f000, size: 0xcb80

program load complete, entry point: 0x8000f000, size: 0xd47c24
Self decompressing the image : ################################################################################
#####################################################
(snip)

Cisco IOS Software, 1841 Software (C1841-IPBASE-M), Version 12.4(1a), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Fri 27-May-05 12:32 by hqluong
Image text-base: 0x6007ECD0, data-base: 0x61400000

Port Statistics for unclassified packets is not turned on.
Cisco 1841 (revision 6.0) with 351232K/41984K bytes of memory.
Processor board ID FHK1107102U
2 FastEthernet interfaces
1 Serial(sync/async) interface
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
127104K bytes of ATA CompactFlash (Read/Write)

dot11 syslog
    ^
% Invalid input detected at '^' marker.

no ipv6 cef
     ^
% Invalid input detected at '^' marker.

crypto pki token default removal timeout 0
 ^
% Invalid input detected at '^' marker.

license udi pid CISCO1841 sn FHK1107102U
  ^
% Invalid input detected at '^' marker.

redundancy
  ^
% Invalid input detected at '^' marker.

no ip http secure-server
             ^
% Invalid input detected at '^' marker.



Press RETURN to get started!


*Jan 29 23:28:32.603: %LINK-3-UPDOWN: Interface Serial0/0/0, changed state to down
*Jan 29 23:28:33.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to down
*Jan 29 23:28:33.851: %SYS-4-CONFIG_NEWER: Configuration from version 15.1 may not be correctly understood
*Jan 29 23:28:34.843: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Jan 29 23:28:35.043: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
*Jan 29 23:28:35.107: %SYS-5-CONFIG_I: Configured from memory by console
*Jan 29 23:28:35.611: %SYS-5-RESTART: System restarted --
Cisco IOS Software, 1841 Software (C1841-IPBASE-M), Version 12.4(1a), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Fri 27-May-05 12:32 by hqluong
*Jan 29 23:28:35.615: %SNMP-5-COLDSTART: SNMP agent on host R1 is undergoing a cold start
*Jan 29 23:28:35.795: %SYS-6-BOOTTIME: Time taken to reboot after reload =   50 seconds
*Jan 29 23:28:35.963: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
*Jan 29 23:28:36.043: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
*Jan 29 23:28:36.807: %LINK-5-CHANGED: Interface Serial0/0/0, changed state to administratively down

12 と 15 でコンフィグに互換性が無いことがわかりますね。

R1#sh ver | inc image file is
System image file is "flash:c1841-ipbase-mz.124-1a.bin"
<code>

<code>
R1#sh run | inc boot system
boot system flash c1841-ipbase-mz.124-1a.bin
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#no boot system
R1(config)#^Z
R1#
*Jan 29 23:31:05.787: %SYS-5-CONFIG_I: Configured from console by console
R1#sh run | inc boot system
R1#wr
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R1#reload
Proceed with reload? [confirm]

*Jan 29 23:32:24.395: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload command.
System Bootstrap, Version 12.4(13r)T5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2007 by cisco Systems, Inc.
PLD version 0x10
GIO ASIC version 0x127
c1841 platform with 393216 Kbytes of main memory
Main memory is configured to 64 bit mode with parity disabled


Upgrade ROMMON initialized
program load complete, entry point: 0x8000f000, size: 0xcb80
program load complete, entry point: 0x8000f000, size: 0xcb80

(snip)

DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
127104K bytes of ATA CompactFlash (Read/Write)

mmi polling-interval 60
^
% Invalid input detected at '^' marker.

no mmi auto-configure
   ^
% Invalid input detected at '^' marker.

no mmi pvc
   ^
% Invalid input detected at '^' marker.

mmi snmp-timeout 180
^
% Invalid input detected at '^' marker.

このままだと気持ち悪いから元に戻す。

*Jan 29 23:35:11.471: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
*Jan 29 23:35:11.471: %CRYPTO-6-GDOI_ON_OFF: GDOI is OFF
R1>en
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#^Z
R1#
*Jan 29 23:36:18.331: %SYS-5-CONFIG_I: Configured from console by console
R1#sh run | inc boot system
R1#sh ver | inc image file is
System image file is "flash:c1841-adventerprisek9-mz.151-4.M10.bin"
R1#wr
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R1#reload
Proceed with reload? [confirm]

*Jan 29 23:37:31.591: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.4(13r)T5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2007 by cisco Systems, Inc.
PLD version 0x10
GIO ASIC version 0x127
c1841 platform with 393216 Kbytes of main memory
Main memory is configured to 64 bit mode with parity disabled


Upgrade ROMMON initialized
program load complete, entry point: 0x8000f000, size: 0xcb80
program load complete, entry point: 0x8000f000, size: 0xcb80

ブート時に TFTP サーバも指定できるっぽい。
GNS3 とかシミュレーション環境ではこの方式が使われているっぽかった。
VIRL だっけ?

boot system tftp

References

tech/network/ios-select-boot/ios-select-boot.1517272915.txt.gz · Last modified: 2018/01/30 09:41 by wnoguchi