Edited at

Huawei Switch(CloudEngine) チートシート

More than 1 year has passed since last update.


確認環境


  • eNSP(Huawei製シミュレータ、無料でDL可能)


表示系コマンド


コンフィグ表示

!!!dis cur(省略形)

<HUAWEI>display current-configuration


表示行数

!!! 恒久的

[HUAWEI]screen-length 0

!!! 現セッションのみ
??未確認screen-length 0 temporary ??


時刻表示

<HUAWEI>display clock


現階層のコンフィグ表示

[HUAWEI]interface GE 1/0/0

[HUAWEI-GE1/0/0]display this
#
interface GE1/0/0
shutdown
#
return


サポート用コマンド

<HUAWEI>dis diagnostic-information 


Interface counter リセット

<HUAWEI>reset interface counters GE 1/0/1

This operation resets the counters in the display interface command output on this interface.
Info: Reset successfully.


System ViewでUser Viewのコマンドを実行(ciscoのdo)

[HUAWEI]run dir


terminal monitor

[HUAWEI]terminal monitor 

Info: Current terminal monitor is on.
[HUAWEI]terminal logging
Info: Current terminal logging is on.


debug

デフォルト5分でdebugがdisableになる

<HUAWEI>terminal monitor

<HUAWEI>terminal debugging
<HUAWEI>debugging bgp packet update
<HUAWEI>display debugging


設定系コマンド


設定モードへ移動

!!!設定反映にcommitが必要。ホスト名の前に~が付く

<HUAWEI>system-view
[~HUAWEI]

!!!commit不要。即時反映

<HUAWEI>system-view immediately
[HUAWEI]


commit

!!!commit候補のコンフィグ(JUNOS: show | compare)

!!!dis c ca(省略形)
[~HUAWEI]display configuration candidate

!!!仮反映(JUNOS: commit confirmed 1)
[~HUAWEI]commit trial 60

!!!candidateコンフィグを削除(JUNOS: rollback 0)
[~HUAWEI]clear configuration candidate


設定削除

[HUAWEI-GE1/0/0]undo CONFIG

!!!no shut
[HUAWEI-GE1/0/0]undo shutdown


ホスト名

[HUAWEI]sysname HOSTNAME


access port

!!! GE1/0/0にvlan 100をaccessで設定

[HUAWEI]int GE 1/0/0
[HUAWEI-GE1/0/0]port link-type access
[HUAWEI-GE1/0/0]port default vlan 100


trunk port

!!! GE1/0/0にvlan 100,200をtrunkで設定

[HUAWEI]int GE 1/0/0
[HUAWEI-GE1/0/0]port link-type trunk
[HUAWEI-GE1/0/0]port trunk allow-pass vlan 100 200

!!!vlan追加(switchport trunk allowed vlan add)
[HUAWEI-GE1/0/0]port trunk allow-pass vlan 300


SVI作成

!!!VLAN100に192.168.0.100/24を設定

[HUAWEI]vlan 100
[HUAWEI-vlan100]quit
[HUAWEI]int Vlanif 100
[HUAWEI-Vlanif100]ip address 192.168.0.100 24


Router port ⇔ Switch port

!!!To router port

[HUAWEI-GE1/0/2]undo portswitch

!!!To Switch port
[HUAWEI-GE1/0/2]portswitch


コンフィグ初期化

!!!reboot時に次に上がってくるイメージとコンフィグが確認できる

<HUAWEI>reset saved-configuration
<HUAWEI>reboot
slot 1:
Next startup system software: cfcard:/VRPV800R006C00SPC500B587D0118_CE68.cc
Next startup saved-configuration file: NULL
Next startup paf file: default
Next startup patch package: NULL
Warning: The current configuration will be saved to the next startup saved-confi
guration file. Continue? [Y/N]:


load-interval

!!!show int で表示される統計情報の取得間隔(default:300)

[HUAWEI]int GE 1/0/0
[HUAWEI-GE1/0/0]set flow-stat interval 30

!!!筐体全体でも設定可能
[HUAWEI]set flow-stat interval 10


BGP Configuration

!!! iBGP configuration

[HUAWEI]bgp 65000
[HUAWEI-bgp]router-id 1.1.1.1
[HUAWEI-bgp]peer 192.168.0.2 as-number 65000
[HUAWEI-bgp]display bgp peer

!!! RR(Route Reflector)の設定
[HUAWEI]bgp 65000
[HUAWEI-bgp]peer 192.168.0.2 as-number 65000
[HUAWEI-bgp]peer 192.168.0.2 reflect-client
[HUAWEI-bgp]dis bgp peer 192.168.0.2 verbose
~~~~~~~~
It's route-reflector-client
~~~~~~~~

!!! RRから受信した経路の属性をroute-policyのexportで書き換える場合
[HUAWEI-bgp]reflect change-path-attribute

!!! ECMP
[HUAWEI-bgp]maximum load-balancing ibgp <1-16>

!!! 受信経路の確認
[HUAWEI-bgp]dis bgp routing-table peer 192.168.0.2 received-routes

!!! 広報経路の確認
[HUAWEI-bgp]dis bgp routing-table peer 192.168.0.2 advertised-routes

!!! BGP tableの確認(ルーティングテーブルではないよ)
[HUAWEI-bgp]dis bgp routing-table

!!! BGP sessionクリア(User View)
<HUAWEI>refresh bgp [ all | X.X.X.X ] [ import | export]

!!BFD
!!!BFDを筐体でEnable
[CE2]bfd
[CE2-bfd]quit
[CE2]bgp 200

!!peer毎にBFDをEnable、Intervalもここで設定可能
[CE2-bgp]peer 192.168.2.2 bfd enable
[CE1]dis bgp bfd session all
--------------------------------------------------------------------------------
Local_Address Peer_Address Interface
192.168.0.2 192.168.0.1 GE1/0/2
Tx-interval(ms) Rx-interval(ms) Multiplier Session-State
1000 1000 3 Up

Local_Address Peer_Address Interface
192.168.1.2 192.168.1.1 GE1/0/3
Tx-interval(ms) Rx-interval(ms) Multiplier Session-State
0 0 0 Unknown

--------------------------------------------------------------------------------

BFDのキャプチャ

bfd_packet.JPG


Reference