キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
590
閲覧回数
5
いいね!
0
コメント
Asami Agarie
Cisco Employee
Cisco Employee

 

 

はじめに

本記事は、サービスがデバイスを参照している状態でデバイス名を変更する手順について紹介します。

手順

1.  デバイスに紐づくサービスを確認します

2.  デバイスのコピーを作成します

3.  新しい方のデバイス名でサービスの redeploy を実施します

4.  refcount が+1になっているので reconcile し修正します

5.  古い方のデバイスを削除します

重要な情報
ここで紹介する手順は本番環境の前にテスト環境にてご確認ください。

Demo

1. rename するデバイスに紐づくサービスのリストを確認します

 

admin@ncs# show devices device ios1 service-list
service-list [ "/ncs:services/loopback:loopback{100}" ]

 

2. デバイスのコピーを作成します

 

admin@ncs(config)# copy devices device ios1 ios-new
admin@ncs(config)# commit no-networking 
Commit complete.
admin@ncs(config)# devices device ios-new sync-from
result true

 

3. サービスインスタンスのデバイス名を更新します

 

admin@ncs# show running-config services loopback 100
services loopback 100
 device        ios1
 loopback-intf 100
 ip-address    10.100.1.1
!
admin@ncs# config
Entering configuration mode terminal
admin@ncs(config)# services loopback 100 device ios-new
admin@ncs(config-loopback-100)# commit no-networking
Commit complete.

 

4. re-deploy reconcile を実行し refcount を調整します

 

admin@ncs# show running-config devices device ios-new config ios:interface Loopback | display service-meta-data
devices device ios-new
 config
  interface Loopback0
   ip address 127.0.0.1 255.0.0.0
   no shutdown
  exit
  ! Refcount: 2
  ! Backpointer: [ /ncs:services/loopback:loopback[loopback:servicename='100'] ]
  interface Loopback100
   ! Refcount: 2
   ip address 10.100.1.1 255.255.255.255
   no shutdown
  exit
 !
!
admin@ncs# services loopback 100 re-deploy reconcile { keep-non-service-config  }
admin@ncs# show running-config devices device ios-new config ios:interface Loopback | display service-meta-data
devices device ios-new
 config
  interface Loopback0
   ip address 127.0.0.1 255.0.0.0
   no shutdown
  exit
  ! Refcount: 1
  ! Backpointer: [ /ncs:services/loopback:loopback[loopback:servicename='100'] ]
  interface Loopback100
   ! Refcount: 1
   ip address 10.100.1.1 255.255.255.255
   no shutdown
  exit
 !
!
admin@ncs# show running-config services loopback 100
services loopback 100
 device        ios-new
 loopback-intf 100
 ip-address    10.100.1.1
!

 

5. 古い方のデバイス名を削除します

 

admin@ncs(config)# no devices device ios1 
admin@ncs(config)# commit        
Commit complete.

 

 

 

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします