MIB Example
- Connecting the NMS to a Switch
- MIB Loading
- Common MIB Objects
- Example for Managing Configuration Files Using the MIB
- Example for Updating a Device Using the MIB
- MIB Query and Configuration Cases
- Querying and Configuring Device Physical Information
- Querying the CPU Usage
- Querying the Memory Usage
- Querying the Temperature
- Querying the Rated Power of Power Supplies
- Querying Power Consumption of a Device
- Querying the SN
- Querying Information About Optical Modules
- Querying the Electronic Label
- Querying the Voltage
- Querying the Fan Status
- Configuring the System Energy-Saving Mode
- Configuring the Interval for Collecting Power Consumption Data
- Querying the Active/Standby Switchover Configuration
- Querying Interface Information
- Querying VLAN Information
- Querying MAC Address Table
- Querying STP Information
- Querying IP Address Information
- Querying the Total Number of IP Routes of Routing Protocols
- BFD Information Query
- VRRP Information Query
- Querying QoS Information
- Querying the Diff-Serv Profile and Its Application
- Querying Mapping Relationships in a Diff-Serv Profile on the Inbound Interface
- Querying Mapping Relationships in a Diff-Serv Profile on the Outbound Interface
- Querying Queue Statistics on an Interface
- Querying the Traffic Classifier
- Querying the Traffic Policing Configuration
- Querying LLDP Information
- Querying NQA Information
- Querying RMON Information
- Querying and Configuring Device Physical Information
Connecting the NMS to a Switch
Context
Before configuring a switch through MIB, ensure that the NMS has connected to the switch.
The NMS communicates with a switch through SNMP, including SNMPv1, SNMPv2c, and SNMPv3. To ensure security, it is recommended that you choose SNMPv3.
SNMPv1 and SNMPv2c authenticate users through community names, and their configurations are similar. SNMPv3 authenticates users through user names and passwords, so it has high security. In this example, the MG-SOFT MIB Browser is used as the NMS.
Pre-configuration Tasks
The SNMP agent has been configured on the switch. For the configuration procedure, see SNMP Configuration in the S12700 and S12700E V200R019C10 Configuration Guide - Network Management and Monitoring.
Procedure
- Run the MG-SOFT MIB Browser. On the Query tab page, enter the IP address of the SNMP agent, that is, IP address of the switch.Figure 3-1 Query tab page
- Click
on the Query tab page. The SNMP Protocol Preferences dialog box is displayed.
- In the SNMP Protocol Preferences dialog box shown in Figure 3-2, set SNMP parameters. Use SNMPv3 as an example.
The SNMP parameters must be the same as those on the switch; otherwise, configuration will fail.
- When the following information is displayed in the Query results area, the MIB Browser has connected to the switch. Then you can configure the switch through the MIB Browser.Figure 3-5 Verifying the connection
- (Optional) Configure the switch to proactively send traps to the NMS.
Configure the MG-SOFT MIB Browser. Click View and choose MIB Browser Preferences. Click the Trap Ringer tab, and click Add to configure the UDP port of the MG-SOFT MIB Browser for receiving traps from the switch. After completing the configuration, click OK.
Figure 3-6 Configuring the UDP port of the MG-SOFT MIB Browser for receiving traps from the switchConfigure the switch.
<HUAWEI> system-view [HUAWEI] snmp-agent sys-info version v2c //In this example, the switch sends traps to the NMS through SNMPv2c. [HUAWEI] snmp-agent target-host trap address udp-domain 10.137.217.168 udp-port 163 params securityname cipher huawei v2c //Configure the destination IP address and UDP port for receiving traps from the switch. The UDP port must be the same as that configured on the NMS. [HUAWEI] snmp-agent trap enable //Enable the switch to send traps. Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
- After the configuration is complete, the switch will send traps to the MG-SOFT MIB Browser when traps are generated on the switch. The MG-SOFT MIB Browser automatically displays the SNMP Trap Ringer Console window. You can click a trap to view the trap details. As shown in Figure 3-7, enterprise.2011.5.25.191.3.1 indicates the trap OID, where enterprise represents 1.3.6.1.4.1. Therefore, the OID of the first trap is 1.3.6.1.4.1.2011.5.25.191.3.1, based on which you can query trap details.
Follow-up Procedure
The MIB Browser may not contain all the MIB objects that you want to operate. You can load the MIB file to address this problem. To load the MIB file, see MIB Loading.
Related Content
Videos
MIB Loading
The MIB loading fall into: loading of single MIB file and loading of multiple MIB files. Take the MIB loading by MG-SOFT MIB Browser as an example.
To obtain the MIB files:
- Visit http://support.huawei.com/enterprise.
- Enter the product model in the search box, for example, S12700, and select Switches>>Campus Switch>>S12700 from the associated results. The corresponding product page is displayed.
- Click Software Download and select the corresponding version from the Select Version drop-down list box.
- Click a version under Version and Patch. The software download page is displayed.
- Obtain the MIB file MIB-XXXX.zip.
Loading of a Single MIB File
Run MG-SOFT MIB Browser, and click Run MG-SOFT MIB Compiler in the MIB Browser window.
Figure 3-8 MIB Browser windowClick Compile MIB file in the MIB Compiler window to choose the MIB compilation function.
Figure 3-9 MIB compilation windowSelect the MIB file to be compiled.
Compile the MIB file.
After the MIB file to be compiled is selected, click Open to start compilation. Figure 3-10 shows the message displayed after the compilation succeeds.
Save the compiled MIB file. The MIB file will be saved to the default path.
Figure 3-11 Saving the MIB fileLoad the MIB file.
Click the MIB tab. On the MIB Modules tab, select the MIB file to be loaded, right-click, and choose Load from the shortcut menu.
Figure 3-12 Loading the MIB fileIn the Loaded MIB modules window, view the loaded MIB file.
Figure 3-13 Successfully loaded MIB file
Loading of MIB Files in Batches
Run MG-SOFT MIB Browser, and click Run MG-SOFT MIB Compiler in the MIB Browser window.
Figure 3-14 MIB Browser windowIn the MIB Compiler window, click the Compile multiple MIB files button and select the batch MIB compilation function.
Figure 3-15 Batch MIB compilation windowSelect the MIB file to be compiled in batches.
Figure 3-16 Selecting the MIB file to be compiled in batchesCompile MIB files.
Select the directory where the MIB files to be compiled in batches and click OK to start batch MIB file compilation.
Save the compiled MIB files. The MIB files will be saved to the default path.
Load the MIB files.
Click the MIB tab. On the MIB Modules tab, select the MIB file to be loaded, right-click, and choose Load from the shortcut menu.
Figure 3-17 Loading MIB files in batchesIn the Loaded MIB modules window, view the loaded MIB files.
Figure 3-18 Successfully loaded MIB files
Common MIB Objects
This section describes common MIB objects.
Object |
OID |
Description |
MIB |
---|---|---|---|
hwEntityCpuUsage |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5 |
This object indicates the entity CPU usage. The value is in the range of 2 to 100. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityMemUsage |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.7 |
This object indicates the entity memory usage. The value is in the range of 0 to 100. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityMemSize |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.9 |
This object indicates the entity memory size, in bytes. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityTemperature |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.11 |
This object indicates the highest entity temperature displayed in the sensor, in °C. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityOpticalTemperature |
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.5 |
This object indicates the optical module temperature, in °C. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityOpticalVoltage |
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.6 |
This object indicates the optical module voltage, in mV. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityOpticalBiasCurrent |
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.7 |
This object indicates the optical module bias current, in uA. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityOpticalRxPower |
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.8 |
This object indicates the receive power of the optical module, in uW. uW = (10^(dBM/10))*1000 In the corresponding MIB file, This object unit is dBm. |
HUAWEI-ENTITY-EXTENT-MIB |
hwEntityOpticalTxPower |
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.9 |
This object indicates the transmit power of the optical module, in uW. In the corresponding MIB file, This object unit is dBm. |
HUAWEI-ENTITY-EXTENT-MIB |
Object |
OID |
Description |
MIB |
---|---|---|---|
ifTable |
1.3.6.1.2.1.2.2.1 |
This object indicates the statistics on packets received and sent on the interface. |
IF-MIB |
ifOperStatus |
1.3.6.1.2.1.2.2.1.8 |
This object indicates the interface status. |
IF-MIB |
hwIfMonitorInputRate |
1.3.6.1.4.1.2011.5.25.41.1.7.1.1.8 |
This object indicates the inbound bandwidth usage. |
HUAWEI-IF-EXT-MIB |
hwIfMonitorOutputRate |
1.3.6.1.4.1.2011.5.25.41.1.7.1.1.10 |
This object indicates the outbound bandwidth usage. |
HUAWEI-IF-EXT-MIB |
Object |
OID |
Description |
MIB |
---|---|---|---|
dot1dTpFdbAddress |
1.3.6.1.2.1.17.4.3.1.1 |
This object is used to obtain all MAC address entries. |
BRIDGE-MIB |
hwDynFdbMac |
1.3.6.1.4.1.2011.5.25.42.2.1.3.1.1 |
This object is used to manage dynamic MAC address entries on the device. |
HUAWEI-L2MAM-MIB |
hwCfgFdbMac |
1.3.6.1.4.1.2011.5.25.42.2.1.2.1.1 |
This object is used to configure a VLAN-based, VSI-based, or global blackhole-based MAC address table. |
HUAWEI-L2MAM-MIB |
hwArpDynTable |
1.3.6.1.4.1.2011.5.25.123.1.17.1 |
This object is used to obtain dynamic ARP entries. |
HUAWEI-ETHARP-MIB |
hwArpCfgTable |
1.3.6.1.4.1.2011.5.25.123.1.18.1 |
This object is used to configure and query static ARP entries. |
HUAWEI-ETHARP-MIB |
Object |
OID |
Description |
MIB |
---|---|---|---|
lldpRemTable |
1.0.8802.1.1.2.1.4.1.1 |
This object indicates LLDP neighbor information. |
LLDP-MIB NOTE:
To access this object, you
must first run the snmp-agent mib-view included iso-view iso command. By default, the NMS can only access internet objects (OID:
1.3.6.1). However, the OID Of LLDP MIB is 1.0.8802.1.1.2, which is
not an internet object. |
dot1dStpPortState |
1.3.6.1.2.1.17.2.15.1.3 |
This object indicates the STP status of the interface:
|
BRIDGE-MIB |
hwRrppRingState |
1.3.6.1.4.1.2011.5.25.113.2.2.1.4 |
The value of this object identifies the status of the ring. Currently, the supported values are as follows:
|
HUAWEI-RRPP-MIB |
vrrpOperState |
1.3.6.1.2.1.68.1.3.1.3 |
This object indicates the virtual router status:
|
VRRP-MIB |
Example for Managing Configuration Files Using the MIB
Background
The management information base (MIB) can be used to back up configuration files of a device. When the device becomes faulty, you can use the backup configuration files to restore the device configuration.
The following MIB objects are used for backing up configuration files and restoring the device configuration:
Object |
OID |
MIB File |
---|---|---|
hwCfgOperateEntry |
1.3.6.1.4.1.2011.6.10.1.2.4.1 |
HUAWEI-CONFIG-MAN-MIB |
hwSysReboot |
1.3.6.1.4.1.2011.5.25.19.1.3.4 |
HUAWEI-SYS-MAN-MIB |
This example uses the MIB browser as the NMS software to illustrate the operations. If you use other NMS software, refer to documentation of the specified software.
Pre-configuration Tasks
Before managing configuration files using the MIB, complete the following tasks.
- Connecting the device to the NMS through Simple Network Management Protocol (SNMP)
- Setting parameters for the MIB browser and connecting it to the device
- Compiling MIB files using the MIB Compiler and loading the MIB files
- Configuring a file server to save the backup configuration files and ensuring that the device has reachable routes to the file server (In this example, the FTP server is used as the file server.)
Procedure
Backing Up Configuration Files Using the MIB
Search for the MIB object hwCfgOperateEntry. You can search for an object in the MIB tree. However, it is difficult to find an object when a large number of MIB files are imported to the MIB browser. In this case, press Ctrl+F. See Figure 3-19.
- Set parameters for the MIB object. hwCfgOperateEntry is a table object. Before setting parameters for the MIB object, you must perform multiple variable bindings. The detailed operations are as follows:
- Create a table instance.Figure 3-20 Creating a table instance
- Specify the table instance ID, for example, 1. When specifying
an instance ID, ensure that the instance ID is not used by other instances.Figure 3-21 Specifying the table instance ID
Delete unnecessary subnodes from the table and set values for the remaining subnodes. After the operations are complete, the operation interface shown in Figure 3-22 is displayed. Change the item marked by an arrow to Set.
To delete or set a subnode, right-click the subnode and select an operation from the displayed shortcut menu.
- Create a table instance.
- After setting parameters for the MIB object, click Set and upload the configuration file vrpcfg.zip to the FTP server. Check whether the configuration file vrpcfg.zip exists in the working directory of the FTP server. If so, the backup succeeds; otherwise, repeat the preceding steps.
Restoring Configuration Files Using the MIB
- Download the configuration file to the device and specify it as
the configuration file for next startup. You can complete this operation
using hwCfgOperateEntry. To distinguish the backup configuration file
from the original one, rename the backup configuration file to vrpcfg1.zip.
- Perform multiple variable bindings. Create a table instance and specify the instance ID. The operations are similar to those in Backing Up Configuration Files Using the MIB.
- Set parameters for the table instance. After the operations are complete, the operation interface shown in Figure 3-23 is displayed.
- Click Set, download the backup configuration file to the device, and specify it as the configuration file for next startup.
- Restart the device using the MIB object hwSysReboot.
- Search for the object hwSysReboot. You can search for the object in the MIB tree or press Ctrl+F.
- Enter the single node setting interface. hwSysReboot is a single
node object. Right-click the object and select Set from the
displayed shortcut menu.Figure 3-24 Entering the single node setting interface
- Set the restart range.In the dialog box that is displayed, set the restart range to rebootWholeRoute(2), indicating that all the MPUs or devices are restarted. The detailed operations are shown in Figure 3-25.
The numbers 1, 2, and 3 in this figure indicates the sequence in which operations are performed.
- After the configurations are complete, click
in the upper left corner of the dialog box.
- Verify the configuration. After the device restarts, run the display startup command on the device to check whether the backup
configuration file is used as the startup file.
<HUAWEI> display startup MainBoard: Configured startup system software: flash:/HUAWEIv200r010.cc Startup system software: flash:/HUAWEIv200r010.cc Next startup system software: flash:/HUAWEIv200r010.cc Startup saved-configuration file: flash:/vrpcfg1.zip Next startup saved-configuration file: flash:/vrpcfg1.zip Startup paf file: default Next startup paf file: default Startup license file: default Next startup license file: default Startup patch package: NULL Next startup patch package: NULL
Example for Updating a Device Using the MIB
Background
You can use the MIB to update a device remotely.
Object |
OID |
MIB File |
---|---|---|
huaweiFlhOpEntry |
1.3.6.1.4.1.2011.6.9.1.2.1.1 |
HUAWEI-FLASH-MAN-MIB |
hwSysImageName |
1.3.6.1.4.1.2011.5.25.19.1.4.2.1.2 |
HUAWEI-SYS-MAN-MIB |
hwSysReloadScheduleEntry |
1.3.6.1.4.1.2011.5.25.19.1.3.3.1 |
|
hwSysReboot |
1.3.6.1.4.1.2011.5.25.19.1.3.4 |
|
sysDescr |
1.3.6.1.2.1.1.1 |
SNMPv2-MIB |
This example uses the MIB browser as the NMS software to illustrate the operations. If you use other NMS software, refer to documentation of the specified software.
Pre-configuration Tasks
Before updating a device using the MIB, complete the following tasks.
- Connecting the device to the NMS through Simple Network Management Protocol (SNMP)
- Setting parameters for the MIB browser and connecting it to the device
- Compiling MIB files using the MIB Compiler and loading the MIB files
- Configuring a file server to save the system software for device upgrade and ensuring that the device has reachable routes to the file server (In this example, the FTP server is used as the file server, and the system software HUAWEIv200r005.cc has been stored in the working directory of the file server.)
- Ensuring that the storage space of the device is sufficient for storing the system software (If the storage space is insufficient, the upgrade will fail.)
Procedure
Upload the system software to the device.
You can complete software upload using huaweiFlhOpEntry and the detailed operations are as follows:
- Search for the MIB object huaweiFlhOpEntry. You can search for an object in the MIB tree. However, it is difficult to find an object when a large number of MIB files are imported to the MIB browser. In this case, press Ctrl+F to search for the MIB object. See Figure 3-26.
- Perform multiple variable bindings. Create a table instance first.Figure 3-27 Creating a table instance
- Specify the table instance ID, for example, 1. When specifying
an instance ID, ensure that the instance ID is not used by other instances.Figure 3-28 Specifying the table instance ID
- Delete unnecessary subnodes from the table and set values for
the remaining subnodes. After the operations are complete, the operation
interface shown in Figure 3-29 is displayed.
To delete or set a subnode, right-click the subnode and select an operation from the displayed shortcut menu.
- After setting the table instance, change Get to Set and click Set to upload the system software HUAWEIv200r005c00.cc.
Check the operating status using hwFlhOperStatus. Right-click hwFlhOperStatus and select Walk, as shown in Figure 3-30.
If the operating status is displayed as
, the system software is successfully uploaded.
Set the startup file.
After the system software is uploaded to the device, you must specify the system software as the next startup file. This operation can be performed using hwSysReloadScheduleEntry in the HUAWEI-SYS-MAN-MIB file, and the details are as follows:
- Search for the object hwSysReloadScheduleEntry. You can search for the object in the MIB tree or press Ctrl+F.
Perform multiple variable bindings. Create a table instance and specify the instance ID. Delete unnecessary subnodes from the table and set values for the remaining subnodes. The detailed operations are similar to those of huaweiFlhOpEntry. After the operations are complete, the operation interface shown in Figure 3-31 is displayed.
You can query the value of hwSysReloadImage using the hwSysImageName subnode of hwSysImageTable. Right-click hwSysImageName and select Walk as shown in Figure 3-32 to query the index of the system software.When hwSysReloadOperateDestType is set to all, the device will automatically copy the system software if the device to be updated supports dual MPUs or is a cluster.
Figure 3-33 shows the query result.- After setting parameters for the table instance, change Get to Set.
- Click Set and check the result using hwSysReloadImage.
Right-click hwSysReloadImage and select Walk. If the result
shown in
is displayed, the system software for next startup is changed to HUAWEIv200r005c00.cc.
Restart the device.
Restart the device to make the startup file take effect. You can restart the device to complete the upgrade using hwSysReboot.- Search for the object hwSysReboot. You can search for the object in the MIB tree or press Ctrl+F.
- Enter the single node setting interface. hwSysReboot is a single
node object. Right-click the object and select Set from the
displayed shortcut menu.Figure 3-34 Entering the single node setting interface
- Set the restart range.In the dialog box that is displayed, set the restart range to rebootWholeRoute(2), indicating that all the MPUs or devices are restarted. The detailed operations are shown in Figure 3-35.
The numbers 1, 2, and 3 in this figure indicates the sequence in which operations are performed.
After the configurations are complete, click
in the upper left corner of the dialog box.
- Verify the configuration. After the device is restarted, check
the device version using sysDescr to see whether the upgrade succeeds.
- Search for the object sysDescr. You can search for the object in the MIB tree or press Ctrl+F.
Right-click sysDescr and select Walk.
Figure 3-36 Querying the device versionThe result shown in Figure 3-37 indicates that the upgrade succeeds.
MIB Query and Configuration Cases
Querying and Configuring Device Physical Information
Querying the CPU Usage
The table hwEntityStateTable describes the status of the device, including the status of management, operation, and backup, CPU usage and threshold, and memory usage and threshold. This topic describes how to query CPU usage of all components based on hwEntityCpuUsage in hwEntityStateTable and CPU usage of a specified component based on its entPhysicalIndex.
Object |
OID |
---|---|
entPhysicalIndex |
1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityCpuUsage |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5 |
Query the component index entPhysicalIndex based on entPhysicalName. As shown in Figure 3-38, the index of the target component is 70778889.
Query the CPU usage in hwEntityCpuUsage based on entPhysicalIndex. As shown in Figure 3-39, CPU usage of the component with entPhysicalIndex 70778889 is 11%.
Querying the Memory Usage
This topic describes how to query memory usage of all components based on hwEntityMemUsage in hwEntityStateTable and memory usage of a specified component based on its entPhysicalIndex.
Object |
OID |
---|---|
entPhysicalIndex |
1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityMemUsage |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.7 |
Query entPhysicalIndex based on entPhysicalName. As shown in Figure 3-40, the index of the target component is 70778889.
Query the memory usage in hwEntityMemUsage based on entPhysicalIndex. As shown in Figure 3-41, the memory usage of the component with entPhysicalIndex of 70778889 is 26%.
Querying the Temperature
This topic describes how to query the temperature of all components based on hwEntityTemperature in hwEntityStateTable and the temperature of a specified component based on entPhysicalIndex.
Object |
OID |
---|---|
entPhysicalIndex |
1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityTemperature |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.11 |
Query entPhysicalIndex based on entPhysicalName. As shown in Figure 3-42, the index of the target component is 70778889.
Query the temperature in hwEntityTemperature based on entPhysicalIndex. As shown in Figure 3-43, the temperature of the component with entPhysicalIndex of 70778889 is 43°C.
Querying the Rated Power of Power Supplies
The hwBoardPowerMngtTable table describes power information about the device and power supplies. You can obtain the rated power of all boards and power supplies through hwBoardRatedPower in the hwBoardPowerMngtTable table.
Object |
OID |
---|---|
hwBoardIndex |
1.3.6.1.4.1.2011.6.157.2.1.1.1 |
hwBoardName |
1.3.6.1.4.1.2011.6.157.2.1.1.3 |
hwBoardRatedPower |
1.3.6.1.4.1.2011.6.157.2.1.1.5 |
Query hwBoardIndex based on hwBoardName. As shown in Figure 3-44, the index of the target power module is 4294902037.
Query the rated power of the power module in hwBoardRatedPower based on hwBoardIndex. As shown in Figure 3-45, the rated power on the power module with hwBoardIndex 4294902037 is 800,000 mW.
Querying Power Consumption of a Device
The objects hwPowerConsumption, hwAveragePower, hwRatedPower, and hwCurrentPower respectively describe the historical power consumption, average power, rated power, power threshold, and current power of the device.
Object |
OID |
---|---|
hwPowerConsumption |
1.3.6.1.4.1.2011.6.157.1.1 |
hwAveragePower |
1.3.6.1.4.1.2011.6.157.1.3 |
hwRatedPower |
1.3.6.1.4.1.2011.6.157.1.4 |
hwThresholdOfPower |
1.3.6.1.4.1.2011.6.157.1.5 |
hwCurrentPower |
1.3.6.1.4.1.2011.6.157.1.6 |
Querying the SN
This topic describes how to query the serial numbers (SNs) of all components based on entPhysicalSerialNum in entPhysicalTable and the SN of a specified component based on entPhysicalIndex.
Object |
OID |
---|---|
entPhysicalIndex |
1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
1.3.6.1.2.1.47.1.1.1.1.7 |
entPhysicalSerialNum |
1.3.6.1.2.1.47.1.1.1.1.11 |
Query entPhysicalIndex based on entPhysicalName. As shown in Figure 3-47, the index of the target component is 70778889.
Query the SN in entPhysicalSerialNum based on entPhysicalIndex. As shown in Figure 3-48, the SN of the component with entPhysicalIndex of 70778889 is 030MQS10AB000015.
Querying Information About Optical Modules
The table hwOpticalModuleInfoTable provides basic information about optical modules, including temperature, voltage, receive power, and transmit power.
Object |
Description |
OID |
---|---|---|
entPhysicalIndex |
Indicates the index of the physical entity. | 1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
Indicates the name of the physical entity. | 1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityOpticalVendorSn |
The vendor serial number of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.4 |
hwEntityOpticalTemperature |
The temperature of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.5 |
hwEntityOpticalVoltage |
The voltage of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.6 |
hwEntityOpticalBiasCurrent |
The bias current of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.7 |
hwEntityOpticalRxPower |
The receive power of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.8 |
hwEntityOpticalTxPower |
The transmit power of the optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.9 |
hwEntityOpticalVenderPn |
This object indicates the PN of an optical module. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.25 |
hwEntityOpticalLaneBiasCurrent |
This object indicates the optical module bias current of multiple fibers. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.31 |
hwEntityOpticalLaneRxPower |
This object indicates the optical module input power of multiple fibers. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.32 |
hwEntityOpticalLaneTxPower |
This object indicates the optical module transmit power of multiple fibers. | 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.33 |
Query entPhysicalIndex based on entPhysicalName. As shown in Figure 3-49, the index of interface XGE5/0/3 is 68632782.
Query the vendor SN and receive power based on entPhysicalIndex. As shown in Figure 3-50, the vendor SN of the optical module with entPhysicalIndex of 68632782 is A0309077778.
Querying the Electronic Label
The table hwRUModuleInfoTable describes the electronic labels of components, including the component model, part number, and production date.
Object |
Description |
OID |
---|---|---|
entPhysicalIndex |
Indicates the index of the physical entity. | 1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
Indicates the name of the physical entity. | 1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityBomId |
BOM ID used to identify the entity. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.1 |
hwEntityBomEnDesc |
Description of the BOM in English. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.2 |
hwEntityManufacturedDate |
Production date of the entity. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.4 |
hwEntityCLEICode |
Common Language Equipment Identification (CLEI) code of the entity. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.6 |
hwEntityArchivesInfoVersion |
Archive information version of the entity. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.8 |
hwEntityOpenBomId |
Allocated BOM ID, which is different from the hwEntityBomID. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.9 |
hwEntityIssueNum |
Issue number of the hardware modification. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.10 |
hwEntityBoardType |
Board type of the entity. | 1.3.6.1.4.1.2011.5.25.31.1.1.2.1.11 |
Query entPhysicalIndex based on entPhysicalName. As shown in Figure 3-51, the index of the target component is 70778889.
Query the part number and production date based on entPhysicalIndex. As shown in Figure 3-52, the part number of the component with entPhysicalIndex of 70778889 is 03030MQS.
Querying the Voltage
You can obtain voltage information about all components through hwEntityVoltage in hwEntityStateTable and obtain voltage information about a specified component through entPhysicalIndex.
Object |
OID |
---|---|
entPhysicalIndex |
1.3.6.1.2.1.47.1.1.1.1.1 |
entPhysicalName |
1.3.6.1.2.1.47.1.1.1.1.7 |
hwEntityVoltage |
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.13 |
Query component index entPhysicalIndex based on entPhysicalName. As shown in Figure 3-53, the index of the board in slot 14 is 70778889.
Query the voltage in hwEntityVoltage based on entPhysicalIndex. As shown in Figure 3-54, the voltage of the board with entPhysicalIndex 70778889 is 3371 mV.
Querying the Fan Status
You can obtain the status of all fans through hwEntityFanState in hwFanStatusTable.
Object |
OID |
---|---|
hwEntityFanState |
1.3.6.1.4.1.2011.5.25.31.1.1.10.1.7 |
Query the fan status through hwEntityFanState. As shown in Figure 3-55, the status of the fan is normal, that is, the fan is operating normally. In the index, the first digit indicates the fan slot serial number that starts from 30 and increases by 1 for the next fan. For example, the serial number of the first fan is 30, and that of the second fan is 31. The second digit indicates the number of the fan in a fan tray.
Configuring the System Energy-Saving Mode
You can query and set the system energy-saving mode through hwEnergySavingMode.
Object |
OID |
---|---|
hwEnergySavingMode |
1.3.6.1.4.1.2011.6.157.3.1 |
Figure 3-56 shows how to configure the system energy-saving mode. Currently, userDefined(1) is not supported.
Configuring the Interval for Collecting Power Consumption Data
You can query and set the interval for collecting power consumption data through hwPowerStatPeriod.
Object |
OID |
---|---|
hwPowerStatPeriod |
1.3.6.1.4.1.2011.6.157.1.2 |
Figure 3-57 shows how to configure the interval for collecting power consumption data.
Querying the Active/Standby Switchover Configuration
hwSysSlaveSwitchTable describes the active/standby switchover configuration, including the chassis ID, operation type, and whether the active/standby switchover is enabled. hwSysSlaveSwitchEnableStatus indicates whether the active/standby switchover is enabled on a device.
Object |
Description |
OID |
---|---|---|
hwSysSlaveSwitchIndex |
Indicates the index. |
1.3.6.1.4.1.2011.5.25.19.1.3.7.1.1 |
hwSysSlaveSwitchChassisNum |
Indicates the chassis ID. |
1.3.6.1.4.1.2011.5.25.19.1.3.7.1.2 |
hwSysSlaveSwitchOperType |
Indicates an operation type:
|
1.3.6.1.4.1.2011.5.25.19.1.3.7.1.3 |
hwSysSlaveSwitchEnableStatus |
This object indicates whether the active/standby switchover
is enabled:
|
1.3.6.1.4.1.2011.5.25.19.1.3.7.1.4 |
Querying Interface Information
The table ifTable contains interface entries. The number of entries depends on the value of ifNumber (OID: 1.3.6.1.2.1.2.1). Each entry provides management information for one interface. The index of ifTable is ifIndex.
This topic describes how to query the mapping between interfaces and indexes in ifDescr. The indexes allow you to query information about interfaces such as XGE, 40GE, 100GE, Eth-Trunk, loopback, and VLANIF interfaces.
Object |
Description |
OID |
---|---|---|
ifIndex |
This object indicates an interface index. |
1.3.6.1.2.1.2.2.1.1 |
ifDescr |
This object indicates the interface description and provides the mapping between the interface and index. |
1.3.6.1.2.1.2.2.1.2 |
ifMtu |
This object indicates the maximum transmission unit (MTU), in bytes. |
1.3.6.1.2.1.2.2.1.4 |
ifSpeed |
This object indicates the estimated interface bandwidth, in bit/s. If the bandwidth is fixed or cannot be estimated on an interface, the value is the rated bandwidth. If the interface bandwidth is higher than the maximum value of ifSpeed, the maximum value of the entry (4,294,967,295) becomes the maximum value of the interface bandwidth and the interface rate is the value of ifHighSpeed (OID:1.3.6.1.2.1.31.1.1.1.15, in Mbit/s) in ifXTable. The value of this object is zero for subinterfaces. |
1.3.6.1.2.1.2.2.1.5 |
ifPhysAddress |
This object indicates the interface address of the protocol sublayer. For an 802.1X interface, this object is a MAC address. |
1.3.6.1.2.1.2.2.1.6 |
ifAdminStatus |
This object indicates the expected physical status of an interface. During system initialization, all interfaces start in Down (2) state. After operations or configurations, the interfaces enter the Up (1) or Testing (3) state or remain in Down (2) state. An interface in Testing (3) state cannot forward running packets. |
1.3.6.1.2.1.2.2.1.7 |
ifOperStatus |
This object indicates the current configuration status of an interface.
|
1.3.6.1.2.1.2.2.1.8 |
ifInOctets |
This object indicates the total bytes of incoming packets, including subframe data |
1.3.6.1.2.1.2.2.1.10 |
ifInUcastPkts |
This object indicates the number of unicast packets sent from the current sublayer to the upper-level sublayer. |
1.3.6.1.2.1.2.2.1.11 |
ifInDiscards |
This object indicates the number of dropped incoming packets. |
1.3.6.1.2.1.2.2.1.13 |
ifInErrors |
This object indicates the number of packets or MTUs that fail to be sent to the upper layer. |
1.3.6.1.2.1.2.2.1.14 |
ifInUnknownProtos |
This object indicates the number of packets or MTUs that are dropped due to unknown or unsupported protocols. If an interface does not support protocol multiplexing, the value of this object is 0. |
1.3.6.1.2.1.2.2.1.15 |
ifOutOctets |
This object indicates the total bytes of the outgoing packets, including subframe data. |
1.3.6.1.2.1.2.2.1.16 |
ifOutUcastPkts |
This object indicates the number of unicast packets required by the upper-layer protocol, including unicast packets that are discarded and not forwarded. |
1.3.6.1.2.1.2.2.1.17 |
ifOutDiscards |
This object indicates the number of outgoing packets that are dropped even if no error occurs. A possible cause is that the buffer is released. |
1.3.6.1.2.1.2.2.1.19 |
ifOutErrors |
This object indicates the number of packets or MTUs that fail to be transmitted. |
1.3.6.1.2.1.2.2.1.20 |
The interface description configured using the description command cannot be queried using the object ifTable. If Link Layer Discovery Protocol (LLDP) is enabled, you can query the interface description based on lldpLocPortDesc (OID: 1.0.8802.1.1.2.1.3.7.1.4) in lldpLocPortTable of the LLDP MIB.
Querying Interface Status
This topic describes how to query whether an interface is Up or Down after obtaining the index of the interface based on ifDescr. Figure 3-59 is used as an example.
- The index of GE9/0/2 is 351.
- The index of GE9/0/3 is 352.
- The index of GE9/0/4 is 353.
After obtaining the mapping between the interface and index, query interface status based on ifAdminStatus and ifOperStatus, as shown in Figure 3-60 and Figure 3-61.
- GE9/0/2 with the index of 351: The expected physical status is Down, and its configuration status is Down, indicating that the shutdown command has been configured on the interface.
- GE9/0/3 with the index of 352: The expected physical status is Up, and its configuration status is Down, indicating that the shutdown command has not been configured on the interface. The actual physical status is Down due to some reasons. For example, no network cable is connected to the interface.
- GE9/0/4 with the index of 353: The expected physical status is Up, its configuration status is Up, and the shutdown command has not been configured on the interface. Therefore, the actual physical status is Up.
ifOperStatus specifies the physical status of a Layer 2 physical interface. When you want to query the protocol status of an interface, note the following:
The protocol status of a Layer 2 physical interface is the same as the current configuration status of the interface.
Querying Packet Statistics on an Interface
Before querying statistics about packets on an interface, obtain the index of the interface based on ifDescr. As shown in Figure 3-62, the index of GE9/0/1 is 350.
After obtaining the mapping between the interface and index, query the statistics about incoming packets and dropped incoming packets on the interface based on ifInOctets and ifInDiscards, as shown in Figure 3-63 and Figure 3-64. The interface GE9/0/1 with the index of 350 receives 304,635,051 bytes of packets, among which no packet is dropped.
Querying the MAC Address of an Interface
Before querying the MAC address of an interface, obtain the index of the interface based on ifDescr. As shown in Figure 3-65, the index of GE9/0/1 is 350.
After obtaining the mapping between the interface and index, query the MAC address of the interface based on ifPhysAddress. As shown in Figure 3-66, the MAC address of GE9/0/1 with the index of 350 is 00:E0:09:87:78:95.
You can obtain the MAC address of a VLANIF interface in a similar way, as shown in Figure 3-67. The index of VLANIF 100 is 70, and its MAC address is 00:E0:09:87:78:95.
Querying the Rate of an Interface
Before querying the rate of an interface, obtain the index of the interface based on ifDescr. Figure 3-68 is used as an example, and the index of GE9/0/4 is 353.
After obtaining the mapping between the interface and index, query the estimated rate of the interface based on ifSpeed. As shown in Figure 3-69, the rate of GE9/0/4 with the index of 353 is 100 Mbit/s. After the query using command lines, the interface is configured with the rate of 100 Mbit/s.
As shown in Figure 3-71, the ifSpeed value of XGE6/0/1 with the index of 6 is 4294967295, which exceeds the threshold. In this case, query the interface rate based on ifHighSpeed (OID: 1.3.6.1.2.1.31.1.1.1.15; unit: Mbit/s) in ifXTable. As shown in Figure 3-72, the rate of XGE6/0/1 with the index of 6 is 10,000 Mbit/s.
Querying the Minimum Number of Interfaces in Up State of a Trunk
hwTrunkIfTable describes some attributes of a trunk, including the index, ID, type, and minimum number of interfaces in Up state of a trunk. You can obtain the minimum number of interfaces in Up state of all trunks using hwTrunkIfMinLinkNum of hwTrunkIfTable, and query the minimum number of interfaces in Up state of a trunk using hwTrunkIfType, hwTrunkIfID, and hwTrunkIndex.
Object |
OID |
---|---|
hwTrunkIndex |
1.3.6.1.4.1.2011.5.25.41.1.3.3.1.1 |
hwTrunkIfID |
1.3.6.1.4.1.2011.5.25.41.1.3.3.1.2 |
hwTrunkIfType |
1.3.6.1.4.1.2011.5.25.41.1.3.3.1.3 |
hwTrunkIfMinLinkNum |
1.3.6.1.4.1.2011.5.25.41.1.3.3.1.7 |
- Query hwTrunkIndex based on hwTrunkIfType and hwTrunkIfID. As shown in Figure 3-73, the hwTrunkIndex of Eth-Trunk 10 is 1.
- Query the minimum number of interfaces in Up state of a trunk in hwTrunkIfMinLinkNum based on hwTrunkIndex. As shown in Figure 3-74, the minimum number of interfaces in Up state of the trunk with the hwTrunkIndex being 1 is 1.
Querying VLAN Information
Querying Created VLAN Information
hwL2VlanMIBTable describes created VLAN information on the device, including the VLAN description and information about interfaces in VLANs.
You can query created VLAN information on the device through hwL2VlanDescr.
Object |
Description |
OID |
---|---|---|
hwL2VlanDescr |
This object indicates the created VLAN on the device. |
1.3.6.1.4.1.2011.5.25.42.3.1.1.1.1.2 |
As shown in Figure 3-75, select hwL2VlanDescr and perform the Walk operation to query created VLAN information on the device.
For example, hwL2VlanDescr.2 (octet string) VLAN 0002 indicates that VLAN 2 has been created and the description of VLAN 2 is VLAN 0002. The following query result indicates that VLAN 1, VLAN 2, VLAN 3, VLAN 4, VLAN 10, and VLAN 11 have been created.
Querying Information About a VLAN and Interfaces in the VLAN
hwL2VlanMIBTable describes created VLAN information on the device, including the VLAN description and information about interfaces in VLANs.
You can query information about all interfaces added to a VLAN in tagged and untagged modes through hwL2VlanPortList, excluding the Eth-Trunk.
Object |
Description |
OID |
---|---|---|
hwL2VlanPortList |
This object indicates information about the interfaces that join VLANs in tagged and untagged modes. |
1.3.6.1.4.1.2011.5.25.42.3.1.1.1.1.3 |
To query information about the interfaces that join a VLAN, perform the following steps:
- As shown in Figure 3-76, select hwL2VlanPortList and perform the Walk operation to query
information about all created VLANs and interfaces that join the VLANs.The query result in red box is used as an example:
- In the first column, the value 2 in hwL2VlanPortList.2 (octet string) indicates information about all interfaces in VLAN 2.
- In the second column, 00.00.C0 is a set of indexes of interfaces in VLAN 2, which is displayed in hexadecimal notation. The value is converted into 00000000 00000000 11000000 in binary notation. The index starts from 0 in ascending order. The value 1 indicates that the corresponding interface joins VLAN 2. The query result indicates that interfaces 16 and 17 join VLAN 2.
Query the mapping between interface names and interface indexes.
hwL2IfTable describes information about Layer 2 interfaces. You can query the mapping between interface names and interface indexes through hwL2IfPortName.Table 3-8 Description of MIB objectsObject
Description
OID
hwL2IfPortName
This object indicates the interface name corresponding to the Layer 2 interface index.
1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.19
As shown in Figure 3-77, select hwL2IfPortName and perform the Walk operation to query the interface names corresponding to all Layer 2 interface indexes on the device.
The query result in red box is used as an example:
hwL2IfPortName.16 (octet string) GigabitEthernet6/1/4 indicates that interface with index 16 corresponds to GigabitEthernet6/1/4, that is, GigabitEthernet6/1/4 joins VLAN 2.
hwL2IfPortName.17 (octet string) GigabitEthernet6/1/5 indicates that interface with index 17 corresponds to GigabitEthernet6/1/5, that is, GigabitEthernet6/1/5 joins VLAN 2.
Querying MAC Address Table
Querying the Mapping Between MAC Addresses and Interfaces
dot1dTpFdbTable describes existing MAC address entries on the device. dot1dTpFdbAddress describes MAC addresses, and dot1dTpFdbPort describes the Layer 2 interface indexes corresponding to the MAC addresses.
dot1dBasePortIfIndex in dot1dBasePortTable describes the mapping between Layer 2 interface indexes and interface indexes, and ifName describes the mapping between interface indexes and interface names.
Layer 2 interface indexes are a set of numbers that identify Layer 2 interfaces, and interface indexes are a set of numbers that identify all interfaces including Layer 2 and Layer 3 interfaces.
Object |
Description |
OID |
---|---|---|
dot1dTpFdbAddress |
This object indicates the MAC address. |
1.3.6.1.2.1.17.4.3.1.1 |
dot1dTpFdbPort |
This object indicates the Layer 2 interface index corresponding to the MAC address. |
1.3.6.1.2.1.17.4.3.1.2 |
dot1dBasePortIfIndex |
This object indicates the interface index corresponding to the Layer 2 interface index. |
1.3.6.1.2.1.17.1.4.1.2 |
ifName |
This object indicates the interface name corresponding to the interface index. |
1.3.6.1.2.1.31.1.1.1.1 |
Query existing MAC address entries on the device using dot1dTpFdbAddress.
As shown in Figure 3-78, select dot1dTpFdbAddress and perform the Walk operation to query all MAC address entries on the device.
dot1dTpFdbAddress.172.133.61.166.164.32 indicates that there is the MAC address AC:85:3D:A6:A4:20. The value 172.133.61.166.164.32 is the MAC address AC:85:3D:A6:A4:20 in decimal notation.
Query the Layer 2 interface indexes corresponding to the MAC addresses through dot1dTpFdbPort.
As shown in Figure 3-79, select dot1dTpFdbPort and perform the Walk operation to query Layer 2 interface indexes corresponding to all MAC address entries on the device.
dot1dTpFdbPort.172.133.61.166.164.32 (integer) 11 indicates that the MAC address 172.133.61.166.164.32 corresponds to Layer interface index 11.
Query the interface indexes corresponding to the Layer 2 interface indexes through dot1dBasePortIfIndex.
As shown in Figure 3-80, select dot1dBasePortIfIndex and perform the Walk operation to query the interface indexes corresponding to all Layer 2 interface indexes on the device.
dot1dBasePortIfIndex.11 (integer) 152 indicates that Layer 2 interface index 11 corresponds to interface index 152.
Query the interface names corresponding to the interface indexes through ifName.
As shown in Figure 3-81, select ifName and perform the Walk operation to query the interface names corresponding to all interface indexes on the device.
ifName.152 (octet string) XGigabitEthernet6/0/3 indicates that interface index 11 corresponds to XGigabitEthernet6/0/3, that is, the MAC address AC:85:3D:A6:A4:20 corresponds to the outbound interface XGigabitEthernet6/0/3.
Querying Dynamic MAC Addresses Based on Specified Conditions
hwDynMacAddrQueryTable in the Huawei-specific MIB HUAWEI-L2MAM-MIB allows users to query dynamic MAC address entries on switches based on specified conditions. The first 11 objects are table indexes, and the remaining objects specify information about a MAC address table in hwDynMacAddrQueryTable.
Table 3-10 describes the rules for setting the values in hwDynMacAddrQueryConditionMode.
hwDynMacAddrQueryConditionMode |
hwDynMacAddrQueryConditionStringA |
hwDynMacAddrQueryConditionStringB |
hwDynMacAddrQueryConditionDigitA |
hwDynMacAddrQueryConditionDigitB |
hwDynMacAddrQueryConditionDigitC |
---|---|---|---|---|---|
showall(1) |
- |
- |
- |
- |
- |
showbymac(2) |
- |
mac |
- |
- |
- |
showbymacvlan(3) |
- |
mac |
vlan |
- |
- |
showbytype(4) |
- |
type |
- |
- |
- |
showbytypevlan(5) |
- |
type |
vlan |
- |
- |
showbytypeport(6) |
- |
type |
- |
port |
- |
showbytypeportvlan(7) |
- |
type |
vlan |
port |
- |
showbyvlan(8) |
- |
- |
vlan |
- |
- |
showbyport(9) |
- |
- |
- |
port |
- |
showbyportvlan(10) |
- |
- |
vlan |
port |
- |
showbymacvsi(11) |
vsi |
mac |
- |
- |
- |
showbytypevsi(12) |
vsi |
type |
- |
- |
- |
showbytypeportvsi(13) |
vsi |
type |
- |
port |
- |
showbyvsi(14) |
vsi |
- |
- |
- |
- |
showbyportvsi(15) |
vsi |
- |
- |
port |
- |
showbyvsipw(16) |
vsi |
- |
peer |
pw-id |
- |
showbytypeslot(17) |
- |
type |
- |
- |
slot |
showbytypeslotsourceslot(18) |
- |
type |
- |
sourceslot |
slot |
showbytypeslotvlan(19) |
- |
type |
vlan |
- |
slot |
showbytypeslotport(20) |
- |
type |
- |
port |
slot |
showbytypeslotportvlan(21) |
- |
type |
vlan |
port |
slot |
showbytypeslotvsi(22) |
vsi |
type |
- |
- |
slot |
showbytypeslotportvsi(23) |
vsi |
type |
- |
- |
slot |
showbytypeslotvsipw(24) |
vsi |
type |
peer |
pw-id |
slot |
Prerequisites
- MIB Browser has been connected to an S series switch which uses SNMPv2c or SNMPv3.
- When MIB Browser is used to connect to an S series switch, Get Bulk parameters have been set according to Figure 3-82. Among the Get Bulk parameters, Non repeaters has been set to 0, and Max repetitions has been set to 1, indicating that one MAC address entry can be obtained in a Get Bulk operation. To query multiple MAC address entries at a time, set this parameter to a larger value. For example, to obtain 10 MAC address entries at a time, set Max repetitions to 10.
Querying Dynamic MAC Address on S Series Switches Based on a VLAN ID
- Right-click hwDynMacAddrQueryEntry and choose Multiple Variable Bindings > Prompt For Instance... from the shortcut menu, as shown in Figure 3-83.
- In the displayed dialog box, set the index for querying dynamic MAC address entries based on the VLAN ID 107, that is 0.1.48.1.48.0.0.0.0.0.0.0.8.1.48.1.48.107.0.0, as shown in Figure 3-84.
The following describes the index from the leftmost digit to the rightmost digit:
- 0: indicates the hwDynMacAddrQueryVlanId object, which is not used. The value is set to the default value 0 of the integer type.
- 1.48: indicates the hwDynMacAddrQueryVsiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQuerySiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 0: indicates the hwDynMacAddrQueryBridgeId object, which is not used. The value is set to the default value 0 of the integer type.
- 0.0.0.0.0.0: indicates the hwDynMacAddrQueryMacAddr object, which is not used. The value is set to the default value 0 of the integer type.
- 8: indicates the hwDynMacAddrQueryConditionMode object. The value is set to 8, indicating showbyvlan.
- 1.48 indicates the hwDynMacAddrQueryConditionStringA object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQueryConditionStringB object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 107: indicates the hwDynMacAddrQueryConditionDigitA object. The value is set to 107, indicating VLAN 107.
- 0.0: indicates the hwDynMacAddrQueryConditionDigitB and hwDynMacAddrQueryConditionDigitC objects, respectively. They are not used and are set to the default value 0 of the integer type.
- Click OK. A query dialog box is displayed, as shown in Figure 3-85.
- Modify the objects in Figure 3-85 as follows:
- Change the operation from Get to Get Bulk.
- Delete the 11 index objects because they cannot be queried.
- Delete unnecessary objects. For example, if only the type and interface index of the MAC address table need to be queried, delete objects other than hwDynMacAddrQueryType and hwDynMacAddrQueryIfIndex in the dialog box.
The objects after modification are shown in Figure 3-86. - Click Get Bulk to query the dynamic MAC address entry with the VLAN ID 107. Figure 3-87 shows a dynamic MAC address entry. The VLAN ID of the dynamic MAC address entry is 107, the MAC address is 0.0.0.0.1.2 (0000-0000-0102), the type is dynamic, and the interface index is 4899.To obtain the interface name based on the interface index, see step 6.
The number of MAC address entries obtained each time by clicking Get Bulk is determined by the Max repetitions parameter. For details, see Figure 3-82.
Click Get Bulk multiple times to query all dynamic MAC entries with the VLAN ID 107. When information about other objects is displayed in the query result, the query of dynamic MAC address entries based on a VLAN ID is complete.
- Perform the following operations to obtain an interface name specified in a MAC address entry based on an interface index using ifTable in IF-MIB.
- Right-click ifDescr and choose Multiple Variable Bindings > Prompt For Instance... from the shortcut menu, as shown in Figure 3-88.
- In the displayed dialog box, set the interface index 4899, as shown in Figure 3-89.
- Click OK. A query dialog box is displayed, as shown in Figure 3-90.
- Click Get to query the interface name corresponding to the interface index 4899, as shown in Figure 3-91. According to the query result, the interface name corresponding to the interface index 4899 is GigabitEthernet1/0/12.
Querying Dynamic MAC Address on S Series Switches Based on an Interface Name
The procedure for querying dynamic MAC addresses learned by an S series switch based on an interface name is similar to that for querying dynamic MAC addresses learned by an S series switch based on a VLAN ID. You only need to change the index entered in step 2.
The following describes how to query the dynamic MAC addresses learned by GE1/0/12.
- Obtain the interface index corresponding to the interface according to ifTable in IF-MIB.Right-click ifDescr and choose Walk from the shortcut menu to obtain all interface names on a switch, as shown in Figure 3-92. The command output shows that the interface index of GE1/0/12 is 4899.
- Change the index value to be entered in step 2 based on the index format. The index for querying dynamic MAC address learned by GE1/0/12 is 0.1.48.1.48.0.0.0.0.0.0.0.9.1.48.1.48.0.4899.0, as shown in Figure 3-93.
The following describes the index from the leftmost digit to the rightmost digit:
- 0: indicates the hwDynMacAddrQueryVlanId object, which is not used. The value is set to the default value 0 of the integer type.
- 1.48: indicates the hwDynMacAddrQueryVsiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQuerySiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 0: indicates the hwDynMacAddrQueryBridgeId object, which is not used. The value is set to the default value 0 of the integer type.
- 0.0.0.0.0.0: indicates the hwDynMacAddrQueryMacAddr object, which is not used. The value is set to the default value 0 of the integer type.
- 9: indicates the hwDynMacAddrQueryConditionMode object. The value is set to 9, indicating showbyport.
- 1.48 indicates the hwDynMacAddrQueryConditionStringA object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQueryConditionStringB object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 0: indicates the hwDynMacAddrQueryConditionDigitA object, which is not used. The value is set to the default value 0 of the integer type.
- 4899: indicates the hwDynMacAddrQueryConditionDigitB object. The value is set to 4899, indicating the interface index.
- 0: indicates the hwDynMacAddrQueryConditionDigitC object, which is not used. The value is set to the default value 0 of the integer type.
Querying Dynamic MAC Address on S Series Switches Based on a VLAN ID and an Interface Name
The procedure for querying dynamic MAC addresses learned by an S series switch based on a VLAN ID and an interface name is similar to that for querying dynamic MAC addresses learned by an S series switch based on a VLAN ID. You only need to change the index entered in step 2.
The following describes how to query dynamic MAC address entries learned by GE1/0/12 in VLAN 107.
- Obtain the interface index corresponding to the interface according to ifTable in IF-MIB.Right-click ifDescr and choose Walk from the shortcut menu to obtain all interface names on a switch, as shown in Figure 3-94. The command output shows that the interface index of GE1/0/12 is 4899.
- Change the index value to be entered in step 2 based on the index format. The index for querying dynamic MAC address entries learned by GE1/0/12 in VLAN 107 is 0.1.48.1.48.0.0.0.0.0.0.0.10.1.48.1.48.107.4899.0, as shown in Figure 3-95.
The following describes the index from the leftmost digit to the rightmost digit:
- 0: indicates the hwDynMacAddrQueryVlanId object, which is not used. The value is set to the default value 0 of the integer type.
- 1.48: indicates the hwDynMacAddrQueryVsiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQuerySiName object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 0: indicates the hwDynMacAddrQueryBridgeId object, which is not used. The value is set to the default value 0 of the integer type.
- 0.0.0.0.0.0: indicates the hwDynMacAddrQueryMacAddr object, which is not used. The value is set to the default value 0 of the integer type.
- 10: indicates thehwDynMacAddrQueryConditionMode object. The value is set to 10, indicating showbyportvlan.
- 1.48 indicates the hwDynMacAddrQueryConditionStringA object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 1.48: indicates the hwDynMacAddrQueryConditionStringB object, which is not used. The value is set to the default value 0 of the character string type, which is expressed as 1.48 in the index. The value 1 indicates the length of the character string, and the value 48 indicates the ASCII code of the character string 0.
- 107: indicates the hwDynMacAddrQueryConditionDigitA object. The value is set to 107, indicating the VLAN ID.
- 4899: indicates the hwDynMacAddrQueryConditionDigitB object. The value is set to 4899, indicating the interface index.
- 0: indicates the hwDynMacAddrQueryConditionDigitC object, which is not used. The value is set to the default value 0 of the integer type.
Querying STP Information
Checking Whether STP Is Enabled Globally or on an Interface
hwMstpStatus describes whether STP is enabled globally. When multiple processes are used, query the STP status in process 0.
hwMstpProTable describes MSTP process information, including the status, priority, and root bridge type. You can learn about the STP status of all processes using hwMstpProStpState in hwMstpProTable.
hwMstpProNewPortTable describes information about an interface, including the interface status and priority. You can learn about the STP status of an interface by using hwMstpProNewPortStpStatus in the hwMstpProNewPortTable.
Object |
OID |
---|---|
hwMstpStatus |
1.3.6.1.4.1.2011.5.25.42.4.1.1 |
hwMstpProStpState |
1.3.6.1.4.1.2011.5.25.42.4.1.23.1.4 |
hwMstpProNewPortStpStatus |
1.3.6.1.4.1.2011.5.25.42.4.1.29.1.22 |
The steps are as follows:
- Perform the Get operation for hwMstpStatus to query the STP status globally.
- Perform the Walk operation for hwMstpProStpState to query the STP status in a process.
- Query the STP status on an interface.
- You can view the relationships between interface names and indexes by using hwL2IfPortName.
You can learn about the STP status of an interface by using hwMstpProNewPortStpStatus in the hwMstpProNewPortTable. Deduct 1 from an interface index to obtain the hwMstpPortId1 value. For example, the interface index of XGigabitEthernet6/0/3 is 11. Deduct 1 from 11 to obtain the hwMstpPortId1 value 10 (0.0.hwMstpPortId1=10.0.0.0.0), that is hwMstpProNewPortStpStatus.0.0.10.0.0.0.0 (integer) enabled(1). Therefore, the STP status of XGigabitEthernet6/0/3 is Enabled.
- You can view the relationships between interface names and indexes by using hwL2IfPortName.
Querying the STP Type
hwMstpForceVersion describes the STP type. When multiple processes are used, query the STP type in process 0. The value 0 indicates STP; the value 2 indicates RSTP; the value 3 indicates MSTP.
hwMstpProTable describes MSTP process information, including the status, priority, and root bridge type. You can learn about STP types of all processes using hwMstpProForceVersion in hwMstpProTable. The value 0 indicates STP; the value 2 indicates RSTP; the value 3 indicates MSTP.
Object |
OID |
---|---|
hwMstpForceVersion |
1.3.6.1.4.1.2011.5.25.42.4.1.2 |
hwMstpProForceVersion |
1.3.6.1.4.1.2011.5.25.42.4.1.23.1.7 |
Use either of the following methods to query the STP type:
- Perform the Get operation for the hwMstpForceVersion object.
- Perform the Walk operation for the hwMstpProForceVersion object.
Querying the Forwarding Status of an Interface
hwMstpProNewPortTable describes information about an interface, including the interface status and priority. You can learn about the forwarding status of an interface using hwMstpProNewPortState in hwMstpProNewPortTable.
Object |
OID |
---|---|
hwMstpProNewPortState |
1.3.6.1.4.1.2011.5.25.42.4.1.29.1.1 |
The steps are as follows:
- You can view the relationships between interface names and indexes by using hwL2IfPortName.
You can learn about the forwarding status of an interface using hwMstpProNewPortState in hwMstpProNewPortTable. Deduct 1 from an interface index to obtain the hwMstpPortId1 value. For example, the interface index of XGigabitEthernet6/0/3 is 11. Deduct 1 from 11 to obtain the hwMstpPortId1 value 10 (0.0.hwMstpPortId1=10.0.0.0.0), that is hwMstpProNewPortState.0.0.10.0.0.0.0 (integer) forwarding(5). Therefore, the forwarding status of XGigabitEthernet6/0/3 is Forwarding.
Querying IP Address Information
The table ipAddrTable describes the IP address information configured on interfaces, including IP addresses and interface indexes. In this table, the object ipAdEntAddr can be used to query IP addresses of all interfaces; the object ipAdEntIfIndex can be used to query the IP address of an interface.
Object | OID |
---|---|
ipAdEntAddr | 1.3.6.1.2.1.4.20.1.1 |
ipAdEntIfIndex | 1.3.6.1.2.1.4.20.1.2 |
Querying IP Addresses of All Interfaces
You can use the object ipAdEntAddr to query IP addresses of all interfaces, as shown in Figure 3-96.
Querying the IP Address of an Interface
To query the IP address of an interface, perform the following operations:
Use the object ifDescr to query the interface index.
As shown in Figure 3-97, the interface index of VLANIF100 is 59.
Use the object ipAdEntIfIndex to query the interface IP address.
As shown in Figure 3-98, the IP address of VLANIF100 is 172.16.1.3.
Querying the Total Number of IP Routes of Routing Protocols
hwRouteStatTable is a table in HUAWEI-RM-EXT-MIB and provides statistics about direct routes, static routes, OSPF routes, RIP routes, IS-IS routes, and BGP routes. For details, see hwRouteStatTable.
Object |
Description |
OID |
---|---|---|
hwRouteStatVpnName |
This object indicates the VPN index. The public network index is 1.0. The VPN index is in y.x.x… format, where y indicates the length of a VPN instance name, and x.x… indicates the ASCII code of the VPN instance name. For example, if a VPN instance name is abc, its index is 3.97.98.99. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.1 |
hwRouteStatProtocolId |
This object indicates the index of a routing protocol and
must be an integer:
|
1.3.6.1.4.1.2011.5.25.145.1.2.1.2 |
hwRouteStatTotal |
This object indicates the total number of routes of a routing protocol. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.3 |
hwRouteStatActive |
This object indicates the number of active routes of a routing protocol. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.4 |
hwRouteStatAdded | This object indicates the number of added routes of a routing protocol. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.5 |
hwRouteStatDeleted | This object indicates the number of deleted routes of a routing protocol. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.6 |
hwRouteStatFreed | This object indicates the number of released routes of a routing protocol. |
1.3.6.1.4.1.2011.5.25.145.1.2.1.7 |
You can query the total number of IP routes of routing protocols in this table.
The following is an example for querying public network BGP routes. Assume that the index of public network BGP routes is 1.0.8. Figure 3-99 shows how to query the number of public network BGP routes queried through the MIB tool.
The following is an example for querying the total number of BGP routes of the VPN instance abc. Assume that the index of BGP routes of the VPN instance abc is 3.97.98.99.8. Figure 3-100 shows how to query the number of BGP routes of the VPN instance abc queried through the MIB tool.
BFD Information Query
Querying the BFD Session Status
hwBfdSessDown is an alarm object. The object indicates that the BFD session status changes from Up to Down, which is notified to the NMS.
Object
OID
hwBfdSessDown
1.3.6.1.4.1.2011.5.25.38.3.1
Query the hwBfdSessDown object on the alarm page. As shown in Figure 3-101, the hwBfdSessDown object is queried.
The BFD alarm needs to be triggered manually. The alarm object does not save the content, so data cannot be obtained through the Walk operation.
hwBfdSessUp is an alarm object. The object indicates that the BFD session status changes from Down to Up, which is notified to the NMS.
Object
OID
hwBfdSessUp
1.3.6.1.4.1.2011.5.25.38.3.2
Query the hwBfdSessUp object on the alarm page. As shown in Figure 3-102, the hwBfdSessUp object is queried.
The BFD alarm needs to be triggered manually. The alarm object does not save the content, so data cannot be obtained through the Walk operation.
VRRP Information Query
Querying VRRP Group Information
vrrpOperTable describes VRRP group information, including the VRID of the VRRP group, virtual MAC address, and interval at which VRRP Advertisement packets are sent.
You can learn about the VRRP group status (initialize, master, or backup) using vrrpOperState in vrrpOperTable.
Object | Description | OID |
---|---|---|
vrrpOperState | This object indicates the VRRP group status:
|
1.3.6.1.2.1.68.1.3.1.3 |
As shown in Figure 3-103, select vrrpOperState and perform the Walk operation to query the status of all VRRP groups.
In vrrpOperState.115.1 (integer) master(3), the value 115 is the index of the interface where the VRRP group is configured, the value 1 is the VRID of the VRRP group, and master(3) indicates that the VRRP group is in master state.
Querying the Virtual MAC Address of the VRRP Group
vrrpOperTable describes VRRP group information, including the VRID of the VRRP group, virtual MAC address, and interval at which VRRP Advertisement packets are sent.
You can learn about the virtual MAC addresses of all VRRP groups using vrrpOperVirtualMacAddr in vrrpOperTable.
Object | Description | OID |
---|---|---|
vrrpOperVirtualMacAddr | This object indicates the virtual MAC address of the VRRP group. |
1.3.6.1.2.1.68.1.3.1.2 |
As shown in Figure 3-104, select vrrpOperVirtualMacAddr and perform the Walk operation to query virtual MAC addresses of all VRRP groups.
In vrrpOperVirtualMacAddr.115.1 (octet string) 00:00:5E:00:01:01 [00.00.5E.00.01.01 (hex)], the value 115 is the index of the interface where the VRRP group is configured, the value 1 is the VRID of the VRRP group, and the value 00:00:5E:00:01:01 indicates the virtual MAC address of the VRRP group.
Querying QoS Information
Querying the Diff-Serv Profile and Its Application
The table hwXQosBaCfgInfoTable allows you to query a Diff-Serv profile and its application.
Query the index of the Diff-Serv profile by performing the Walk operation for the Walk hwXQosBaName object. As shown in Figure 3-105, the index of the Diff-Serv profile ISR is 1.
Query the application status of the Diff-Serv profile based on the index by performing the Walk operation for the hwXQosBaRowStatus object. As shown in Figure 3-106, the application status of the ISR profile is active.
Querying Mapping Relationships in a Diff-Serv Profile on the Inbound Interface
The table hwXQosBaPhbCfgInfoTable allows you to query the mapping from the external priority to the internal priority and color in a Diff-Serv profile.
Query the index of the Diff-Serv profile by performing the Walk operation for the Walk hwXQosBaName object. As shown in Figure 3-107, the index of the 1212 profile is 3.
- Query the internal priority hwXQosBaPhbCos based on hwXQoSBaIndex, hwXQoSBaPhbType, and hwXQoSBaPhbPri by performing the Get operation for the hwXQosBaPhbCos object.
- hwXQoSBaIndex: specifies the index of the Diff-Serv profile.
- hwXQoSBaPhbType: specifies the priority field type, whose value is 1 for the 802.1p priority and 2 for the DSCP priority.
- hwXQoSBaPhbPri: specifies the value of the priority field.
- hwXQosBaPhbCos: specifies the value of the internal priority. For mapping between the internal priority and CoS, see hwXQosBaPhbCfgInfoTable.
As shown in Figure 3-108, the value of hwXQosBaPhbCos is hwXQosBaPhbCos.A.B.C, among which A indicates hwXQoSBaIndex, B indicates hwXQoSBaPhbType, and C indicates hwXQoSBaPhbPri. hwXQoSBaIndex, hwXQoSBaPhbType, and hwXQoSBaPhbPri uniquely identify the value of the internal priority hwXQosBaPhbCos. In Figure 3-108, the value of hwXQosBaPhbCos.3.1.0 is 0, indicating that the 802.1p priority 0 is mapped to the internal priority BE in the inbound direction in the Diff-Serv profile 1212.
Query the packet color hwXQosBaPhbColour based on hwXQoSBaIndex, hwXQoSBaPhbType, and hwXQoSBaPhbPri by performing the Get operation for the hwXQosBaPhbColour object. As shown in Figure 3-109, the value of hwXQosBaPhbColour is hwXQosBaPhbCos.A.B.C, among which A indicates hwXQoSBaIndex, B indicates hwXQoSBaPhbType, and C indicates hwXQoSBaPhbPri. hwXQoSBaIndex, hwXQoSBaPhbType, and hwXQoSBaPhbPri uniquely identify the packet color hwXQosBaPhbColour. In Figure 3-108, the value of hwXQosBaPhbColour.3.1.0 is yellow, indicating that the 802.1p priority 0 is mapped to yellow in the inbound direction in the Diff-Serv profile 1212.
Querying Mapping Relationships in a Diff-Serv Profile on the Outbound Interface
The table hwXQoSBaMapCfgInfoTable allows you to query the mapping from the internal priority and color to the external priority in a Diff-Serv profile.
Query the index of the Diff-Serv profile by performing the Walk operation for the Walk hwXQosBaName object. As shown in Figure 3-110, the index of the 1212 profile is 3.
- Query the value of hwXQosBaMapPri based on hwXQosBaIndex, hwXQosBaMapType, hwXQosBaMapCos, and hwXQosBaMapColour by performing the Get operation for the hwXQosBaMapPri object.
- hwXQoSBaIndex: specifies the index of the Diff-Serv profile.
- hwXQosBaMapType: specifies the external priority field type, whose value is 1 for the 802.1p priority and 2 for the DSCP priority.
- hwXQosBaMapCos: specifies the value of the internal priority. For mapping between the internal priority and CoS, see hwXQosBaPhbCfgInfoTable.
- hwXQosBaMapColour: specifies the packet color whose value is 1 for green packets, 2 for yellow packets, and 3 for red packets.
- hwXQosBaMapPri: specifies the value of the external priority.
As shown in Figure 3-111, the value of hwXQosBaMapPri is hwXQosBaMapPri.A.B.C.D, among which A indicates hwXQosBaIndex, B indicates hwXQosBaMapType, C indicates hwXQosBaMapCos, and D indicates hwXQosBaMapColour. hwXQosBaIndex, hwXQosBaMapType, hwXQosBaMapCos, and hwXQosBaMapColour uniquely identify the value of the external priority hwXQosBaMapPri. In Figure 3-111, the value of hwXQosBaPhbCos.3.1.2.2 is 7, indicating that the internal priority AF2 of yellow packets is mapped to the external priority 7 in the outbound direction in the Diff-Serv profile 1212.
Querying Queue Statistics on an Interface
The table hwXQoSIfQueueRunInfoTable allows you to query statistics about eight queues on an interface.
Query the index hwXQoSIfQueueIfIndex of the interface by referring to Querying Interface Information. This topic assumes that the interface index on GE1/0/5 is 9.
- Query the number of packets passing through a queue (hwXQoSIfQueuePassedPackets) based on hwXQoSIfQueueIfIndex, hwXQoSIfQueueVlanID, and hwXQoSIfQueueCosType by performing the Get operation for the hwXQoSIfQueuePassedPackets object.
- hwXQoSIfQueueIfIndex: specifies the interface index.
- hwXQoSIfQueueVlanID: specifies the VLAN ID, which is 0 currently because this parameter is invalid.
- hwXQoSIfQueueCosType: specifies the queue number whose value is 1 for the BE queue, 2 for the AF1 queue, 3 for the AF2 queue, 4 for the AF3 queue, 5 for the AF4 queue, 6 for the EF queue, 7 for the CS6 queue, and 8 for the CS7 queue.
As shown in Figure 3-112, the value of hwXQoSIfQueuePassedPackets is hwXQoSIfQueuePassedPackets.A.B.C, among which A indicates hwXQoSIfQueueIfIndex, B indicates hwXQoSIfQueueVlanID, and C indicates hwXQoSIfQueueCosType. hwXQoSIfQueueIfIndex, hwXQoSIfQueueVlanID, and hwXQoSIfQueueCosType uniquely identify the value of hwXQoSIfQueuePassedPackets. In Figure 3-112, the value of hwXQoSIfQueuePassedPackets.9.0.1 is 16975988764, indicating that 16,975,988,764 packets pass through the BE queue on GE1/0/5.
Query the bytes of packets passing through a queue (hwXQoSIfQueuePassededBytes) based on hwXQoSIfQueueIfIndex, hwXQoSIfQueueVlanID, and hwXQoSIfQueueCosType by performing the Get operation for the hwXQoSIfQueuePassededBytes object. The method is the same as that for querying the number of packets passing through a queue.
In Figure 3-113, the value of hwXQoSIfQueuePassededBytes.9.0.1 is 4146197780262, indicating that 4,146,197,780,262-byte packets pass through the BE queue on GE1/0/5.
Query the number of dropped packets in a queue (hwXQoSIfQueueDiscardedPackets) based on hwXQoSIfQueueIfIndex, hwXQoSIfQueueVlanID, and hwXQoSIfQueueCosType by performing the Get operation for the hwXQoSIfQueueDiscardedPackets object. The method is the same as that for querying the number of packets passing through a queue.
In Figure 3-114, the value of hwXQoSIfQueueDiscardedPackets.9.0.1 is 24754721880, indicating that 24,754,721,880 packets are dropped in the BE queue on GE1/0/5.
Query the bytes of dropped packets in a queue (hwXQoSIfQueueDiscardedBytes) based on hwXQoSIfQueueIfIndex, hwXQoSIfQueueVlanID, and hwXQoSIfQueueCosType by performing the Get operation for the hwXQoSIfQueueDiscardedBytes object. The method is the same as that for querying the number of packets passing through a queue.
In Figure 3-115, the value of hwXQoSIfQueueDiscardedBytes.9.0.1 is 5897696774720, indicating that 5,897,696,774,720-byte packets are dropped in the BE queue on GE1/0/5.
Querying the Traffic Classifier
The table hwCBQoSClassifierCfgInfoTable allows you to query information about a traffic classifier.
Query the index hwCBQoSClassifierIndex of the traffic classifier based on hwCBQoSClassifierName by performing the Walk operation for the table hwCBQoSClassifierCfgInfoTable. As shown in Figure 3-116, the index hwCBQoSClassifierIndex of the traffic classifier ISR is 2.
- Query information about the traffic classifier based on hwCBQoSClassifierRuleCount and hwCBQoSClassifierOperator by performing the Walk operation for the table hwCBQoSClassifierCfgInfoTable.
- hwCBQoSClassifierRuleCount: specifies the number of matching rules in the traffic classifier.
- hwCBQoSClassifierOperator: specifies the relationships between rules in the traffic classifier.
As shown in Figure 3-117, the value of hwCBQoSClassifierRuleCount is hwCBQoSClassifierRuleCount.A, and the value of hwCBQoSClassifierOperator is hwCBQoSClassifierOperator.A. A indicates hwCBQoSClassifierIndex. hwCBQoSClassifierRuleCount and hwCBQoSClassifierOperator uniquely identify information about the traffic classifier. In Figure 3-117, the value of hwCBQoSClassifierRuleCount.2 is 3, indicating that the ISR traffic classifier has three rules. The value of hwCBQoSClassifierOperator.2 is or, indicating that the relationship between the two rules is OR. Information about hwCBQoSClassifierLayer can be ignored.
- Query information about a rule in the traffic classifier based on hwCBQoSClassifierIndex and hwCBQoSMatchRuleIndex by performing the Walk operation for the table hwCBQoSClassifierCfgInfoTable.
- hwCBQoSClassifierIndex: specifies the index of the traffic classifier.
- hwCBQoSMatchRuleIndex: specifies the index of the rule.
As shown in Figure 3-118, the value of hwCBQoSMatchRuleType is hwCBQoSMatchRuleType.A.B, and the value of hwCBQoSMatchRuleIntValue1 is hwCBQoSMatchRuleIntValue1.A.B. A indicates hwCBQoSClassifierIndex, and B indicates hwCBQoSMatchRuleIndex. hwCBQoSClassifierIndex and hwCBQoSMatchRuleIndex uniquely identify information about a rule, including hwCBQoSMatchRuleType, hwCBQoSMatchRuleStringValue, and hwCBQoSMatchRuleIntValue1.
For the description and specifications of each object for a matching rule, refer to hwCBQoSMatchRuleCfgInfoTable.
In Figure 3-118, hwCBQoSMatchRuleType.2.0 and hwCBQoSMatchRuleIntValue1.2.0 indicates that packets from VLAN 500 match the first rule in the traffic classifier ISR.
Querying the Traffic Policing Configuration
The table hwCBQoSCarCfgInfoTable allows you to query information about traffic policing.
The index of the table hwCBQoSCarCfgInfoTable is hwCBQoSBehaviorIndex. For details about the table, see hwCBQoSCarCfgInfoTable.
This topic describes how to query the committed information rate (hwCBQoSCarCir), committed burst size (hwCBQoSCarCbs), peak information rate (hwCBQoSCarPir), and peak burst size (hwCBQoSCarPbs).
Query the index of a traffic behavior by performing the Walk operation for the table hwCBQoSBehaviorCfgInfoTable. As shown in Figure 3-119, the index of traffic behavior ISR is 2.
- Query the traffic policing configuration of traffic behavior with the index of 2 by performing the Walk operation for the hwCBQoSCarCfgInfoTable. As shown in Figure 3-120, the CIR is 8,192 kbps, the CBS is 1,024,000 bytes, the PIR is 10,240 kbps, and the PBS is 1,280,000 bytes.
Query the remarking configuration (hwCBQoSRemarkCfgInfoTable), traffic filtering configuration (hwCBQoSFirewallCfgInfoTable), traffic mirroring configuration (hwCBQoSMirrorCfgInfoTable), and traffic count configuration (hwCBQoSCountCfgInfoTable) in the similar method. Query the index of the traffic behavior based on hwCBQoSBehaviorCfgInfoTable and then query the required information in corresponding tables.
Querying LLDP Information
Querying Basic LLDP Information
The LLDP MIB provides functions including configuring LLDP, querying LLDP packet statistics, and querying information about the local device and neighbors. The LLDP MIB also allows traps of specified events to be sent to the NMS.
Root object:
iso(1).std(0).iso8802(8802).ieee802dot1(1).ieee802dot1mibs(1).lldpMIB(2)
The section "LLDP-MIB" in MIB Reference describes MIBs in details. This topic describes some MIB objects and parameters.
Object |
Description |
OID |
---|---|---|
lldpMessageTxInterval |
This object indicates the interval for sending LLDP packets, in seconds. The default value is 30s. |
1.0.8802.1.1.2.1.1.1 |
lldpMessageTxHoldMultiplier |
This object indicates the hold time multiplier of device information on neighbors. The default value is 4. |
1.0.8802.1.1.2.1.1.2 |
lldpReinitDelay |
This object indicates the delay in LLDP initialization, in seconds. The default value is 2s. |
1.0.8802.1.1.2.1.1.3 |
lldpTxDelay |
This object indicates the delay in sending LLDP packets, in seconds. The default value is 2s. |
1.0.8802.1.1.2.1.1.4 |
lldpNotificationInterval |
This object indicates the delay in sending neighbor change traps to the NMS, in seconds. The default value is 5s. |
1.0.8802.1.1.2.1.1.5 |
lldpStatsRemTablesLastChangeTime |
This object indicates the period in which a neighbor exists. |
1.0.8802.1.1.2.1.2.1 |
lldpStatsRemTablesInserts |
This object indicates the number of added neighbors. |
1.0.8802.1.1.2.1.2.2 |
lldpStatsRemTablesAgeouts |
This object indicates the number of deleted neighbors due to aging out of LLDP information. |
1.0.8802.1.1.2.1.2.5 |
lldpLocChassisIdSubtype |
This object indicates the ID subtype of the local device. |
1.0.8802.1.1.2.1.3.1 |
lldpLocPortId |
This object indicates the ID of the local port. |
1.0.8802.1.1.2.1.3.7.1.3 |
lldpRemChassisIdSubtype |
This object indicates the ID subtype of the neighbor. |
1.0.8802.1.1.2.1.4.1.1.4 |
lldpRemChassisId |
This object indicates the ID of the neighbor. |
1.0.8802.1.1.2.1.4.1.1.5 |
Querying the LLDP Configuration
The LLDP MIB allows you to query the local LLDP configuration. Obtain the detailed information based on the objects in the file lldpConfiguration. This topic describes examples for obtaining the LLDP configuration based on some objects.
Querying the Interval for Sending LLDP Packets
Query the interval for sending LLDP packets based on lldpMessageTxInterval, as shown in Figure 3-121.
Querying the Hold Time Multiplier of LLDP Information on Neighbors
Query the hold time multiplier of LLDP information on neighbors based on lldpMessageTxHoldMultiplier, as shown in Figure 3-122.
Querying the Delay in LLDP Initialization
Query the delay in LLDP initialization based on lldpReinitDelay, as shown in Figure 3-123.
Querying the Delay for Sending LLDP Packets
Query the delay in sending LLDP packets based on lldpTxDelay, as shown in Figure 3-124.
Querying the Delay for Sending Neighbor Change Traps to the NMS
Query the delay in sending neighbor change traps to the NMS based on lldpNotificationInterval, as shown in Figure 3-125.
Querying Information About LLDP Neighbors
The LLDP MIB allows you to query information about neighbors. Obtain the detailed information based on the objects in the file lldpStatistics. This topic describes examples for obtaining information about LLDP neighbors based on some objects.
Querying the Time of the Latest Change in Neighbor Information
Query the time of the latest change in neighbor information based on lldpStatsRemTablesLastChangeTime, as shown in Figure 3-126.
Querying the Number of Added LLDP Neighbors
Query the number of added neighbors based on lldpStatsRemTablesInserts, as shown in Figure 3-127.
Querying the Number of Deleted LLDP Neighbors due to Aging out of LLDP Information
Query the number of deleted neighbors due to aging out of LLDP information based on lldpStatsRemTablesAgeouts, as shown in Figure 3-128.
Querying Data on the Local LLDP Device
The LLDP MIB allows you to query data on the local device and detailed information based on the objects in the file lldpLocalSystemData. This topic describes examples for obtaining data on the local device based on some objects.
Querying the ID Subtype of the Local Device
Query the ID subtype of the local device based on lldpLocChassisIdSubtype, as shown in Figure 3-129.
Querying the ID of the Local Device
Query the ID of the local device based on lldpLocChassisIdSubtype, as shown in Figure 3-130.
Querying the ID of the Local Port
Query the ID of the local port based on lldpLocPortId, as shown in Figure 3-131.
Querying Data on LLDP Neighbors
The LLDP MIB allows you to query data on LLDP neighbors. Obtain the detailed information based on the objects in the file lldpRemoteSystemsData. This topic describes examples for obtaining data on LLDP neighbors based on some objects.
Querying the ID Subtypes of the LLDP Neighbors
Query the ID subtypes of the LLDP neighbors based on lldpRemChassisIdSubtype, as shown in Figure 3-132.
Querying the IDs of the LLDP Neighbors
Query the IDs of the LLDP neighbors based on lldpRemChassisId, as shown in Figure 3-133.
Querying LLDP Extended Information
LLDP-EXT-DOT1-MIB
LLDP-EXT-DOT1-MIB provides type-length-values (TLVs) defined by IEEE 802.1, including releasing TLVs, and querying the port VLANs, VLAN names, protocol VLANs, and protocol types of the local and remote ports.
Root object:
iso(1).std(0).iso8802(8802).ieee802dot1(1).ieee802dot1mibs(1).lldpMIB(2).lldpObjects(1).lldpExtensions(5).lldpXdot1MIB(32962)
The section "LLDP-EXT-DOT1-MIB" in MIB Reference describes MIBs in details. This topic describes some MIB objects and parameters.
Object |
Description |
OID |
---|---|---|
lldpXdot1ConfigPortVlanTxEnable |
This object indicates whether to send the local port VLAN IDs. |
1.0.8802.1.1.2.1.5.32962.1.1.1.1.1 |
lldpXdot1LocPortVlanId |
This object indicates the VLAN ID of the local port. The default value is 0. |
1.0.8802.1.1.2.1.5.32962.1.2.1.1.1 |
LLDP-EXT-DOT3-MIB
LLDP-EXT-DOT3-MIB provides TLVs defined by IEEE 802.3, including releasing and enabling TLVs defined by IEEE 802.3, and querying the negotiation capabilities, power supply capabilities, link aggregation, and maximum frame lengths of the local and remote ports.
Root object:
iso(1).std(0).iso8802(8802).ieee802dot1(1).ieee802dot1mibs(1).lldpMIB(2).lldpObjects(1).lldpExtensions(5).lldpXdot3MIB(4623)
The section "LLDP-EXT-DOT3-MIB" in MIB Reference describes MIBs in details. This topic describes some MIB objects and parameters.
Object |
Description |
OID |
---|---|---|
lldpXdot3PortConfigTLVsTxEnable |
This object indicates whether to send TLVs defined by IEEE 802.3. |
1.0.8802.1.1.2.1.5.4623.1.1.1.1.1 |
lldpXdot3LocPortAutoNegSupported |
This object indicates whether the local port supports auto-negotiation of the transmission rate. |
1.0.8802.1.1.2.1.5.4623.1.2.1.1.1 |
Querying LLDP-EXT-DOT1-MIB Information
LLDP-EXT-DOT1-MIB allows you to query LLDP extended information defined by IEEE 802.1. Obtain the detailed information based on the objects in the file lldpXdot1MIB. This topic describes examples for obtaining LLDP extended information based on some objects.
Querying Whether TLVs Defined by IEEE 802.1 Are Sent
Query whether TLVs defined by IEEE 802.1 are sent based on lldpXdot1ConfigPortVlanTxEnable, as shown in Figure 3-134.
Querying the VLAN ID of the Local Port
Query the VLAN ID of the local port based on lldpXdot1LocPortVlanId, as shown in Figure 3-135.
Querying LLDP-EXT-DOT3-MIB Information
LLDP-EXT-DOT3-MIB allows you to query LLDP extended information defined by IEEE 802.3. Obtain the detailed information based on the objects in the file lldpXdot3MIB. This topic describes examples for obtaining LLDP extended information based on some objects.
Querying Whether to Send the TLVs Defined by IEEE 802.3
Query whether TLVs defined by IEEE 802.3 are sent based on lldpXdot3PortConfigTLVsTxEnable, as shown in Figure 3-136.
Querying Whether the Local Port Supports Auto-Negotiation of the Transmission Rate
Query whether the local port supports auto-negotiation of the transmission rate based on lldpXdot3LocPortAutoNegSupported, as shown in Figure 3-137.
Querying Huawei LLDP MIB Information
HUAWEI-LLDP-MIB is an extension of LLDP-MIB. HUAWEI-LLDP-MIB allows you to enable or disable global LLDP, configure management IPv4 addresses in the NMS, clear statistics about received and sent LLDP packets, and enable or disable the global trap function.
Root object:
iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).huaweiMgmt(5).hwDatacomm(25).hwLldpMIB(134)
The section "HUAWEI-LLDP-MIB" in MIB Reference describes MIBs in details. This topic describes some MIB objects and parameters.
Object |
Description |
OID |
---|---|---|
hwLldpEnable |
This object indicates whether global LLDP is enabled.
By default, global LLDP is enabled. |
1.3.6.1.4.1.2011.5.25.134.1.1.1 |
hwLldpLocManIPAddr |
This object indicates the local management IP address. |
1.3.6.1.4.1.2011.5.25.134.1.1.2 |
hwLldpNotificationEnable |
This object indicates whether the global trap function is enabled to control all ports.
By default, the global trap function is enabled. NOTE:
This function controls only LLDP traps and does not take effect for
MDN traps. By default, MDN trap is disabled. |
1.3.6.1.4.1.2011.5.25.134.1.1.4 |
Querying HUAWEI-LLDP-MIB Information
HUAWEI-LLDP-MIB allows you to query LLDP extended information defined by Huawei. Obtain the detailed information based on the objects in the file hwLldpMIB. This topic describes examples for obtaining LLDP extended information based on some objects.
Querying Whether Global LLDP Is Enabled
Query whether global LLDP is enabled based on hwLldpEnable, as shown in Figure 3-138.
Querying the Local Management IP Address
Query the local management IP address based on hwLldpLocManIPAddr, as shown in Figure 3-139.
Querying Whether Global LLDP Trap Is Enabled
Query whether global LLDP trap is enabled based on hwLldpNotificationEnable, as shown in Figure 3-140.
Querying NQA Information
In this example, ICMP test result is queried.
You can query the results of different test instances by using the indexes of the nqaAdminCtrlTable and nqaResultsTable.
nqaAdminCtrlTable describes the configuration of NQA test instances.
nqaResultsTable describes the results of NQA test instances, including success and failure information, number of sent packets, number of lost packets, and packet loss ratio.
MIB Table | MIB Object | MIB OID |
---|---|---|
nqaAdminCtrlTable | nqaAdminCtrlOwnerIndex | 1.3.6.1.4.1.2011.5.25.111.2.1.1.1 |
nqaAdminCtrlTestName | 1.3.6.1.4.1.2011.5.25.111.2.1.1.2 | |
nqaResultsTable | nqaResultsIndex | 1.3.6.1.4.1.2011.5.25.111.4.1.1.1 |
nqaResultsHopIndex | 1.3.6.1.4.1.2011.5.25.111.4.1.1.2 |
Displaying NQA Test Instance Results
Search for the result of the corresponding test instance by using nqaAdminCtrlOwnerIndex and nqaAdminCtrlTestName, and then search for the result of the specified test instance by using nqaResultsIndex and nqaResultsHopIndex.
- nqaAdminCtrlTable describes the configuration of NQA test instances. Figure 3-141 shows the NQA test instance information. The combination of nqaAdminCtrlOwnerIndex and nqaAdminCtrlTestName of test instance icmp01 is 5.97.100.109.105.110.4.105.99.109.112.
- nqaResultsTable describes the running results of NQA test instances. Figure 3-142 shows the NQA test instance running results. The combination of nqaAdminCtrlOwnerIndex and nqaAdminCtrlTestName of test instance icmp01 is 5.97.100.109.105.110.4.105.99.109.112, and the combination of nqaResultsIndex and nqaResultsHopIndex is 1.1.
Querying RMON Information
RMON-MIB is used to monitor the data traffic in a network segment or the whole network. It contains etherStatsTable, historyControlTable, etherHistoryTable, alarmTable, eventTable, and logTable.
Root OID: iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).rmon(16)
Displaying RMON Ethernet Statistics Table
You can query the RMON Ethernet statistics table to learn about data packet distribution on the Ethernet. Traffic statistics include the number of network collisions, CRC error packets, undersized (or large) data packets, multicast packets, received bytes, and received packets.
The table index is etherStatsIndex and OID prefix is 1.3.6.1.2.1.16.1.1.1.1.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON Ethernet statistics table as follows:
Use etherStatsTable, as shown in Figure 3-143.
Displaying RMON History Control Table
You can query the RMON history control table to obtain the control data such as sampling interval.
The table index is historyControlIndex and OID prefix is 1.3.6.1.2.1.16.2.1.1.1.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON history control table as follows:
Use historyControlTable, as shown in Figure 3-144.
Displaying RMON Ethernet History Table
You can query the RMON Ethernet history table to obtain historical statistics periodically collected on interfaces.
The table indexes are etherHistoryIndex and etherHistorySampleIndex, and OID prefixes are 1.3.6.1.2.1.16.2.2.1.1 and 1.3.6.1.2.1.16.2.2.1.2 respectively.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON Ethernet history table as follows:
Use etherHistoryTable, as shown in Figure 3-145.
Displaying RMON Alarm Table
You can query the RMON alarm table to obtain information such as alarm variable, sampling interval, threshold, trigger condition, and last sampling value.
The table index is alarmIndex and OID prefix is 1.3.6.1.2.1.16.3.1.1.1.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON alarm table as follows:
Use alarmTable, as shown in Figure 3-146.
Displaying RMON Event Table
You can query the RMON event table to obtain information such as event description, whether a trap is triggered, and time of the last event.
The table index is eventIndex and OID prefix is 1.3.6.1.2.1.16.9.1.1.1.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON event table as follows:
Use eventTable, as shown in Figure 3-147.
Displaying RMON Log Table
You can query the RMON log table to obtain information such as event index, time when an event log is generated, and event description.
The table indexes are logEventIndex and logIndex, and OID prefixes are 1.3.6.1.2.1.16.9.2.1.1 and 1.3.6.1.2.1.16.9.2.1.2 respectively.
For the description of the MIB table, see RMON-MIB in the MIB reference.
Query the RMON log table as follows:
Use logTable, as shown in Figure 3-148.
- Connecting the NMS to a Switch
- MIB Loading
- Common MIB Objects
- Example for Managing Configuration Files Using the MIB
- Example for Updating a Device Using the MIB
- MIB Query and Configuration Cases
- Querying and Configuring Device Physical Information
- Querying the CPU Usage
- Querying the Memory Usage
- Querying the Temperature
- Querying the Rated Power of Power Supplies
- Querying Power Consumption of a Device
- Querying the SN
- Querying Information About Optical Modules
- Querying the Electronic Label
- Querying the Voltage
- Querying the Fan Status
- Configuring the System Energy-Saving Mode
- Configuring the Interval for Collecting Power Consumption Data
- Querying the Active/Standby Switchover Configuration
- Querying Interface Information
- Querying VLAN Information
- Querying MAC Address Table
- Querying STP Information
- Querying IP Address Information
- Querying the Total Number of IP Routes of Routing Protocols
- BFD Information Query
- VRRP Information Query
- Querying QoS Information
- Querying the Diff-Serv Profile and Its Application
- Querying Mapping Relationships in a Diff-Serv Profile on the Inbound Interface
- Querying Mapping Relationships in a Diff-Serv Profile on the Outbound Interface
- Querying Queue Statistics on an Interface
- Querying the Traffic Classifier
- Querying the Traffic Policing Configuration
- Querying LLDP Information
- Querying NQA Information
- Querying RMON Information
- Querying and Configuring Device Physical Information