Chapter 22
| Quality of Service Commands
– 540 –
When a packet of size B bytes arrives at time t, the following happens:
■
If Tc(t)-B ≥ 0, the packet is green and Tc is decremented by B down to the
minimum value of 0,
■
else the packet is red and Tc is not decremented.
Example
This example creates a policy called “rd-policy,” uses the class command to specify
the previously defined “rd-class,” uses the set cos command to classify the service
that incoming packets will receive, and then uses the
police rate
command to limit
the average bandwidth to 100,000 Kbps.
Console(config)#policy-map rd-policy
Console(config-pmap)#class rd-class
Console(config-pmap-c)#set cos 3
Console(config-pmap-c)#police rate 100000
Console(config-pmap-c)#
set cos
This command modifies the class of service (CoS) value for a matching packet (as
specified by the match command) in the packet’s VLAN tag. Use the
no
form to
remove this setting.
Syntax
[
no
]
set cos
cos-value
cos-value
- Class of Service value. (Range: 0-7)
Default Setting
None
Command Mode
Policy Map Class Configuration
Command Usage
◆
The
set cos
command is used to set the CoS value in the VLAN tag for matching
packets.
Example
This example creates a policy called “rd-policy,” uses the class command to specify
the previously defined “rd-class,” uses the
set cos
command to classify the service
that incoming packets will receive.
Console(config)#policy-map rd-policy
Console(config-pmap)#class rd-class
Console(config-pmap-c)#set cos 3
Console(config-pmap-c)#police flow 10000 4000 conform-action transmit
Console(config-pmap-c)#