120
(QCT) (Config-policy-classmap)#police-simple 10000000 64 conform-action transmit violate-
action transmit
(QCT) (Config-policy-classmap)#exit
(QCT) (Config-policy-map)#exit
7. Define a policy-map in color aware mode matching class “cos-any” (IPv4). Ingress IPv4 traffic arriving at
a port participating in this policy will be assigned green, yellow, or red coloring based on the meter.
(QCT) (Config)#policy-map two-rate-policy in
(QCT) (Config-policy-map)#class tcp
8. Create a two-rate policer per RFC 2698. The CIR value is 800 Kbps and the CBS is set to 96 Kbytes. The PIR
is set to 950 Kbps and the PBS is set to 128 Kbytes. Color-aware processing is enabled via the conform-color
command (i.e., any packets not in cos 0 or 1 are pre-colored “red.” Packets in cos 0 are pre- colored yellow.
Packets in cos 1 are pre-colored green. Pre-coloring gives greater bandwidth to cos 1 packets, as they are
initially subject to the CIR/CBS limits. Packets in CoS 0 are subject to the PIR limits. Based on the CIR/CBD,
the PIR/PBS, and the conform, exceed, and violate actions specified below.
TCP packets with rates less than or equal to the CIR/CBS in class cos 1 are conforming to the rate (green).
These packets will be dropped randomly at an increasing rate between 0–3% when the outgoing interface is
congested between 80 and 100%.
TCP packets with rates above the CIR/CBS and less than or equal to PIR/PBS in either class cos 1 or class cos 2
are policed as exceeding the CIR (yellow). These packets will be dropped randomly at an increasing rate
between
0–5% when the
outgoing interface
is
congested between
70 and 100%. TCP
packets
with rates higher
than the PIR/PBS or which belong to neither class cos 1 nor class cos 2 are violating the rate (red).
These packets will be dropped randomly at an increasing rate between 0–10% when the outgoing interface is
congested between 50 and 100%.
Non-TCP packets in CoS queue 0 or 1 will be dropped randomly at an increasing rate between 0–15% when the
outgoing interface is congested between 50 and 100%.
(QCT) (Config-policy-classmap)#police-two-rate 800 96 950 128 conform-action transmit exceed-
action transmit violate-action transmit
(QCT) (Config-policy-classmap)#conform-color cos1 exceed-color cos0
(QCT) (Config-policy-classmap)#exit
(QCT) (Config-policy-map)#exit
9. Enable WRED drop on traffic classes 0 and 1.
(QCT) (Config)#queue cos-queue random-detect 0 1