OcNOS-RON : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : Policing Configuration
Policing Configuration
This chapter contains a complete sample of configuration of Policing for Pipe and Uniform models.This example shows configurations using LDP.
Configuration
Configuring Remarking for MPLS EXP bits require following configurations:
Enabling label-switching on the interface on NSM.
Configuring LSP (Using LDP, Static or RSVP-TE, in this example we are using LDP for setting UP LSP).
Running an IGP (Internal Gateway Protocol), for example, OSPF, to distribute reachability information within the MPLS cloud.
Enable QoS, Configuring Policing on interface Level.
Topology
Basic Policing Topology
R1
The following steps describes how to configure Policing.
Note: Basic configuration for Policing is same as that of the configurations given in Remarking chapter
 
(config)#class-map cmap1
Enter Class-map mode
(config-cmap-qos)#match dscp 2
Configure match criteria as DSCP with Value 2
(config-cmap-qos)#exit
Exit Class-map mode
(config)#policy-map pmap1
Enter policy-map mode
(config-pmap-qos)#class cmap1
Assign Class cmap1 to Policy-map pmap1
(config-pmap-c-qos)#police cir 1 mbps conform set-mpls-class 6 violate drop
Police DSCP 2 packets @ Committed information rate 1 mbps, and map DSCP 2 to class 6.
(config-pmap-c-qos)#exit
Exit out of policy-class-map mode
(config-pmap-qos)#exit
Exit out of Policy-map mode
(config)#interface eth2
Enter eth0 interface
(config-if)#service-policy type qos input pmap1
Assign service-policy to interface on in-direction
(config-if)#exit
Exit interface mode.
Validation
R1#show class-map
 
Type qos class-maps
===================
class-map type qos match-any class-default
 
class-map cmap1
match dscp 2
 
 
Type queuing class-maps
=======================
class-map match-any q0
 
class-map match-any q1
 
class-map match-any q2
 
class-map match-any q3
 
class-map match-any q4
 
class-map match-any q5
 
class-map match-any q6
 
class-map match-any q7
 
 
Type Vlan-Queuing class-maps
============================
 
 
#show running-config qos
qos enable
!
qos statistics
!
class-map cmap1
match dscp 2
!
policy-map pmap1
class cmap1
police cir 1 mbps conform set-mpls-class 6 violate drop
exit
!
interface eth2
service-policy type qos input pmap1 exit
#
 
#show policy-map
 
Type qos policy-maps
====================
 
policy-map pmap1
class cmap1
police cir 1 mbps conform set-mpls-class 6 violate drop
exit
 
 
Type queuing policy-maps
========================
 
policy-map type queuing default default-out-policy
class type queuing default q0
priority level 1
exit
class type queuing default q1
priority level 1
exit
class type queuing default q2
priority level 1
exit
class type queuing default q3
priority level 1
exit
class type queuing default q4
priority level 1
exit
class type queuing default q5
priority level 1
exit
class type queuing default q6
priority level 1
exit
class type queuing default q7
priority level 1
exit
 
 
#show policy-map interface eth1
 
Interface eth1
Global statistics status : enabled
 
Service-policy (queuing) output: default-out-policy
-----------------------------------
Class-map (queuing): q0
priority level 1
output : 5 packets, 340 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority level 1
output : 25 packets, 2208 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority level 1
output : 46337 packets, 3150916 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority level 1
output : 346 packets, 25193 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q7
output : 808 packets, 67946 bytes
dropped : 0 packets, 0 bytes
 
Wred Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets