Оф. ман циски по получению трафика в очередях на определенных интерфейсах .Работает на ios ,ios xe, ios xr
Cisco recommends that you have:
Net-SNMP, or any similar command line based utility, running on a UNIX based operating system, for polling SNMP MIBs (Management Information Bases) from a Cisco device. Net-SNMP is a third-party open source utility available for download at http://www.net-snmp.org/.
QoS should be configured and applied on the interface(s) for which you will do SNMP polling.
Components Used
The information in this document is based on these software and hardware versions:
Any Cisco IOS® device that runs 12.0(3)T or higher. The procedure in this document was verified on a Cisco 6500 that runs 12.2(33) SXJ3.
Cisco SNMP Object Navigator can be accessed at http://tools.cisco.com/Support/SNMP/do/BrowseOID.do
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Get Class Based QoS Details Applied to an Interface With SNMP
Use this procedure in order to determine or confirm the required Object Identifier (OID) for polling.
Get the ifindex (Object Identifier/OID 1.3.6.1.2.1.2.2.1.1) for the interface.
Example 1 - CLI command to get the ifindex of the interface GigabitEthernet6/1/3:
show snmp mib ifmib ifindex | include GigabitEthernet6/1/3
GigabitEthernet6/1/3: Ifindex = 73
Example 2 - SNMP command to get the ifindex of the same interface:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.2.1.2.2 | grep -i GigabitEthernet6/1/3
IF-MIB::ifDescr.73 = STRING: GigabitEthernet6/1/3
The ifindex value returned in these examples is 73.
Get the cbQosIfIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.4) for the ifindex you retrieved in Step 1.
Example - SNMP command to get the cbQosIfIndex for ifindex 73:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.1.1.1.4 | grep -i 73
SNMPv2-SMI::enterprises.9.9.166.1.1.1.1.4.1170 = INTEGER: 73
The cbQosPolicyIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.1) value returned in this example is 1170.
Use the MIB Object cbQosCMName (1.3.6.1.4.1.9.9.166.1.7.1.1.1) to get the names of class-maps configured on the router.
The output will show each class-map with its Index. For example, cbQosConfigIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.2).
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.7.1.1.1
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1593 = STRING: "class-default"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1874801 = STRING:"DOMESTIC_IN
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.5134417 = STRING:"INTERNATIONAL_IN"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.6181089 = STRING:"DOMESTIC_OUT"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.12374209 = STRING:"INTERNATIONAL_OUT"
Make a note of the highlighted value 6181089, which is cbQosConfigIndex.
Use cbQosConfigIndex to get the cbQosPolicyIndex (1.3.6.1.4.1.9.9.166.1.1.1.1.1) and
cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.1) for individual class-maps.
Example - command to monitor class-map DOMESTIC_OUT:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2
5. In order to get the Object Identifier (OID), search for the cbQosConfigIndex value obtained in Step 3 (6181089) in the output below:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2 grep -i 'Gauge32: 6181089'
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.352 = Gauge32: 11986352
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.1163651 = Gauge32: 9637091
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.7200738 = Gauge32: 1594
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.10567713 = Gauge32: 1593
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.354 = Gauge32: 11986352
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.431603 = Gauge32: 9637091
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1170.7552545 = Gauge32: 6181089
The highlighted values are: cbQosConfigIndex (6181089), cbQosPolicyIndex (1170), and cbQosObjectsIndex (7552545).
Important: In this example, the cbQosConfigIndex and corresponding cbQosObjectsIndex are for the cbQosObjectsType (1.3.6.1.4.1.9.9.166.1.5.1.1.3) "classmap". For any other type of cbQosObjectsType, you must look into the correlation derived under cbQosObjects as part of cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.3). Refer to the definition of cbQosParentObjectsIndexa
===================================================================
Poll data from the Policy-map (in correlation with QosObjectsType=classmap) from cbQosClassMapStats (1.3.6.1.4.1.9.9.166.1.15). Many options are available:
+-- -R-- Counter cbQosCMPrePolicyPktOverflow(1)
+-- -R-- Counter cbQosCMPrePolicyPkt(2)
+-- -R-- Counter64 cbQosCMPrePolicyPkt64(3)
+-- -R-- Counter cbQosCMPrePolicyByteOverflow(4)
+-- -R-- Counter cbQosCMPrePolicyByte(5)
+-- -R-- Counter64 cbQosCMPrePolicyByte64(6)
+-- -R-- Gauge cbQosCMPrePolicyBitRate(7)
+-- -R-- Counter cbQosCMPostPolicyByteOverflow(8)
+-- -R-- Counter cbQosCMPostPolicyByte(9)
+-- -R-- Counter64 cbQosCMPostPolicyByte64(10)
+-- -R-- Gauge cbQosCMPostPolicyBitRate(11)
+-- -R-- Counter cbQosCMDropPktOverflow(12)
+-- -R-- Counter cbQosCMDropPkt(13)
+-- -R-- Counter64 cbQosCMDropPkt64(14)
+-- -R-- Counter cbQosCMDropByteOverflow(15)
+-- -R-- Counter cbQosCMDropByte(16)
+-- -R-- Counter64 cbQosCMDropByte64(17)
+-- -R-- Gauge cbQosCMDropBitRate(18)
+-- -R-- Counter cbQosCMNoBufDropPktOverflow(19)
-- -R-- Counter cbQosCMNoBufDropPkt(20)
-- -R-- Counter64 cbQosCMNoBufDropPkt64(21)
Refer to the SNMP MIB Locator for MIBs for these options.
For example, the object cbQosCMPostPolicyBitRate (1.3.6.1.4.1.9.9.166.1.15.1.1.11) polls the bit rate of the traffic after QoS policy execution.
Example - command to get the post policy bit rate:
UNIX # snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.15.1.1.11.1170.7552545
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.11.1170.7552545 = Gauge32: 27000
После добавления данных в систему мониторинга получаем веселые картинки .
Кратко с форума http://forums.cacti.net/about33275.html
ISCO-CLASS-BASED-QOS-MIB IODs:
ftp://ftp.cisco.com/pub/mibs/oid/CISCO-CLASS-BASED-QOS-MIB.oid:
"config" = ".1.3.6.1.4.1.9.9.166.1.7.1.1.1", # list of all
configured QoS classes
"config_index" = ".1.3.6.1.4.1.9.9.166.1.5.1.1.2", #
cbQosConfigIndex
"int_index" = ".1.3.6.1.4.1.9.9.166.1.1.1.1.4", # cbQosIfIndex
"policy_direction" = ".1.3.6.1.4.1.9.9.166.1.1.1.1.3", #
cbQosPolicyDirection
"int_name" = ".1.3.6.1.2.1.31.1.1.1.1",
"int_description" = ".1.3.6.1.2.1.31.1.1.1.18",
"class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.11",
"pre_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.7",
"drop_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.18",
"drop_class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.17",
"pre_class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.6",
"class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.10",
Cisco recommends that you have:
Net-SNMP, or any similar command line based utility, running on a UNIX based operating system, for polling SNMP MIBs (Management Information Bases) from a Cisco device. Net-SNMP is a third-party open source utility available for download at http://www.net-snmp.org/.
QoS should be configured and applied on the interface(s) for which you will do SNMP polling.
Components Used
The information in this document is based on these software and hardware versions:
Any Cisco IOS® device that runs 12.0(3)T or higher. The procedure in this document was verified on a Cisco 6500 that runs 12.2(33) SXJ3.
Cisco SNMP Object Navigator can be accessed at http://tools.cisco.com/Support/SNMP/do/BrowseOID.do
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Get Class Based QoS Details Applied to an Interface With SNMP
Use this procedure in order to determine or confirm the required Object Identifier (OID) for polling.
Get the ifindex (Object Identifier/OID 1.3.6.1.2.1.2.2.1.1) for the interface.
Example 1 - CLI command to get the ifindex of the interface GigabitEthernet6/1/3:
show snmp mib ifmib ifindex | include GigabitEthernet6/1/3
GigabitEthernet6/1/3: Ifindex = 73
Example 2 - SNMP command to get the ifindex of the same interface:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.2.1.2.2 | grep -i GigabitEthernet6/1/3
IF-MIB::ifDescr.73 = STRING: GigabitEthernet6/1/3
The ifindex value returned in these examples is 73.
Get the cbQosIfIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.4) for the ifindex you retrieved in Step 1.
Example - SNMP command to get the cbQosIfIndex for ifindex 73:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.1.1.1.4 | grep -i 73
SNMPv2-SMI::enterprises.9.9.166.1.1.1.1.4.1170 = INTEGER: 73
The cbQosPolicyIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.1) value returned in this example is 1170.
Use the MIB Object cbQosCMName (1.3.6.1.4.1.9.9.166.1.7.1.1.1) to get the names of class-maps configured on the router.
The output will show each class-map with its Index. For example, cbQosConfigIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.2).
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.7.1.1.1
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1593 = STRING: "class-default"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1874801 = STRING:"DOMESTIC_IN
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.5134417 = STRING:"INTERNATIONAL_IN"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.6181089 = STRING:"DOMESTIC_OUT"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.12374209 = STRING:"INTERNATIONAL_OUT"
Make a note of the highlighted value 6181089, which is cbQosConfigIndex.
Use cbQosConfigIndex to get the cbQosPolicyIndex (1.3.6.1.4.1.9.9.166.1.1.1.1.1) and
cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.1) for individual class-maps.
Example - command to monitor class-map DOMESTIC_OUT:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2
5. In order to get the Object Identifier (OID), search for the cbQosConfigIndex value obtained in Step 3 (6181089) in the output below:
UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2 grep -i 'Gauge32: 6181089'
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.352 = Gauge32: 11986352
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.1163651 = Gauge32: 9637091
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.7200738 = Gauge32: 1594
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.10567713 = Gauge32: 1593
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.354 = Gauge32: 11986352
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.431603 = Gauge32: 9637091
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1170.7552545 = Gauge32: 6181089
The highlighted values are: cbQosConfigIndex (6181089), cbQosPolicyIndex (1170), and cbQosObjectsIndex (7552545).
Important: In this example, the cbQosConfigIndex and corresponding cbQosObjectsIndex are for the cbQosObjectsType (1.3.6.1.4.1.9.9.166.1.5.1.1.3) "classmap". For any other type of cbQosObjectsType, you must look into the correlation derived under cbQosObjects as part of cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.3). Refer to the definition of cbQosParentObjectsIndexa
===================================================================
Poll data from the Policy-map (in correlation with QosObjectsType=classmap) from cbQosClassMapStats (1.3.6.1.4.1.9.9.166.1.15). Many options are available:
+-- -R-- Counter cbQosCMPrePolicyPktOverflow(1)
+-- -R-- Counter cbQosCMPrePolicyPkt(2)
+-- -R-- Counter64 cbQosCMPrePolicyPkt64(3)
+-- -R-- Counter cbQosCMPrePolicyByteOverflow(4)
+-- -R-- Counter cbQosCMPrePolicyByte(5)
+-- -R-- Counter64 cbQosCMPrePolicyByte64(6)
+-- -R-- Gauge cbQosCMPrePolicyBitRate(7)
+-- -R-- Counter cbQosCMPostPolicyByteOverflow(8)
+-- -R-- Counter cbQosCMPostPolicyByte(9)
+-- -R-- Counter64 cbQosCMPostPolicyByte64(10)
+-- -R-- Gauge cbQosCMPostPolicyBitRate(11)
+-- -R-- Counter cbQosCMDropPktOverflow(12)
+-- -R-- Counter cbQosCMDropPkt(13)
+-- -R-- Counter64 cbQosCMDropPkt64(14)
+-- -R-- Counter cbQosCMDropByteOverflow(15)
+-- -R-- Counter cbQosCMDropByte(16)
+-- -R-- Counter64 cbQosCMDropByte64(17)
+-- -R-- Gauge cbQosCMDropBitRate(18)
+-- -R-- Counter cbQosCMNoBufDropPktOverflow(19)
-- -R-- Counter cbQosCMNoBufDropPkt(20)
-- -R-- Counter64 cbQosCMNoBufDropPkt64(21)
Refer to the SNMP MIB Locator for MIBs for these options.
For example, the object cbQosCMPostPolicyBitRate (1.3.6.1.4.1.9.9.166.1.15.1.1.11) polls the bit rate of the traffic after QoS policy execution.
Example - command to get the post policy bit rate:
UNIX # snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.15.1.1.11.1170.7552545
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.11.1170.7552545 = Gauge32: 27000
После добавления данных в систему мониторинга получаем веселые картинки .
Кратко с форума http://forums.cacti.net/about33275.html
ISCO-CLASS-BASED-QOS-MIB IODs:
ftp://ftp.cisco.com/pub/mibs/oid/CISCO-CLASS-BASED-QOS-MIB.oid:
"config" = ".1.3.6.1.4.1.9.9.166.1.7.1.1.1", # list of all
configured QoS classes
"config_index" = ".1.3.6.1.4.1.9.9.166.1.5.1.1.2", #
cbQosConfigIndex
"int_index" = ".1.3.6.1.4.1.9.9.166.1.1.1.1.4", # cbQosIfIndex
"policy_direction" = ".1.3.6.1.4.1.9.9.166.1.1.1.1.3", #
cbQosPolicyDirection
"int_name" = ".1.3.6.1.2.1.31.1.1.1.1",
"int_description" = ".1.3.6.1.2.1.31.1.1.1.18",
"class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.11",
"pre_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.7",
"drop_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.18",
"drop_class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.17",
"pre_class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.6",
"class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.10",
Комментариев нет:
Отправить комментарий