A quick reference for commonly used commands when working with Huawei switches.
Entering Different Modes
Huawei devices use a hierarchical CLI. You typically move between:
- User view
- System view
- Interface view
system-view # Enter system view
interface # Enter interface view
quit # Go back one level
return # Return to user view directly
Basic System Information
display version # System version, model, uptime
display current-configuration # Current configuration
Basic Configuration
sysname <name> # Set device name
save # Save configuration
reboot # Reboot device
reset saved-configuration # Factory reset
Interface Control
interface GigabitEthernet0/0/1
shutdown # Disable interface
undo shutdown # Enable interface
Console Access Configuration
user-interface console 0
authentication-mode password
set authentication password cipher <password>
Optional:
idle-timeout 1440 # Auto logout after 1440 minutes
Remote Access (VTY / Telnet)
user-interface vty 0 4
set authentication password cipher <password>
user privilege level 3
VLAN Interface Configuration
interface vlanif 1
ip address 192.168.1.251 24
Example: Basic Interface Setup
system-view
sysname ar1
interface g0/0/1
ip address 192.168.1.254 24
quit
interface g0/0/2
ip address 192.168.2.254 24
Routing Table
display ip routing-table
Shows directly connected routes and routing entries.
Notes
- Commands may vary slightly depending on device model and firmware
- Always
saveyour configuration to avoid losing changes after reboot






















