9 Query Commands for Huawei Switches

In the modern network environment, switches, as the core equipment of the network, are responsible for key tasks such as data forwarding, traffic management, and network security. In order to ensure efficient operation and stability of the network, network administrators need to regularly monitor and manage the status and configuration of switches. With its excellent performance and rich functions, Huawei switches have become one of the preferred devices for many enterprise networks. This article will introduce in detail the nine query commands of Huawei switches to help you quickly understand the operating status and configuration information of the device, so as to better conduct network management and troubleshooting.

switches on the chasisImage Source: Pexels

1.  dis interface brief

  • Purpose: Used to quickly view the basic status of all interfaces of the switch. This is typically used for preliminary troubleshooting and interface management to help understand which interfaces are active.
  • Function: Display brief information of all interfaces on the switch.
  • Operation example: <Huawei> dis interface brief
  • Output content:
| Interface            | PHY    | Protocol | Description      |
|------------------   -|--------|----------|------------------|
| GigabitEthernet0/0/1 | up     | up       |                  |
| GigabitEthernet0/0/2 | down   | down     |                  |
| GigabitEthernet0/0/3 | up     | up       | Uplink to Router |
| Vlanif1              | up     | up       |                  |
  • Output Example:
| Interface | PHY  | Protocol | Description     |
|-----------|------|----------|-----------------|
| GE0/0/1   | up   | up       | -               |
| GE0/0/2   | down | down     | -               |
| GE0/0/3   | up   | up       | Uplink to Router|
| Vlanif1   | up   | up       | -               |

2.  display interface?

  • Purpose: Help users find a specific interface to further view its details. This command provides quick access to interface details.
  • Function: Display help information for specific interface types and names.
  • Operation example: <Huawei> display interface?
  • Output content: List all available interface types and names, for example:
| Ethernet          |
| GigabitEthernet   |
| Vlanif            |
  • Output Example
| Ethernet     | Ethernet interface            |
| GE           | GigabitEthernet interface     |
| 10GE         | 10GigabitEthernet interface   |
| Vlanif       | Vlan interface                |

3.  dis ip int brief

  • Purpose: Used to quickly view the IP address configuration and status of all interfaces of the switch to facilitate network management and troubleshooting.
  • Function: Display brief information of IP addresses of all interfaces.
  • Operation example: <Huawei> dis ip int brief
  • Output content:
| Interface | Interface name, such as Vlanif1                            |
| IP Address| IP address configured for the interface                    |
| PHY       | Physical status, the value can be up, down or admindown    |
| Protocol  | Protocol status, the value can be up or down               |
  • Output Example
| Interface | IP Address   | PHY  | Protocol |
|-----------|--------------|------|----------|
| Vlanif1   | 192.168.1.1  | up   | up       |
| GE0/0/1   | 192.168.2.1  | up   | up       |
| GE0/0/2   | unassigned   | down | down     |

4.  dis vlan

  • Purpose: Used to view the VLAN configuration on the switch and the port distribution of each VLAN, which facilitates VLAN management and network planning.
  • Function: Display the information of all VLANs configured on the current switch.
  • Operation example: <Huawei> dis vlan
  • Output content:
| VLAN ID | VLAN number, for example 1                       |
| Name    | VLAN name                                        |
| Status  | VLAN status, the value can be active or inactive |
| Ports   | VLAN member port list                            |
  • Output Example
| VLAN ID | Name        | Status   | Ports               |
|---------|-------------|----------|---------------------|
| 1       | default     | active   | GE0/0/1, GE0/0/2    |
| 10      | Sales       | active   | GE0/0/3, GE0/0/4    |
| 20      | Engineering | inactive | GE0/0/5             |

5.  display current-configuration

  • Purpose: Used to view the current switch configuration, help administrators understand the specific configuration of the switch, and facilitate configuration inspection and troubleshooting.
  • Function: Display the current running configuration of the switch.
  • Operation example: <Huawei> display current-configuration
  • Output content: Complete current configuration content, including interface configuration, VLAN configuration, routing configuration, etc.
  • Output Example:
#
version 5.160 (S5700 V200R010C00)
#
sysname Switc
#
interface Vlanif1
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
description Uplink to Router
switchport mode access
switchport mode access
#

Buy High-Quality Huawei Switches @Router-switch.com

6.  display device

  • Purpose: Used to view basic information of the device and help administrators manage and maintain the device.
  • Function: Display basic information of the switch device.
  • Operation example: <Huawei> display device
  • Output content:
