The QoS policing feature is used to impose a maximum rate based on a traffic class. When used with the priority feature, it restricts priority traffic. If the rate is exceeded, then a specific action is taken as soon as the event occurs. The rate (committed information rate (CIR) and the burst parameters (Committed Burst Size (CBS) and Excess Burst Size (EBS)) are all configured in bytes per second.
There are two types of metering that can be configured:
Type the following:
iS5comm# configure terminal
iS5comm(config)# interface gigabitethernet 0/3
iS5comm(config-if)# no shutdown
iS5comm(config-if)# exit
Type the following:
iS5comm# configure terminal
iS5comm(config)# qos enable
Type the following:
iS5comm(config)# ip access-list extended 1001
iS5comm(config-ext-nacl)# permit ip host 12.0.0.5 any priority 2
iS5comm(config-ext-nacl)# exit
iS5comm(config)# interface gigabitethernet 0/3
iS5comm(config-if)# ip access-group 1002 in
iS5comm(config-if)# exit
Type the following:
The meter created by the command below will be trTCM type with traffic components CIR=10000 kbps, CBS=1000, EIR= 100000, and EBS=100000 (corrected based on below).
Where
iS5comm(config)#meter 1
iS5comm(config-meter )# meter-type trTCM color-mode blind cir 10000 cbs 1000 eir 100000 ebs 100000
iS5comm(config-meter)# exit
Type the following:
iS5comm(config)# class-map 10
iS5comm(config-cls-map)# set class 8
iS5comm(config-cls-map)# match access-group ip-access-list 1001
iS5comm(config-cls-cmap)# exit
iS5comm(config)# policy-map 2
iS5comm(config-ply-map)# set meter 1 conform-action set-ip-dscp-transmit 22 exceed-action drop violate-action set-ip-dscp-transmit 35
iS5comm(config-ply-map)# set policy class 8 default-priority-type none
iS5comm(config-ply-map)#end
Type the following.
iS5comm# show access-listsIP ACCESS LISTS
-----------------
Extended IP Access List 1001
-----------------------------
Filter Priority : 2
Filter Protocol Type : ANY
IP address Type : IPV4
Source IP address : 12.0.0.5
Source IP address mask : 255.255.255.255
Source IP Prefix Length : 32
Destination IP address : 0.0.0.0
Destination IP address mask : 0.0.0.0
Destination IP Prefix Length : 0
Flow Identifier : 0
In Port List : Gi0/3
Out Port List : NIL
Filter TOS : NIL
Filter DSCP : NIL
Service Vlan : 0
Service Vlan Priority : 0
Customer Vlan : 0
Customer Vlan Priority : None
Packet Tag Type : Single-tag
Filter Action : Permit
Redirect Port List : NIL
TrafficDistField : Unknown
Sub Action : NONE
Sub Action Id : 0
Status : Active
MAC ACCESS LISTS
-----------------
%No MAC Access Lists have been configured
USER DEFINED LISTS
----------------------
%No User Defined Lists have been configurediS5comm# show policy-map 30
QoS Meter Entries
-----------------
MeterId : 1
Type : TRTCM
Color Mode : Color Blind
Interval : None
CIR : 10000
CBS : 1000
EIR : 100000
EBS : 100000
NextMeter : None
Status : ActiveiS5comm# show meter 1
QoS Meter Entries
-----------------
MeterId : 1
Type : TRTCM
Color Mode : Color Blind
Interval : None
CIR : 10000
CBS : 1000
EIR : 100000
EBS : 100000
NextMeter : None
Status : ActiveiS5comm# show class-map 10
QoS Class Map Entries
---------------------
ClassMapId : 10
L2FilterId : None
L3FilterId : 1001
PriorityMapId : None
VlanMapId : None
CLASS : 8
PolicyMapId : 2
PreColor : None
Status : Active
Type the following:
iS5comm# configure terminal
iS5comm(config)# interface gigabitethernet 0/3
iS5comm(config-if)# no shutdown
iS5comm(config-if)# exit
Type the following:
iS5comm# configure terminal
iS5comm(config)# qos enable
Type the following:
iS5comm(config)# mac access-list extended 1006
iS5comm(config-ext-nacl)# permit any any priority 4
iS5comm(config-ext-nacl)# exit
iS5comm(config)# interface gigabitethernet 0/3
iS5comm(config-if)# ip access-group 1006 in
iS5comm(config-if)# exit
Type the following:
The meter created by the command below will have srTCM type with traffic components CIR=10000 kbps, CBS=1000, EIR= 100000, EBS=100000 (corrected based on below)
Where
iS5comm(config)#meter 4
iS5comm(config-meter )# meter-type srTCM color-mode blind cir 10000 cbs 1000 eir 100000 ebs 100000
iS5comm(config-meter)# exit
Type the following:
iS5comm(config)# class-map 10
iS5comm(config-cls-map)# set class 9
iS5comm(config-cls-map)# match access-group ip-access-list 1006
iS5comm(config-cls-cmap)# exit
iS5comm(config)# policy-map 5
iS5comm(config-ply-map)# set meter 4 conform-action set-cos-transmit 1 set-de-transmit 1 violate-action drop
iS5comm(config-ply-map)# set policy class 9 default-priority-type none
iS5comm(config-ply-map)#end
Type the following.
iS5comm# show access-listsIP ACCESS LISTS
-----------------
Extended IP Access List 1001
-----------------------------
Filter Priority : 2
Filter Protocol Type : ANY
IP address Type : IPV4
Source IP address : 12.0.0.5
Source IP address mask : 255.255.255.255
Source IP Prefix Length : 32
Destination IP address : 0.0.0.0
Destination IP address mask : 0.0.0.0
Destination IP Prefix Length : 0
Flow Identifier : 0
In Port List : Gi0/3
Out Port List : NIL
Filter TOS : NIL
Filter DSCP : NIL
Service Vlan : 0
Service Vlan Priority : 0
Customer Vlan : 0
Customer Vlan Priority : None
Packet Tag Type : Single-tag
Filter Action : Permit
Redirect Port List : NIL
TrafficDistField : Unknown
Sub Action : NONE
Sub Action Id : 0
Status : Active
MAC ACCESS LISTS
-----------------
Extended MAC Access List 1006
-----------------------------
Filter Priority : 4
Ether Type : 0
Protocol Type : 0
Vlan Id : 2
Destination MAC Address : 00:00:00:00:00:00
Source MAC Address : 00:00:00:00:00:00
In Port List : Gi0/2
Out Port List : NIL
Outer EtherType : 0
Service Vlan : 0
Service Vlan Priority : None
Customer Vlan Priority : None
Packet Tag Type : Single-tag
Filter Action : Permit
Redirect Port List : NIL
TrafficDistField : Unknown
Sub Action : NONE
Sub Action Id : 0
\Status : Active
USER DEFINED LISTS
----------------------
%No User Defined Lists have been configurediS5comm# show policy-map 5
QoS Policy Map Entries
----------------------
PolicyMapId : 5
IfIndex : 0
Class : 9
DefaultPHB : None.
MeterId : 4
ConNClass : 0
ExcNClass : 0
VioNClass : 0
ConfAct : Vlan Pri 1, Vlan DE 1
ExcAct : None.
VioAct : DropiS5comm# show meter
QoS Meter Entries
-----------------
MeterId : 4
Type : SRTCM
Color Mode : Color Blind
Interval : None
CIR : 10000
CBS : 1000
EIR : None
EBS : 2000
NextMeter : None
Status : ActiveiS5comm# show class-map
QoS Class Map Entries
---------------------
ClassMapId : 10
L2FilterId : None
L3FilterId : 1001
PriorityMapId : None
VlanMapId : None
CLASS : 8
PolicyMapId : 2
PreColor : None
Status : Active