php Editor Banana will introduce you to the query commands of Huawei switches in detail. As an important part of network equipment, Huawei switches' configuration and management are important links in network operation and maintenance. Understanding and mastering the query commands of Huawei switches can help administrators perform network troubleshooting, performance monitoring, and configuration management. In this article, we will gradually introduce the query commands of Huawei switches to help readers better understand and apply these commands. Let’s find out together!
Preface
Hello everyone, I am Mr. Lin. We have summarized the configuration commands and examples of Huawei switches before. A friend mentioned how to check the switch configuration when configuring the switch or during the project. Configuration status? How can I check which ports and vlans I have configured?
It is very important to query the switch configuration, which can quickly solve the problems during the configuration process.
Text
In this issue, we summarize Huawei switch configuration and query commands on a special topic. It is very convenient to use together with the project.
1. Basic Huawei switch configuration commands
1. Create vlan
//User view, that is, run the command in Quidway mode.
system-view //Enter the configuration view
[Quidway] vlan 10 //Create vlan 10 and enter the vlan10 configuration view. If vlan10 exists, directly enter the vlan10 configuration view
[Quidway-vlan10] quit / /Return to the configuration view
[Quidway] vlan 100 //Create vlan 100 and enter the vlan100 configuration view. If vlan10 exists, directly enter the vlan100 configuration view
[Quidway-vlan100] quit //Return Configuration view
2. Add the port to vlan:
[Quidway] interface GigabitEthernet2/0/1 (10G optical port)
[Quidway- GigabitEthernet2 /0/1] port link-type access //Define the port transmission mode
[Quidway- GigabitEthernet2/0/1] port default vlan 100 //Add the port to vlan100
[Quidway- GigabitEthernet2/0/1] quit //Return to the configuration view
[Quidway] interface GigabitEthernet1/0/0 //Enter the configuration view of the first Gigabit network port on slot 1. 0 represents port 1
[Quidway- GigabitEthernet1/0/0] port link-type access //Define port transmission mode
[Quidway- GigabitEthernet2/0/1] port default vlan 10 //Add this port Go to vlan10
[Quidway- GigabitEthernet2/0/1] quit
3. Add multiple ports to VLAN
system-view
[Quidway]vlan 10
[Quidway-vlan10]port GigabitEthernet 1/0/0 to 1/0/29 //Add ports 0 to 29 to vlan10
[Quidway-vlan10]quit
4. Switch configuration IP address
[Quidway] interface Vlanif100 // Entering the vlan100 interface view is different from the place where the vlan 100 command is entered
[Quidway-Vlanif100] ip address 119.167.200.90 255.255.255.252 // Define the vlan100 management IP layer 3 switching gateway route
[Quidway-Vlanif100] quit //Return to the view
[Quidway] interface Vlanif10 //Enter the vlan10 interface view and enter the vlan 10 command from a different place
[ Quidway-Vlanif10] ip address 119.167.206.129 255.255.255.128 // Define vlan10 management IP layer three switching gateway route
[Quidway-Vlanif10] quit
5. Configuration Default static route:
[Quidway]ip route-static 0.0.0.0 0.0.0.0 119.167.200.89 //Configure the default static route.
6. Switch save settings and reset commands
save //Save configuration information
reset saved-configuration //Reset switch configuration
reboot //Restart the switch
7. Common display commands for switches
In user view mode:
display current-configuration //Show that the switch is running now Configuration details
display device //Display the status of each device
display interface? //Display port status, use? You can view the following options
display version //View switch firmware version information
display vlan? // View vlan configuration information
8. Restore the switch to factory settings
reset saved-configuration //Reset the switch configuration
2. Huawei switch configuration status query command
We have summarized the configuration commands of Huawei switches above. In the project, in addition to configuration commands, we will also often use query commands to view the configuration. Condition.
1. Query port usage
dis interface brief Check which port of the switch is a 10G port, as well as the port status and which port is in use.
As shown below, use this command.
Port 0/0/1 and port 0/0/2 are in use. Other interfaces are not used; if other ports are configured in the actual project and their status does not show up but down, then the port configuration must be checked.
If you need to view more detailed information about the port, you can directly enter:
display interface?
2. Usage of the ip address corresponding to the virtual interface
dis ip int brief Displays the ip address and usage corresponding to the virtual interface state.
The configuration of virtual interfaces is extremely common on switches. A network configuration sometimes requires the creation of 3 to 5 virtual interfaces. Understand The configuration of the virtual interface is also very necessary.
3. Display the created vlan situation dis vlan
Display the created vlan situation dis vlan
##4. View the configuration details of the switch being used n Display the configuration details of the switch currently running. You can see the configuration of the switch in detail. This command is very important. You can view the IP address of the switch in detail. Configuration of address, vlan, and port. display current configuration 5. Display switch device status Display device status, right It is necessary to check the status of the switch. display device 6. Check the switch cpu usage When you feel that the switch is very When the card is stuck, it is better to check the cpu utilization of the switch Display cpu-usage Check the CPU utilization of the switch Seven , Check the switch memory usage Check the switch memory utilization. Display memory If you find that the utilization of both CPU and memory is very high, then enter the command# Display interface port number can continuously check the data flow under each port. Enter the port configuration interface and enter the Shutdown command to forcefully close the port and disconnect it from the network. Contact the terminal user. After asking it to terminate the download process, restore its network. 7. Check the switch model and firmware version Check the switch model and firmware version. It is very important to understand the switch parameters. Use the switch according to the switch performance. display versionThis article ends here. I hope it can help you. After reading it, if you think what is the Huawei switch query command? "Detailed introduction :Huawei switch configuration and switch query commands" If it is good, I hope you can support it! Browse more pages of this website’s learning website to learn more related knowledge!
The above is the detailed content of What are Huawei switch query commands? Detailed introduction: Huawei switch configuration and switch query commands. For more information, please follow other related articles on the PHP Chinese website!