LoginSignup
8
13

More than 3 years have passed since last update.

HPスイッチのコマンド集

Posted at

はじめに

  • 弊社では、HPE制のスイッチを利用しています。
  • そこまで操作頻度が高くない為、備忘録として、コマンド集を作成しました。

参照系

  • ポートのリンクアップ・ダウン確認
display interface brief
  • 現在の有効なコンフィグを確認
display current-configration
  • 接続機器のMacアドレスを確認
display mac-address
  • リンクアグリゲーションの状態を確認
display link-aggregation summary
display link-aggregation verbose
  • CPU負荷状況を確認
display cpu-usage
  • メモリの使用状況確認

display memory

  • ファームウェア、駆動時間などを確認
display version
  • 特権モードへ移行(root権限)
  • OSの格納先およびバージョンの確認
display boot-loader
  • 機器情報(型番、シリアルナンバー、Macアドレスなど)
display device manuinfo
  • ファン状態の確認
display fan
  • 電源状態の確認
display power
  • fibテーブルの確認(スイッチングの宛先)
display fib
  • ルーティング情報
display ip routing-table
  • vlan情報
display vlan all

Vlan設定

  • 特権モードへ移行
system-view
  • Vlanの作成
interface Vlan-interface100
ip address 10.0.0.1 255.255.255.0
  • Vlanへのアクセスポート設定
interface GigabitEthernet1/0/1
description "Test"
port access vlan 100`

リンクアグリゲーション設定

  • リンクアグリゲーションの設定
interface Bridge-aggregation1
port link-type trunk
port trunk permit vlan all
  • 対象のポートをリンクアグリゲーショングループへ設定
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
  • スタティックルートの設定
ip route-static 0.0.0.0 0.0.0.0 1.1.1.1
ip route-static 10.0.0.0 255.255.255.0 2.0.0.1
  • アクセスリスト設定
acl number 2001
rule 10 permit source 1.1.1.1 0.0.0.127
rule 20 permit source 2.2.2.2 0.0.0.127
  • ssh設定
ssh server enable
  • telnet設定
user-interface vty 0 4
  • 保存
save

IRFの設定

  • irfの状態確認
display irf

 *出力例
  Switch Role Priority CPU-Mac Description
  *+1 Master 1 xxxx-yyyy-zzzz -----
  --------------------------------------------------
  * indicates the device is the master.
  + indicates the device through which the user logs in.
  The Bridge MAC of the IRF is: xxxx-yyyy-zzzz
    Auto upgrade : yes
    Mac persistent : 6 min
Domain ID : 0
  • irfの設定確認
    • display irf configration
  • irfのTopology確認
    • display irf topology

IRFの設定

スイッチAで実行

  • irfに使用するインターフェースをダウンする
interface GigabitEthernet1/0/18
shutdown
quit

interface GigabitEthernet1/0/20
shutdown
quit
  • irfポートを設定する
irf-port 1/1
port group interface GigabitEthernet 1/0/18 mode normal
quit

irf-port 1/2
port group interface GigabitEthernet 1/0/20 mode normal
quit
  • シャットダウンしたインターフェースをアップ
interface GigabitEthernet1/0/18
undo shutdown
quit

interface GigabitEthernet1/0/20
undo shutdown
quit
  • 変更を保存
    • save

スイッチBで実行

  • irfメンバーを変更し、反映するためにリブートする
irf member 1 renumber 2
save
quit
reboot
  • irfに使用するポートをダウンする
interface GigabitEthernet2/0/18
shutdown
quit

interface GigabitEthernet2/0/20
shutdown
quit
  • irfポートを設定する
irf-port 2/1
port group interface GigabitEthernet 2/0/18 mode normal
quit

irf-port 2/2
port group interface GigabitEthernet 2/0/20 mode normal
quit
  • シャットダウンしたインターフェースをアップ
interface GigabitEthernet2/0/18
undo shutdown
quit

interface GigabitEthernet2/0/20
undo shutdown quit
  • 設定変更を保存し、ケーブル接続
save
  • どちらかのスイッチでirfをアクティブに変更する
irf-port-configration active

設定後確認

  • 状態確認
display irf
  • 設定確認
display irf configuration
  • irfのtopology確認
display irf topol
8
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
13