Common commands for Huawei Switches
Summarize the commonly used commands for Huawei switches as follows:
1. view the port status in Linux
root@root:~# netstat -an|grep -E "6002|6003"
2. The current configuration is displayed for the Huawei switch.
Display current-configuration or short name
Display cur3. display port information
Display interface or short name
Dis int
4. display all current VLANs
Display vlan or short name
Dis vl
Note: All short commands are the only representative of the completion command.
5. display version information
display version
6. Modify switch commands
sysname huawei
7. Go to the interface View
[huawei]interface GigabitEthernet0/0/12[huawei-GigabitEthernet0/0/12]
8. Set the port working mode
Trunk Mode
[Huawei-GigabitEthernet0/0/12] port link-type trunk
Access Mode
[Huawei-GigabitEthernet0/0/12] port link-type access
Hybrid mode
[Huawei-GigabitEthernet0/0/12] port link-type hybrid
9. Change the vlan of the port
[huawei-GigabitEthernet0/0/12]port default vlan 3
10. Close the port
[huawei-GigabitEthernet0/0/12]shutdown
11. Activate the port
[huawei-GigabitEthernet0/0/12]undo shutdown
12. Save the configuration file
[huawei]display saved-configuration
13.EnterVlanView
display vlan 3
14.Go to System View
system-view
15.Enter virtual terminal
[huawei]user-interface vty 0 4
16. Set Password Mode
[huawei-ui-vty0-4]authentication-mode password taoge
17. Set a password
[Huawei-ui-vty0-4] set authentication password taotao
18.Set user level
[Huawei-ui-vty0-4] user privilege level 3
19.CreateVlan
[Huawei] display vlan 121 Error: The VLAN does not exist. Prompt that The current vlan 121 does not exist [huawei] vlan 121 [huawei-vlan121] Vlan 121 created successfully
20.InVlanAdding Port
[huawei-vlan121]port GigabitEthernet0/0/12
21. Add vlan description
[huawei-vlan121]description taotao.test
22. Delete vlan description
[huawei-vlan121]description ''
23.ExitVlanView
[huawei-vlan121]quit
The specific command is also related to the model. Now, let's get to it! You are welcome to follow up on my blog. If you have any questions, please add the QQ group: 454796847 and 135430763 to make progress together!