はじめに
本ドキュメントでは、eXR ルータにおけるコマンドを使用したバージョン変更の手順について紹介しています。
cXR/XR7 などの別のソフトウェアアーキテクチャについては本ドキュメントの対象外となります。
XR7 におけるバージョンの変更手順については下記のドキュメントをご参照ください。
以下はバージョン変更の大まかな流れになります。
- install add を実行して ISO ファイルをレポジトリに追加する
- install activate を実行して ISO を有効化する
- install commit を実行してバージョン変更のための一連の処理を終了させる
1. install add を実行して ISO ファイルをレポジトリに追加する
下記のいずれかのコマンドを実行し ISO ファイルの追加をします。
(ISO ファイル以外のパッケージも同時に追加する場合には、ISO ファイル名に続けてパッケージ名を指定してください。)
- install add source <tftp transfer protocol>/package_path/ iso_file package1
- install add source <ftp or sftp transfer protocol>//user@server:/package_path/ iso_file package1
(*) 上記のファイルの追加は management port を経由して実行されるため、MgmtEth に VRF が設定されている場合には以下のようにコマンド中で VRF 名 (xr-mgmt) を指定する必要があります。
RP/0/RP0/CPU0:eXR#install add source tftp://192.0.2.1;xr-mgmt/ioxarchive/IOX732/ncs5500/ ncs5500-mini-x-7.3.2.iso
Mon Apr 17 07:47:23.486 JST
2023-04-17 07:47:25 Install operation 1 started by cisco:
install add source tftp://192.0.2.1;xr-mgmt/ioxarchive/IOX732/ncs5500/ ncs5500-mini-x-7.3.2.iso
2023-04-17 07:47:33 Install operation will continue in the background
show install request から ダウンロードの進行状況を確認することができます。
RP/0/RP0/CPU0:eXR#show install request
Mon Apr 17 07:55:53.113 JST
User cisco, Op Id 1
install add
ncs5500-mini-x-7.3.2.iso
The install add operation 1 is 30% complete
Got staging for add operation
RP/0/RP0/CPU0:eXR#2023-04-17 08:08:15 Install operation 1 finished successfully
2. install activate を実行して ISO を有効化する
ISO ファイル名または install add を実行した際の operation id を指定して ISO を有効化します。
- install activate package_name
- install activate id operation_id
< IOS ファイル名を指定する方法 >
RP/0/RP0/CPU0:eXR#show install inactive summary
Mon Apr 17 10:14:02.596 JST
1 inactive package(s) found:
ncs5500-mini-x-7.3.2 <<<<< IOS ファイル名を確認
RP/0/RP0/CPU0:eXR#install activate ncs5500-mini-x-7.3.2
Mon Apr 17 10:15:16.866 JST
2023-04-17 10:15:26 Install operation 2 started by cisco:
2023-04-17 10:15:26 install activate pkg ncs5500-mini-x-7.3.2
2023-04-17 10:15:27 No install operation in progress at this moment
2023-04-17 10:15:27 Checking system is ready for install operation
2023-04-17 10:15:27 'install activate' in progress
2023-04-17 10:15:27 ISO ncs5500-mini-x-7.3.2 in input package list. Going to upgrade the system to version 7.3.2.
This install operation will reload the system, continue?
[yes:no]:[yes] yes
2023-04-17 10:15:31 Optimized list to prepare after sanitizing input list for superseded packages:
ncs5500-mini-x-7.3.2
-- snip --
2023-04-17 10:22:05 Install operation 2 finished successfully
2023-04-17 10:22:05 Ending operation 2
# その後、自動で再起動が実施されます。
< operation id を指定する方法 >
RP/0/RP0/CPU0:eXR#show install log
Mon Apr 17 10:14:16.304 JST
2023-04-17 09:47:18 Install operation 1 started by cisco: <<<<< install add を実行した際の operation id を確認
install add source tftp://192.0.2.1;xr-mgmt/ioxarchive/IOX732/ncs5500/ ncs5500-mini-x-7.3.2.iso
2023-04-17 09:47:21 Action 1: install add action started
2023-04-17 09:47:25 Install operation will continue in the background
2023-04-17 10:08:14 Packages added:
2023-04-17 10:08:15 ncs5500-mini-x-7.3.2
2023-04-17 10:08:15 Action 1: install add action completed successfully
2023-04-17 10:08:17 Install operation 1 finished successfully
2023-04-17 10:08:18 Ending operation 1
RP/0/RP0/CPU0:eXR#install activate id 1
# その後、自動で再起動が実施されます。
3. install commit を実行してバージョン変更のための一連の処理を終了させる
以下のコマンドを実行して一連の処理を終了させます。
(*) install commit が完了する前にシステムが再起動された場合、install activate が完了する前のバージョンに戻ってしまいます。
RP/0/RP0/CPU0:eXR#install commit
Mon Apr 17 11:14:07.519 JST
2023-04-17 11:14:09 Install operation 3 started by cisco:
install commit
2023-04-17 11:14:11 Install operation will continue in the background
RP/0/RP0/CPU0:eXR#2023-04-17 11:14:24 Install operation 3 finished successfully
以上の手順で eXR ルータにおけるバージョンの変更が可能です。
install prepare について
上述した install add を実行した後、install prepare を実行することで有効化をする前に ISO やパッケージのチェックを実施することができます。
install prepare を実施することで破損したファイルが有効化されることを防ぐことや、その後の ISO ファイル有効化の時間を短縮することが可能です。
- install prepare package_name
- install prepare id operation_id
以下は install prepare を使用したバージョンアップの実行例です。
RP/0/RP0/CPU0:eXR#install add source tftp://192.0.2.1;xr-mgmt/ioxarchive/IOX732/ncs5500/ ncs5500-mini-x-7.3.2.iso
Mon Apr 17 13:05:29.478 JST
2023-04-17 13:05:31 Install operation 1 started by cisco:
install add source tftp://192.0.2.1;xr-mgmt/ioxarchive/IOX732/ncs5500/ ncs5500-mini-x-7.3.2.iso
2023-04-17 13:05:39 Install operation will continue in the background
RP/0/RP0/CPU0:eXR#show install inactive summary
Mon Apr 17 13:29:46.055 JST
1 inactive package(s) found:
ncs5500-mini-x-7.3.2 <<<<<
RP/0/RP0/CPU0:eXR#install prepare ncs5500-mini-x-7.3.2 <<<<< operation id の指定でも可能
Mon Apr 17 13:30:07.457 JST
2023-04-17 13:30:08 Install operation 2 started by root:
install prepare pkg ncs5500-mini-x-7.3.2
2023-04-17 13:30:08 Package list:
2023-04-17 13:30:08 ncs5500-mini-x-7.3.2
2023-04-17 13:30:08 Install operation will continue in the background
RP/0/RP0/CPU0:eXR#2023-04-17 13:34:34 Install operation 2 finished successfully
RP/0/RP0/CPU0:eXR#install activate <<< ISO ファイル名や operation id は指定しない
Mon Apr 17 13:36:54.223 JST
2023-04-17 13:36:56 Install operation 3 started by cisco:
install activate
This install operation will reload the system, continue?
[yes/no]:[yes] yes
2023-04-17 13:37:02 Install operation will continue in the background
RP/0/RP0/CPU0:eXR#2023-04-17 13:39:26 Install operation 3 finished successfully
# その後、自動で再起動が実施されます。
RP/0/RP0/CPU0:eXR#install commit
Mon Apr 17 13:56:00.348 JST
2023-04-17 13:56:02 Install operation 4 started by cisco:
install commit
2023-04-17 13:56:04 Install operation will continue in the background
RP/0/RP0/CPU0:eXR#2023-04-17 13:56:16 Install operation 4 finished successfully
RP/0/RP0/CPU0:eXR#show install committed summary
Mon Apr 17 13:56:28.420 JST
Label : 7.3.2
Committed Packages: 1
ncs5500-xr-7.3.2 version=7.3.2 [Boot image] <<<<<