Huawei CLI Commands Cheat Sheet (VRP)
Huawei CLI Cheatsheet
General Commands
| Command | Description |
|---|---|
system-view |
Enter configuration mode |
display current-configuration |
View current configuration |
display saved-configuration |
View saved configuration |
save |
Save configuration |
display version |
System version info |
undo XXX |
Cancel configuration |
display interface |
View interfaces |
VLAN & Switching
| Command | Description |
|---|---|
vlan batch 10 20 30 |
Create multiple VLANs |
interface Vlanif 10 |
Configure VLAN interface |
port link-type access |
Set port as access |
port default vlan 10 |
Assign VLAN to port |
display vlan |
View VLANs |
stp enable |
Enable STP on switch |
Routing
| Command | Description |
|---|---|
ip route-static 0.0.0.0 0.0.0.0 192.168.1.1 |
Add static route |
ospf 1 |
Enable OSPF process 1 |
area 0 |
Set OSPF area |
network 192.168.0.0 0.0.0.255 |
Add network to OSPF |
display ip routing-table |
View routing table |
BGP
| Command | Description |
|---|---|
bgp 65001 |
Enable BGP with ASN 65001 |
peer 192.168.1.2 as-number 65002 |
Add BGP neighbor |
network 10.0.0.0 255.0.0.0 |
Advertise network in BGP |
IP Services / Security
| Command | Description |
|---|---|
ipsec proposal huawei-prop |
Create IPsec proposal |
ipsec policy huawei-policy 10 isakmp |
Create IPsec policy |
display ipsec sa |
View IPsec SA |
display acl all |
View all ACLs |
save |
Save configuration after setup |