6.2.7 コンフィグレーションのファイルからの反映
loadコマンドを使用すると,指定したコンフィグレーションファイルの内容を編集中のコンフィグレーションへ反映できます。指定したコンフィグレーションファイルを編集中のコンフィグレーションにマージする例を次に示します。
(config)# show                                    <-1
    :
    :
    :
interface gigabitethernet 1/1
!
    :
    :
    :
(config)# exit
# cat /usr/home/operator/tmp.cnf                  <-2
interface gigabitethernet 1/1
  shutdown
  description "PORT001"
  speed 1000
  no shutdown
!
# configure
(config)# load merge /usr/home/operator/tmp.cnf   <-3
Do you want to apply the specified configuration file to the configuration being edited? (y/n): y
!(config)# show                                   <-4
    :
    :
    :
interface gigabitethernet 1/1
  description "PORT001"
  speed 1000
!
!(config)# | 
            
- 
               
編集中のコンフィグレーションを確認します。
 - 
               
マージするコンフィグレーションファイル/usr/home/operator/tmp.cnfを確認します(コンフィグレーションを追加する指定をします)。
 - 
               
/usr/home/operator/tmp.cnfを編集中のコンフィグレーションにマージ(追加)します。
 - 
               
マージが完了した編集中のコンフィグレーションを確認します。
 
# show running-config                             <-1
    :
    :
    :
interface gigabitethernet 1/1
  description "PORT001"
  speed 1000
    :
    :
    :
# cat /usr/home/operator/tmp2.cnf                 <-2
interface gigabitethernet 1/1
  shutdown
  no description
  no speed
  no shutdown
!
# configure
(config)# load merge /usr/home/operator/tmp2.cnf  <-3
Do you want to apply the specified configuration file to the configuration being edited? (y/n): y
!(config)# show                                   <-4
    :
    :
    :
interface gigabitethernet 1/1
!
    :
    :
    :
!(config)# | 
            
- 
               
編集中のコンフィグレーションを確認します。
 - 
               
マージするコンフィグレーションファイル/usr/home/operator/tmp2.cnfを確認します(コンフィグレーションを削除する指定をします)。
 - 
               
/usr/home/operator/tmp2.cnfを編集中のコンフィグレーションにマージ(削除)します。
 - 
               
マージが完了した編集中のコンフィグレーションを確認します。