I'm using a QoS policy on an interface of a HP6125G switch running Comware Software, Version 5.20.99, Release 2111.
The policy contains a single class (highpriority) and corresponding behaviour (expedite) and is applied to interface Gig1./0/2 (not shown in output)
[HP6125G]display qos policy user-defined customer-policy
User Defined QoS Policy Information:
Policy: customer-policy
Classifier: highpriority
Behavior: expedite
Marking:
Remark local precedence 7
The traffic classifier matches all traffic in VLAN 100
[HP6125G]display traffic classifier user-defined highpriority
User Defined Classifier Information:
Classifier: highpriority
Operator: OR
Rule(s) : If-match customer-vlan-id 100
In our software, the end user should be able to add/remove VLANs to this highpriority class. The end users accesses a web based application to configure the VLANs and all changes are propagated to the HP6125G switch using SNMP by the backend software.
In this example, the traffic classifier has index 34. The existing rule has index 0 and the index for the next rule must be 1.
[SERVER]# snmpget -m +HH3C-OID-MIB:HH3C-CBQOS2-MIB -v 2c -c private HP6125G hh3cCBQoSClassifierName.34
HH3C-CBQOS2-MIB::hh3cCBQoSClassifierName.34 = STRING: "highpriority"
[SERVER]# snmpget -m +HH3C-OID-MIB:HH3C-CBQOS2-MIB -v 2c -c private HP6125G hh3cCBQosClassifierMatchRuleNextIndex.34
HH3C-CBQOS2-MIB::hh3cCBQosClassifierMatchRuleNextIndex.34 = INTEGER: 1
But any attempt to add/remove rules to the traffic classifier using SNMP fail (inconsistentValue) as long as the traffic class is in use (part of a policy that is applied to an interface)
[SERVER]# snmpset -m +HH3C-OID-MIB:HH3C-CBQOS2-MIB -v 2c -c private HP6125G hh3cCBQoSMatchRuleRowStatus.34.1 int 4 hh3cCBQoSMatchRuleIfNot.34.1 int 1 hh3cCBQoSMatchRuleType.34.1 int 20 hh3cCBQoSMatchRuleStringValue.34.1 string '200'
Error in packet.
Reason: inconsistentValue (The set value is illegal or unsupported in some way)
Failed object: HH3C-CBQOS2-MIB::hh3cCBQoSMatchRuleRowStatus.34.1
using the CLI, it is no problem to make this change
[HP6125G]traffic class highpriority
[HP6125G-classifier-highpriority]if-match customer-vlan-id 200
[HP6125G-classifier-highpriority]quit
[HP6125G]display traffic classifier user-defined highpriority
User Defined Classifier Information:
Classifier: highpriority
Operator: OR
Rule(s) : If-match customer-vlan-id 100
If-match customer-vlan-id 200
Any idea why this won't work using SNMP while it does work using the CLI?
A few things already observed
- Updating the traffic behaviour via SNMP doesn't work either. (And again it does work via the CLI)
- On a HP6125XLG (running Comware 7) it does work to update the traffic classifier and behaviour using SNMP and CLI.
- Also HP5700 (again running Comware 7) works properly using SNMP.
- When the traffic classifier is not used in any policy, updates via SNMP work properly (also updates using CLI)
- When the traffic classifier is used in a policy, but the policy is not attached to an interface, updates using SNMP work properly.
#snmp#QOS#comware