| Device Name            | device name                        |
| Device Type            | Device model, such as S5700-52P-PWR-LI |
| Device Serial Number   | serial number                      |
| Hardware Version       | Hardware version                   |
| Software Version       | software version                   |
  • Output Example
| Device Name       | Huawei S5700-52P-PWR-LI          |
| Device Type       | S5700-52P-PWR-LI                 |
| Device Serial No  | 210235A0PWR0B000001              |
| Hardware Version  | Ver.B                            |
| Software Version  | 5.160 (S5700 V200R010C00)        |
  • Instructions: Users can use this command to view the hardware information of each component of the device and the device registration status to confirm whether the device can work normally.You can also use this command to check the power supply status of the current device from the battery or redundancy power system (RPS).
  • Devices currently supporting RPS include:

            –  Huawei S5700S-LI Series: all supported.

            –  Huawei S5710-X-LI Series: all supported.

            –  Huawei S6720LI Series: all supported.

            –  Huawei S6720S-LI Series: all supported.

Other series are only supported by some models.(Read S1720, S2700, S5700, S6720 V200R011C10 Commans References for additional information.)

7.  display cpu-usage

  • Purpose: Used to monitor the CPU load of the switch to facilitate performance management and problem diagnosis. High CPU usage may indicate that the device is overloaded or that some process is abnormal.
  • Function: Display the CPU usage of the switch.
  • Operation example: <Huawei> display cpu-usage
  • Output content:
| Current CPU Usage   | Current CPU usage                    |
| Average CPU Usage   | Historical CPU usage (if available)  |
  • Output Example: 
| CPU Usage         | 20%   |
| Last 1 minute     | 15%   |
| Last 5 minutes    | 18%   |
| Last 15 minutes   | 20%   |

8. display memory

  • Purpose: Used to monitor the memory usage of the switch to facilitate performance management and problem diagnosis. Insufficient memory may affect the normal operation of the device.
  • Function: Display the memory usage of the switch.
  • Operation example: <Huawei> display memory
  • Output content:
|Total Memory |total memory   |
|Used Memory  |used memory    |
|Free Memory  |available memory|
  • Output Example: 
| Total Memory  | 1024 MB|
| Used Memory   | 512 MB |
| Free Memory   | 512 MB |

9.  display version

  • Purpose: Used to view the version information of the switch, to help administrators understand the software and hardware versions of the device, and to facilitate version management and upgrades.
  • Function: Display the system version information of the switch.
  • Operation example: <Huawei> display version
  • Output content:
| Software Version     | software version     |
| Hardware Version     | Hardware version     |
| BootROM Version      | BootROM version      |
| System Started At    | system startup time  |
  • Output Example: 
| Software            | Huawei Versatile Routing Platform Software |
| Software Version    | VRP (R) software, Version 5.160 (S5700 V200R010C00) |
| Copyright           | (C) 2012-2019 Huawei Technologies Co., Ltd.|
| BootROM Version     | 5.12                                       |
| System started at   | 2019-01-01 12:00:00                        |

Conclusion

9 query commands for Huawei switches

1dis interface briefCheck the port status of the switch
2display interface ?View port details
3dis ip int briefDisplay the IP address and usage status
4dis vlancorresponding to the virtual interface
5display current configurationDisplays the configuration details currently running on the switch
6display deviceShow device status
7Display cpu-usageCheck switch cpu usage
8Display memoryCheck switch cpu usage
9display versionCheck the switch model and firmware version

By mastering the above nine query commands, you can fully understand key data such as the operating status, interface configuration, VLAN information, CPU and memory usage of Huawei switches. This information not only helps with daily network maintenance and management, but also provides timely diagnostic evidence when a fault occurs. As a network administrator, proficient use of these instructions will greatly improve your work efficiency and ensure the stable and efficient operation of the network. If you have more questions about certain instructions or need further detailed guidance, please feel free to contact technical support or consult Huawei’s official documentation. Let’s work together to create a more reliable and secure online environment.

If you have more questions about certain query or need to purchase Huawei switches, welcome to visit Router-switch.com. We provide cost-effective Huawei switches and reliable services. We have more than 22 years of experience in the industry and are committed to providing customers with high-quality network equipment and professional technical support. Let’s work together to create a more reliable and secure online environment.

Share This Post

Post Comment