I assume, that QoS is set up as it is dscribed in my previous .
All traffic is sorted to two different queues: iptv(dscp32) is put into queue1, other traffic is put into queue2. I want to police customers traffic into 20mbps, except iptv packets going towards the customer.
Ingress policing
Create policy map:
policy-map shape-20 class class-default police 20M 400000 exceed-action drop
Assign policy map to interface:
interface FastEthernet1/0/2 service-policy input shape-20
Egress policing
Unfortunately, policy-map containing police action cannot be attached to interface in egress direction. Egress queue2 is shaped to 20mbps:
interface FastEthernet1/0/2 srr-queue bandwidth shape 0 5 0 0
5 is bandwidth weight and is calculated this way: [interface speed]/[bw weight] = [policed speed]. 100mbps/5=20mbps.
There is another possibility to limit egress speed in the interface. It will limit all egress queues to 20% of interface speed:
interface FastEthernet1/0/2 srr-queue bandwidth limit 20 srr-queue bandwidth shape 0 0 0 0