QoS Policing in Cisco Networks

1. Introduction

Traffic policing is a QoS mechanism that limits the rate of traffic by dropping or marking excess packets when the defined limit is exceeded. Unlike traffic shaping, which buffers excess traffic, policing discards or reclassifies packets immediately.

πŸ“Œ Key Benefits of Traffic Policing:
βœ… Enforces bandwidth limits on applications/users
βœ… Prevents network abuse (e.g., users setting high DSCP values)
βœ… Protects critical traffic by limiting non-essential traffic
βœ… Can mark or drop excess traffic to maintain QoS policies


2. How Does Policing Work?

Policing uses the Token Bucket Algorithm to monitor the rate of incoming traffic.

πŸ“Œ Behavior of Policing:

Policing vs. Shaping

FeaturePolicingShaping
PurposeLimits and enforces a strict rateSmooths out bursts
Effect on Excess TrafficDrops or marks packetsBuffers packets in a queue
Delay ImpactNo delayCan introduce delay
Best Use CaseIngress (incoming) trafficEgress (outgoing) traffic

3. Configuring QoS Policing on Cisco Routers & Switches

Cisco uses Class-Based Policing to enforce bandwidth limits.

A. Policing All Traffic on an Interface

To police all traffic on an interface to 5 Mbps:

interface GigabitEthernet1/0/1
police 5000000 conform-action transmit exceed-action drop

B. Class-Based QoS Policing

1️⃣ Define a Class to Match Traffic:

class-map MATCH-VIDEO
match ip dscp af41

2️⃣ Create a Policy Map to Apply Policing:

policy-map POLICE-VIDEO
class MATCH-VIDEO
police 2000000 250000 exceed-action drop

3️⃣ Apply to an Interface:

interface GigabitEthernet1/0/1
service-policy input POLICE-VIDEO

πŸ”Ή Explanation:


C. Marking Instead of Dropping (Two-Color Policing)

Instead of dropping excess traffic, mark it with a lower priority (DSCP 10):

policy-map POLICE-WEB
class MATCH-WEB
police 1000000 200000
conform-action transmit
exceed-action set-dscp-transmit 10

πŸ“Œ This means:


D. Three-Color Policing (CIR, PIR, Drop)

Three-color policing allows three actions:
βœ” Conform (Transmit βœ…)
βœ” Exceed (Mark lower priority ✏️)
βœ” Violate (Drop 🚫)

policy-map POLICE-TRAFFIC
class class-default
police 5000000 1000000 2000000
conform-action transmit
exceed-action set-dscp-transmit 10
violate-action drop

πŸ“Œ Explanation:


4. Verifying Policing

βœ… Check if policing is applied:

show policy-map interface GigabitEthernet1/0/1

βœ… Check interface traffic rate:

show interfaces GigabitEthernet1/0/1 | include rate

5. Summary

ScenarioConfiguration
Police all traffic to 5 Mbpspolice 5000000 conform-action transmit exceed-action drop
Limit Video (AF41) to 2 MbpsClass-based policing with exceed-action drop
Mark excess traffic instead of droppingexceed-action set-dscp-transmit 10
Three-color policing (Transmit, Mark, Drop)conform-action transmit, exceed-action set-dscp-transmit 10, violate-action drop
Verify policingshow policy-map interface

πŸš€ Traffic policing enforces bandwidth limits and protects network resources!

renjithbs Avatar

Posted by

Leave a comment