This section contains sample output from the show policy-map interface command and the show policy-map command. The output from these commands can be used to verify and monitor the feature configuration on your network.
The following is sample output from the show policy-map command. This sample output displays the contents of a policy map called "policy1." In policy 1, traffic policing on the
basis of a CIR of 20 percent has been configured, and the bc and be have been specified in milliseconds. As part of the traffic
policing configuration, optional conform, exceed, and violate actions have been specified.
Router# show policy-map policy1
Policy Map policy1
Class class1
police cir percent 20 bc 300 ms pir percent 40 be 400 ms
conform-action transmit
exceed-action drop
violate-action drop
The following is sample output from the show policy-map interface command. This sample displays the statistics for the serial 2/0 interface on which traffic policing has been enabled. The
committed burst (bc) and excess burst (be) are specified in milliseconds (ms).
Router# show policy-map interface serial2/0
Serial2/0/0
Service-policy output: policy1 (1050)
Class-map: class1 (match-all) (1051/1)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 0 (1052)
police:
cir 20 % bc 300 ms
cir 409500 bps, bc 15360 bytes
pir 40 % be 400 ms
pir 819000 bps, be 40960 bytes
conformed 0 packets, 0 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
violated 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps, violate 0 bps
Class-map: class-default (match-any) (1054/0)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any (1055)
0 packets, 0 bytes
5 minute rate 0 bps
In this example, the CIR and PIR are displayed in bps, and both the committed burst (bc) and excess burst (be) are displayed
in bytes.
The CIR, PIR bc, and be are calculated on the basis of the formulas described below.
Formula for Calculating the CIR
When calculating the CIR, the following formula is used:
CIR percentage specified (as shown in the output of the show policy-map command) * bandwidth (BW) of the interface (as shown in the output of the show interfaces command) = total bits per second
On serial interface 2/0, the bandwidth (BW) is 2048 kbps. To see the bandwidth of the interface, use the show interfaces command. A sample is shown below:
Router# show interfaces serial2/0/0
Serial2/0/0 is administratively down, line protocol is down
Hardware is M4T
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1/255
The following values are used for calculating the CI:
20 % * 2048 kbps = 409600 bps
Formula for Calculating the PIR
When calculating the PIR, the following formula is used:
PIR percentage specified (as shown in the output of the show policy-map command) * bandwidth (BW) of the interface (as shown in the output of the show interfaces command) = total bits per second
On serial interface 2/0/0, the bandwidth (BW) is 2048 kbps. To see the bandwidth of the interface, use the show interfaces command. A sample is shown below:
Router# show interfaces serial2/0
Serial2/0/0 is administratively down, line protocol is down
Hardware is M4T
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1/255
The following values are used for calculating the PIR:
40 % * 2048 kbps = 819200 bps
Note |
Discrepancies between this total and the total shown in the output of the show policy-map interface command can be attributed to a rounding calculation or to differences associated with the specific interface configuration.
|
Formula for Calculating the Committed Burst (bc)
When calculating the bc, the following formula is used:
The bc in milliseconds (as shown in the show policy-map command) * the CIR in bits per seconds = total number bytes
The following values are used for calculating the bc:
(300 ms * 409600 bps) / 8 = 15360 bytes
Formula for Calculating the Excess Burst (be)
When calculating the bc and the be, the following formula is used:
The be in milliseconds (as shown in the show policy-map command) * the PIR in bits per seconds = total number bytes
The following values are used for calculating the be:
400 ms * 819200 bps = 40960 bytes