Huawei VRP Command Cheat Sheet

4
General Command Description reset saved-config Delete the saved configuration undo terminal debug Disables the debugging output to the terminal reboot Reboots the system save Saves the current configuration to flash quit Leave current view return Return to user view display interface brief Show the brief interface list Interface Commands Command Description display interface [#/#/#] Display interface details interface [#/#/#] Jump into the interface configuration mode VLAN Command Description vlan vlan-id Creates a VLAN vlan batch { vlan-id1 [ to vlan-id2]}&<1-10> Creates multpile VLANs in a batch port link-type access Sets the interface type to access. The default interface type is hybrid port default vlan vlan-id Specifies the default VLAN of an interface port link-type trunk Sets the interface type to trunk port trunk allow-pass vlan {{vlan- id1 [ to vlan-id2 ] } & <1-10> | all } Adds a trunk interface to VLANs port hybrid untagged vlan-id Sets the port to hybrid with untagged to VLAN-ID Port Isolation Command Description port-isolate enable Enables isolation of the port QinQ Command Description

Transcript of Huawei VRP Command Cheat Sheet

Page 1: Huawei VRP Command Cheat Sheet

GeneralCommand Description

reset saved-config Delete the saved configuration

undo terminal debug Disables the debugging output to the terminal

reboot Reboots the system

save Saves the current configuration to flash

quit Leave current view

return Return to user view

display interface brief Show the brief interface list

Interface CommandsCommand Description

display interface [#/#/#] Display interface details

interface [#/#/#] Jump into the interface configuration mode

 

 

VLANCommand Description

vlan vlan-id Creates a VLAN

vlan batch { vlan-id1 [ to vlan-id2]}&<1-10> Creates multpile VLANs in a batch

port link-type access Sets the interface type to access. The default interface type is hybrid

port default vlan vlan-id Specifies the default VLAN of an interface

port link-type trunk Sets the interface type to trunk

port trunk allow-pass vlan {{vlan-id1 [ to vlan-id2 ] } & <1-10> | all }

Adds a trunk interface to VLANs

port hybrid untagged vlan-id Sets the port to hybrid with untagged to VLAN-ID

Port IsolationCommand Description

port-isolate enableEnables isolation of the port

 

QinQCommand Description

port link-type dot1q-tunnelConfigures an interface as a QinQ interface

port default vlan-id Configures the default VLAN of the interface, that is, the VLAN-ID in the outer tag of frames

qinq protocol protocol-id Configures the protocol type in the outer VLAN tag of frames. By default, the protocol type in the outer VLAN tag is 0x8100

 

Selective QinQ

Page 2: Huawei VRP Command Cheat Sheet

Command Description

qinq vlan-translation enableEnables selective QinQ on an interface

port default vlan vlan-id Specifies the default VLAN of the interface

trust 8021p Configures the interface to trust the 802.1p priority of received frames

port vlan-stacking vlan vlan-id1  [  to vlan-id2 ]  pushvlan  vlan-id3   {  remark-8021p  priority-id  |  priority-inherit  }

Configures the interface to add an outer VLAN tag (VLAN3) to frames with specified VLAN-IDs

port trunk allow-pass vlan vlan-id3 This interface must be addes to the VLAN specified byvlan-id3 using the trunk allow-pass vlan command

 

GVRPCommand Description

[SW1] gvrp Enables GVRP globally

[SW1-Ethernet-id]gvrp Enables GVRP on interface

[SW1-Ethernet-id]gvrp registration fixed | forbidden | Changes the GVRP mode, dynamic is the default

 

STPCommand Description

stp mode stp Set stp mode, the default operation mode is MSTP

stp enable Enables stp globally

 

RSTPCommand Description

stp mode rstp Set rstp mode, the default operation mode is MSTP

stp enable Enables stp globally

stp priority 4096 Changes the priority

 

MSTPstp region-configuration

Configures MST region information

region-name name Configures the MST region name

instance mst-id  vlan-id Mapping between mst-id and vlan-id

active region configuration Activates the region configuration

stp instance mst-id root primary Configure the switch as the root bridge of mst-id

 

MPLS and LDPmpls lsr-id a.b.c.d Set the ID ot the LSR

mpls enables the MPLS, must be executed on system and interface view

Page 3: Huawei VRP Command Cheat Sheet

lsp-trigger all | ip-prefix prefix-list Triggers LSPs at all routes or the routes according to the prefix-list

static-lsp ingress lsp-name destination dest-addr  {addr-mask  |  mask-lenght  }   {{ nexthop   next-hop-addr  } |  { outgoing-interface  interface-type  interface-num  } } }  out-label  out-label-value 

self-explaining, isn’t it.

 

MPLS VPNip vpn-instance vpn-id Starts a VNP instance

route-distinguisher x:y Associates the route distinguisher to VPN-Instance

vpn-target x:y both Create vpn-target extended community for vpn-instance, here for both import and export.

ip binding vpn-instance x:y Bind that interface to the vpn-instance

PPP

 Configuration on the ppp server:

1. aaa

2. local-user username password { simple | cipher  }password

3. quit

4. int Ser 0/0/0

5. ppp authentication-mode { ppp | chap }  call-in

This discribes the neccessary steps to start the ppp server.

1. The client side: int Ser 0/0/0

2. ppp chap local-user username password simplepassword

Client side needs a user and the dailin method

 

OSPF

 ospf 

Enters the ospf router view, by default with the process number 1

oapf area 0.0.0.0 Enters OSPF Router area 0 configuration view

PPP

BGP

 bgp as-number 

Enters the bgp router view, with the AS number

peer a.b.c.d as-number as-number Defines peer

peer a.b.c.d connect-interface loopback 0 Source for multihop

Static route example: ip route-static 4.4.4.4 32 20.0.0.1

IGBP reachability: peer 1.1.1.1 as-number 65000 peer 1.1.1.1 next-hop-local

Uses the local IGP routing table to reach the BGP neighbor.

Router on a Stickint e 0/0/0.1

Page 4: Huawei VRP Command Cheat Sheet

control-vid 11 dot1q-termination

dot1q