ステップ 1
|
configure dual-stage
switch# configure dual-stage
switch(config-dual-stage)#
|
新しいターゲット コンフィギュレーション セッションを作成します。
(注)
|
ターゲット コンフィギュレーションは、実行コンフィギュレーションのコピーではありません。ターゲット コンフィギュレーションには、そのターゲット コンフィギュレーション セッションで入力されたコンフィギュレーション コマンドだけが含まれます。
|
|
ステップ 2
|
feature feature_name
switch(config-dual-stage)# feature bgp
switch(config-dual-stage)#
|
|
ステップ 3
|
commit [confirmed seconds]
switch(config-dual-stage-router)# commit confirmed 30
Verification Succeeded.
Proceeding to apply configuration. This might take a while depending on amount of configuration in buffer.
Please avoid other configuration changes during this time.
Configuration committed by user 'admin' using Commit ID : 1000000001
switch(config-dual-stage)#
switch(config-dual-stage)# commit
Confirming commit for trial session.
switch(config-dual-stage)#
switch(config-dual-stage)# hostname example-switch
switch(config-dual-stage)# commit
Verification Succeeded.
Proceeding to apply configuration. This might take a while depending on amount of configuration in buffer.
Please avoid other configuration changes during this time.
Configuration committed by user 'admin' using Commit ID : 1000000002
example-switch(config-dual-stage)#
|
実行コンフィギュレーションに変更をコミットします。
(注)
|
トライアル期間を入力する場合は、commit コマンドを実行して設定を確認します。commit コマンドを実行しないと、トライアル期間後に以前の設定に戻ります。
|
|
ステップ 4
|
switch(config-dual-stage)# router bgp 64515.46
switch(config-dual-stage-router)#
switch(config-dual-stage-router)# router-id 141.8.139.131
switch(config-dual-stage-router)#
|
このコンフィギュレーション モードでサポートされている機能関連のコマンドを実行します。
|
ステップ 5
|
show configuration
switch(config-dual-stage-router)# show configuration
! Cached configuration
!
router bgp 64515.46
router-id 141.8.139.131
|
ターゲット コンフィギュレーションの内容を表示します。
(注)
|
このコマンドは、デュアルステージ コンフィギュレーション モードでのみ実行できます。
|
|
ステップ 6
|
commit [confirmed seconds ]
switch(config-dual-stage-router)# commit
Verification Succeeded.
Proceeding to apply configuration. This might take a while depending on amount of configuration in buffer.
Please avoid other configuration changes during this time.
Configuration committed by user 'admin' using Commit ID : 1000000003
|
実行コンフィギュレーションに変更をコミットします。
|
ステップ 7
|
(任意) show configuration commit [changes] commit-id
switch(config-dual-stage-router)# show configuration commit changes 1000000003
*** /bootflash/.dual-stage/1000000003.tmp Fri Mar 19 10:59:00 2021
--- /bootflash/.dual-stage/1000000003 Fri Mar 19 10:59:05 2021
***************
*** 378,383 ****
--- 378,385 ----
line console
line vty
boot nxos bootflash:/nxos64.10.1.1.44.bin
+ router bgp 64515.46
+ router-id 141.8.139.131
xml server timeout 1200
no priority-flow-control override-interface mode off
switch(config-dual-stage)# show configuration commit 1000000003
feature bgp
router bgp 64515.46
router-id 141.8.139.131
.
.
.
|
(任意)
コミット関連情報を表示します。
最後の 50 個のコミットまたは予約済みディスク領域に保存されたコミット ファイルのみが保存されます。予約済みディスク領域は 20 MB です。スイッチをリロードすると、すべてのコミット セッションが削除されます。ただし、コミット ID は削除されません。また、これらのコミット
ID は、書き込み、消去、およびリロードの際にも削除されません。
指定したコミットの現在のセッションの変更のみを表示するには、show configuration commit changes commit-id コマンドを使用します。
指定したコミットの完全な構成と、いくつかのクラス マップ ポリシーが表示されます。これらのクラス マップ ポリシーは、新しいポリシーではなく、非表示のポリシーです。非表示のポリシーを表示するには、 show run all コマンドを使用します。
|
ステップ 8
|
(任意) save configuration filename
switch(config-dual-stage)# save configuration bootflash:test.cfg
|
(任意)
ターゲット コンフィギュレーションは、実行コンフィギュレーションにコミットすることなく、独立したファイルに保存できます。
(注)
|
-
ターゲット コンフィギュレーション ファイルは、後でロード、変更、またはコミットできます。ファイルはブートフラッシュに保存されます。
-
保存したコンフィギュレーション ファイルを表示するには、show configuration filefilename コマンドを実行します。
-
ユーザ固有の情報の一部は、ユーザ ロールに基づいてマスクされます。
-
デュアルステージモードで保存された設定は暗号化されたファイルであり、#show configuration file <> を使用してのみ表示でき、#show file <> は使用できません。
|
|
ステップ 9
|
(任意) load filename
switch (config-dual-stage)# show configuration
! Cached configuration
switch (config-dual-stage)# load test.cfg
switch (config-dual-stage-router)# show configuration
! Cached configuration
!
router bgp 1
switch(config-dual-stage-router)#
|
(任意)
保存したターゲット コンフィギュレーションをロードします。ファイルをロードした後、ファイルを変更したり、実行コンフィギュレーションにコミットしたりできます。変更を保存するには、save configuration filename コマンドを使用します。
save configuration filename コマンドのみを使用して保存したターゲット コンフィギュレーションをロードできます。
|
ステップ 10
|
(任意) clear configuration
switch(config-dual-stage)# show configuration
! Cached configuration
!
router bgp 64515.46
router-id 141.8.139.131
switch (config-dual-stage)# clear configuration
switch (config-dual-stage)# show configuration
! Cached configuration
switch (config-dual-stage)#
|
(任意)
コンフィギュレーション セッションを終了せずに、ターゲット コンフィギュレーションに加えられた変更をクリアします。コミットされていない設定変更は削除されます。
|
ステップ 11
|
end
switch(config-dual-stage-if)# end
Uncommitted changes found, commit them before exiting (yes/no/cancel)? [cancel]
|
グローバル デュアル コンフィギュレーション モードを終了します。
設定変更をコミットせずにコンフィギュレーション セッションを終了すると、変更内容を保存するか、変更を破棄するか、または操作をキャンセルするように指示されます。
-
はい:設定変更をコミットしてから、コンフィギュレーション モードを終了します。
-
いいえ:設定変更をコミットせずに、コンフィギュレーション モードを終了します。
-
キャンセル:設定変更をコミットせずに、コンフィギュレーション モードに留まります。
|
ステップ 12
|
show configuration dual-stage sessions
switch(config-dual-stage)# show configuration dual-stage sessions
SNo. Session Line User Date
---- ---------------- ------------ ------------ ----------
1 8671-17101913 /dev/ttyS0 admin Wed Feb 17 10:56:00 2021
switch(config-dual-stage)# end
switch# show configuration dual-stage sessions
There are no active dual stage sessions
switch#
|
コンフィギュレーション セッションを開始する前に、進行中のその他のコンフィギュレーション セッションがないか確認する必要があります。シングル ユーザのみがデュアル ステージ コンフィギュレーション モードを開始できます。したがって、新しいセッションを開始する前に、前のセッションを終了する必要があります。最大
32 のインタラクティブ VSH セッションがあり、show コマンドはデュアル ステージ セッションの PID と回線情報を表示します。
(注)
|
デュアル ステージ モードは、システムの準備完了後にのみアクセスできます。
|
|
ステップ 13
|
clear configuration commits diskspace
Southlake-2# clear configuration commits diskspace ?
<1-20971> Number of Kilo Bytes of disk space to free
Southlake-2# clear configuration commits diskspace 100
Deleting 7 rollback points from '1000005557' to '1000005563'
101 KB of disk space will be freed.
Continue with deletion (yes/no)? [no] y
Southlake-2#
|
EXEC モードまたは管理 EXEC モードで clear configuration commits コマンドを入力することにより、最も古い設定の commitID を削除できます。clear configuration commit コマンドの後ろには、解放するディスク
スペースの量または削除する commitID の数を指定する必要があります。最も古い一連の commitID を削除して指定したディスク スペースを空けるには、ディスクスペース キーワードと再要求するキロバイト数の後ろに clear configuration
commits コマンドを入力します。
|
ステップ 14
|
clear configuration commits oldest
switch(config-dual-stage)# clear configuration commits oldest 10
Deleting 10 rollback points '1000000030' to '1000000039'
125 KB of disk space will be freed.
Continue with deletion (yes/no)? [no] n
|
最も古い方からの指定した回数分の commitID を削除するには、最も古いキーワードと削除する commitID 数の後ろに clear configuration commits コマンドを入力します。
|
ステップ 15
|
Show configuration failed
switch(config-dual-stage-if)# commit
Verification Succeeded.
Proceeding to apply configuration. This might take a while depending on amount of configuration in buffer.
Please avoid other configuration changes during this time.
Failed to commit one or more configuration items.
Commit Failed, Rolling back ...
switch(config-dual-stage)#
switch(config-dual-stage)# show configuration failed
`config terminal`
`router bgp 100 `
`neighbor 2.2.2.2 `
`bfd `
Syntax error while parsing 'bfd '
`neighbor 3.3.3.3 `
`bfd `
Syntax error while parsing 'bfd '
`interface port-channel23 `
`bfd `
Syntax error while parsing 'bfd '
`end`
`end`
switch(config-dual-stage)#
|
設定変更は、コミット操作中に意味的に検証され、検証が成功すると実際のバックエンド コミットが開始されます。コミット中に 1 つ以上の設定エントリが失敗すると、メッセージが表示されます。失敗したコンフィギュレーションのエラー メッセージと説明を表示するには、show
configuration failed コマンドを入力します。これにより、最後のコミットで失敗した設定ブロックが表示されます。設定ブロックは、設定コンテキストを保持します。
|
ステップ 16
|
show configuration failed noerrors
switch(config-dual-stage)# show configuration failed noerror
router bgp 100
neighbor 2.2.2.2
bfd
neighbor 3.3.3.3
bfd
interface port-channel23
bfd
switch(config-dual-stage)#
|
失敗したコンフィギュレーション ブロックのエラー設定(説明なし)のみを表示するには、show configuration failed noerrors コマンドを入力します。
|
ステップ 17
|
load configuration failed commit
switch(config-dual-stage)# load configuration failed commit
switch(config-dual-stage-if)# sh configuration
! Cached configuration
!
router bgp 100
neighbor 2.2.2.2
bfd
!
interface port-channel23
bfd
switch(config-dual-stage-if)#
|
コミット中にルータが検証失敗メッセージを表示した場合、設定変更は失われません。ターゲット設定を変更し、再度コミットできます。設定変更をコミットしようとして、コンフィギュレーションが失敗したというメッセージがルータから表示された場合、その設定変更内容は失われません。デュアルステージ
コンフィギュレーション モード留まっている間に、sいっぱい下コンフィギュレーション ブロックをターゲット コンフィギュレーションにリロードし、エラーを修正して、変更内容をコミットできます。
失敗した設定をロードするには、load configuration failed commit コマンドを入力します。コンフィギュレーションを回復して、修正、コミットするか、またはファイルに保存した後であれば、コンフィギュレーションが失われることはありません。ロード中、構文的に誤った設定は無視されることに注意してください。「show
configuration」を使用してターゲット設定を表示できます。
|