Huawei AR ルータを設定するための基礎知識

ルータ

動作確認環境

  • NetEngine AR651W
    • Version: V300R019C13SPC200

CLI のコマンドビュー

CLI にはコマンドビューと呼ばれる概念があります。ビューによって使用できるコマンドが異なるため、行いたい操作に応じてビューを変更します。

Huawei AR ルータでは以下のビューがあります。

  • User view
    • ログイン直後のビュー
    • 状態確認コマンドを実行できる
  • System view
    • 設定変更を実施できる
    • 各種機能の view へ移行できる
  • 各種機能の view
    • 指定した機能の設定を行えるビュー
    • 例:interface、ospf、bgp

各ビュー間の移行コマンドは下図の通りです。

ビュー移行の例:

<router01>system-view
Enter system view, return user view with Ctrl+Z.
[router01]interface GigabitEthernet0/0/1
[router01-GigabitEthernet0/0/1]quit
[router01]ospf
[router01-ospf-1]return
<router01>

デフォルトのユーザ名・パスワード

初回コンソールログイン用のユーザ名とパスワードは、ソフトウェアバージョンによって異なります。

V300R019C13 の場合は以下の通りです。

  • ユーザ名:admin
  • パスワード:admin@huawei.com

以下のページにバージョン別のユーザ名・パスワードがまとめられています。

https://forum.huawei.com/enterprise/en/ar-router-default-usernames-and-passwords/thread/667249738833084416-667213852955258880
Huaweisupportcommunityisacommunicationcenterforsharingexperiencesandknowledge,solvingquestionsandproblemsforenterprisepartners,customersandengineers.

コンフィグの種類について

Huawei AR ルータには以下の 3 種類のコンフィグが存在します。

  • factory-configuration
    • 工場出荷時のコンフィグ
    • 機器起動時に下記の saved-configuration が存在しない場合、factory-configuration が読み込まれる
    • コンフィグ表示コマンド:display factory-configuration
  • saved-configuration
    • フラッシュに保存されたコンフィグ
    • 機器起動時に読み込まれるコンフィグ
    • コンフィグ表示コマンド:display saved-configuration
  • current-configuration
    • 現在実行中のコンフィグ
    • 機器は current-configuration に基づいて動作する
    • コンフィグ表示コマンド:display current-configuration

display startup コマンドの Startup saved-configuration file で保存されているコンフィグファイル名を確認でき、Next startup saved-configuration file で次回起動時に読み込まれるコンフィグファイル名を確認できます。

<router01>display startup
MainBoard:
  Startup system software:                   flash:/AR650A-V300R019C13SPC200.cc
  Next startup system software:              flash:/AR650A-V300R019C13SPC200.cc
  Backup system software for next startup:   null
  Startup saved-configuration file:          flash:/vrpcfg.zip
  Next startup saved-configuration file:     flash:/vrpcfg.zip
  Startup license file:                      null
  Next startup license file:                 null
  Startup patch package:                     null
  Next startup patch package:                null
  Startup voice-files:                       null
  Next startup voice-files:                  null

current-configuration の保存

current-configuration を保存するためには save コマンドを実行します。

  • save [all] [<コンフィグファイル名>]
    • all: 動作していないボードのコンフィグも含めてすべてのコンフィグを保存する
    • <コンフィグファイル名>: 保存するコンフィグファイルの名前を指定。拡張子を .zip.cfg にする必要がある
      • 指定しない場合、vrpcfg.zip という名前になる

<Huawei>save
 Warning: The current configuration will be written to the device.
 Are you sure to continue?[Y/N]:y
  It will take several minutes to save configuration file, please wait..............
  Configuration file had been saved successfully
  Note: The configuration file will take effect after being activated
<Huawei>

【設定の初期化】saved-configuration の削除

saved-configuration を削除してから機器を再起動することにより、設定を初期化できます。

saved-configuration を削除するためには reset saved-configuration コマンドを実行します。

<router01>reset saved-configuration
 Warning: This will delete the configuration in the flash memory.
 The device configurations will be erased to reconfigure.
 Are you sure? (y/n):y
Info: Clear the configuration in the device successfully.
<router01>

reset saved-configuration コマンドを実行後、display startup コマンドで Startup saved-configuration file と Next startup saved-configuration file が null になることを確認できます。

<router01>display startup
MainBoard:
  Startup system software:                   flash:/AR650A-V300R019C13SPC200.cc
  Next startup system software:              flash:/AR650A-V300R019C13SPC200.cc
  Backup system software for next startup:   null
  Startup saved-configuration file:          null
  Next startup saved-configuration file:     null
  Startup license file:                      null
  Next startup license file:                 null
  Startup patch package:                     null
  Next startup patch package:                null
  Startup voice-files:                       null
  Next startup voice-files:                  null

機器再起動コマンド

reboot コマンドで再起動できます。

<router01>reboot
Info: The system is comparing the configuration, please wait.
System will reboot! Continue? [y/n]:

各種状態確認コマンドについて

Cisco 機器をはじめとする多くのメーカの機器では状態確認コマンドは show ○○○ のように show を頭に付けたコマンドになっていますが、Huawei AR ルータの場合は display ○○○ のように display を頭に付けたコマンドになっています。

display コマンド例:

  • display version
  • display current-configuration
  • display device
  • display interface brief

ログをまとめて表示する【ter len 0 的な】

display コマンドを実行した際にログ表示が 1 ページ分以上ある場合、1 ページ分表示するごとに ---- More ---- と表示され、ログ表示が止まります。この More を表示させずに一気にまとめてログを表示させたい場合はユーザービューで screen-length 0 temporary コマンドを実行します。

ただし、コンソールログインしている場合はこのコマンドは使用できません。Telnet、SSH などで VTY ログインしている場合のみ使用できます。

コンフィグ削除・初期化コマンド

特定の行のコンフィグを削除したい場合、例えば Cisco 機器では no ○○○ のように no を頭に付けることで設定を削除できますが、Huawei AR ルータの場合は undo ○○○ のように undo を頭に付けることで設定を削除(or 初期化)できます。

ホスト名を設定後、ホスト名を初期化する例:

[Huawei]sysname router01
[router01]undo sysname
[Huawei]

工場出荷状態への初期化

factory-configuration reset コマンドを実行したあと再起動をすることで機器を工場出荷状態に初期化できます。

<Huawei>factory-configuration reset
Warning: It will clean the configuration which you have saved. If you have set the factory-configuration by hand, it will start from the modified factory-configuration, else it will start from the original one, when you restart the device. Continue? [y/n]:y
 Info: Successfully set factory config!
<Huawei>
<Huawei>
<Huawei>reboot
Info: The system is comparing the configuration, please wait.
System will reboot! Continue? [y/n]:y
Info: system is rebooting, please wait...

タイトルとURLをコピーしました