Cisco Systems 7304 Manual De Usuario

Descargar
Página de 28
 
A-24
Cisco 7304 Router MIB Specifications Guide
OL-4925-02
Appendix A      Using MIBs
Billing Customers for Traffic
Retrieve billing information.
x = 0;
done = FALSE;
WHILE (!done)
response = snmp-getnext (
ifIndex = cbQosIfIndex.x,
direction = cbQosPolicyDirection.x
);
IF (response.status != ‘noError’) THEN
done = TRUE
ELSE
x = extract cbQosPolicyIndex from response;
IF (direction == ‘output’) THEN
billing[ifIndex].transmit = GetPostPolicyBytes (x);
ELSE
billing[ifIndex].receive = GetPostPolicyBytes (x);
END-IF
END-IF
END-WHILE
Determine the number of post-policy bytes for billing purposes.
GetPostPolicyBytes (policy)
x = policy;
y = 0;
total = 0;
WHILE (x == policy)
response = snmp-getnext (type = cbQosObjectsType.x.y);
IF (response.status == ‘noError’)
x = extract cbQosPolicyIndex from response;
y = extract cbQosObjectsIndex from response;
IF (x == policy AND type == ‘classmap’)
status = snmp-get (bytes = cbQosCMPostPolicyByte64.x.y);
IF (status == ‘noError’)
total += bytes;
END-IF
END-IF
END-IF
END-WHILE
RETURN total;
Billing Customers for Traffic
This section describes how to use SNMP QoS information to determine the amount of traffic to bill to 
your customers. It also includes a scenario for demonstrating that a QoS service policy attached to an 
interface is policing traffic on that interface.
This section describes the following topics: