HOME > コンテンツリスト > ラボ・シナリオ for CCNA > [ < 前へ 次へ > ]

コンフィグの保存と削除を行う

ネットワーク構成図

  1. startup-config に何も保存されていないことを確認しなさい。
  2. RT-A# show startup-config
    startup-config is not present  ← NVRAM に startup-config がない
    RT-A#
    
  3. running-config を startup-config に保存しなさい。
  4. RT-A# copy running-config startup-config
    Destination filename [startup-config]? < Enter >
    Building configuration...
    [OK]
    RT-A#
    
  5. running-config が startup-config に保存されたことを確認しなさい。
  6. RT-A# show startup-config
    Using 1220 out of 196600 bytes
    !
    ! Last configuration change at 23:19:12 UTC Fri Aug 16 2013
    version 15.1
    service timestamps debug datetime msec
    service timestamps log datetime msec
    service password-encryption
    !
    hostname RT-A
    !
          ・
          ・
          ・
    !
    line con 0
     exec-timeout 0 0
     password 7 1306181C181C053938
     logging synchronous
     login
    line aux 0
     password 7 59DD08B2CBC821D0
     login
    line vty 0 4
     password 7 0010160A145A1815
     login
     transport input all
    !
    !
    
    running-config と比較しましょう。同じ内容になっているはずです。
    Cisco ルータの内部には、ROM、Flash、RAM、NVRAM のメモリがあり、
    running-config は RAM に
    startup-config は NVRAM に入っています。

    copy running-config startup-config コマンドで、running-config で startup-config が上書きされ、
    ここではやっていませんが、
    copy startup-config running-config コマンドで、startup-config が running-config にマージされます。



    マージと上書きの違いは後の「コンフィグのバックアップとリストアを行う」で行います。
  7. ルータの電源を [OFF] → [ON] させなさい。
  8. 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
    
    program load complete, entry point: 0x8000f000, size: 0x2d3b348
    Self decompressing the image : #################################################
    ################################################################################
    ################################################################################
    ######################################################### [OK]
          ・
          ・
          ・
    Press RETURN to get started!
    
     < Enter >
    
    RT-A>
    
    今までは、ルータの電源を入れた場合、ルータ起動後、以下の問い合わせメッセージが表示され、no を入力することによりユーザモードに入っていましたが、今回はこのメッセージは表示されません。
    Would you like to enter the initial configuration dialog? [yes/no]:
    
    このメッセージは、ルータに startup-config がないか、startup-config をバイパスして (読み込まないで) ルータを起動させた場合に表示されます。今回は先ほど startup-config を保存しましたので、ルータには startup-config があります。したがって、startup-config を読み込んで起動したため、このメッセージは表示されませんでした。
  9. 特権モードに入り、running-config と startup-config の中の設定が同じことを確認しなさい。
  10. ここには載せませんが、show running-config コマンドと show startup-config コマンドを実行して比較してください。
    ルータは起動時に、NVRAM 内に保存されてい る startup-config を、running-config として RAM に読み込みます。
    そして、DRAM に読み込んだ running-config を基にルータは動作します。
    そのため、ルータ起動時 は startup-config=running-config です。
  11. startup-config に保存した設定を削除しなさい。
  12. RT-A# erase nvram:
    Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] < Enter >
    [OK]
    Erase of nvram: complete
    RT-A#
    
    もちろん erase startup-config でも OK ですが、erase nvram: コマンドの方がより新しいコマンドですので普段はこちらのコマンドを使うようにしましょう。ただし、erase startup-config でもできることは忘れずに。
  13. startup-config に何も保存されていないことを確認しなさい。
  14. RT-A# show startup-config
    startup-config is not present
    RT-A#
    
    startup-config は削除されました。しかし、running-config には設定は残っています。
    show running-config で確認してみてください。
    ただし、電源を切ると running-config は消えてしまいますので、
    設定を保存したい場合には、必ず startup-config に保存しておきましょう。
  15. ルータを再起動させなさい。
  16. Router# reload
    System configuration has been modified. Save? [yes/no]: n
    Proceed with reload? [confirm] < Enter >
    
    reload コマンドで、ルータを再起動させることができます。
    reload コマンドは、ルータの電源を [OFF] → [ON] したのと同じです。
    ルータのブートメッセージ (起動時のメッセージ) が表示されます。
    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
    
    program load complete, entry point: 0x8000f000, size: 0x2d3b348
    Self decompressing the image : #################################################
    ################################################################################
    ################################################################################
    ######################################################### [OK]
          ・
          ・
          ・
    Would you like to enter the initial configuration dialog? [yes/no]:
    
    startup-config を削除し、ルータに startup-config がないため、今回は次の問い合わせメッセージが表示されます。