cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2530
Views
0
Helpful
7
Replies

Traffic shaping verification

jtillman11
Level 1
Level 1

I'm studying traffic shaping and policing and want to make sure this policy I created will do what I intended.

 

I have a device on the network: 10.0.3.50

 

My intention is that when this device attempts to communicate with subnet 10.0.7.0/24, traffic will be limited to a speed of 1Mbit.

 

Outgoing interface is Gig0/1

 

Here is what I created:

ip access-list extended 188

     permit ip host 10.0.3.50 10.0.7.0 0.0.0.255

class-map match-all CM-1
    match access-group 111
policy-map Shaping
    class CM-1
        shape average 1000000
Interface g0/1
    service-policy output Shaping

7 Replies 7

ngkin2010
Level 7
Level 7
Hi,

Does show policy-map interface <interface-id> help?

7206# show policy-map interface atm 1/0.1
ATM1/0.1: VC 0/100 -
Service-policy output: cbwfq (1283)
Class-map: A (match-all) (1285/2)
28621 packets, 7098008 bytes
5 minute offered rate 10000 bps, drop rate 0 bps <-----------------------
Match: access-group 101 (1289)
Weighted Fair Queueing
Output Queue: Conversation 73
Bandwidth 500 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 28621/7098008
(depth/total drops/no-buffer drops) 0/0/0

Hi this is the output

 

Class-map: CM-1 (match-all)
      45178 packets, 42708664 bytes
      5 minute offered rate 971000 bps, drop rate 676000 bps
      Match: access-group 188
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 64/31990/0
      (pkts output/bytes output) 13181/12613588
      shape (average) cir 1000000, bc 4000, be 4000
      target shape rate 1000000

Hi,

" 5 minute offered rate 971000 bps, drop rate 676000 bps"

It look working as expected, the rate is shaped within 1000000 bps, and you could see there is exceeded traffic were drop.

I see the drops. With traffic shaping, doesn't it queue the traffic instead of dropping? I though policing will drop exceeding traffic but shaping will queue it to send.

Hi,

Depending on your model, if the number of packet are exceeded from the egress queue, router will drop the incoming packet (That is called Tailed Drop), or some lower priority packet would be dropped from the egress queue (that is called Weighted Random Early Drop).

I am reviewing document to confirm the above statement, please kindly correct me if I am wrong..

Hi,

Ok, you could see from your output of "show policy-map". The queue buffer is set to 64 packets.

You could tune the limit by:
(config-pmap-c)#queue-limit <value> <unit>

However, setting the queue limit to a high value might reduce the number of packet buffers available to other interfaces.

More detailed information:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conmgt/configuration/xe-3s/qos-conmgt-xe-3s-book/qos-conmgt-qdepth.html#GUID-AEEF04C1-CF51-4D12-820F-CAD593DFDDB1

"I see the drops. With traffic shaping, doesn't it queue the traffic instead of dropping? I though policing will drop exceeding traffic but shaping will queue it to send."

Correct, but as ngkin2010 described, a shaper's queue can still fill and then there will be drops.  If fact, if you look at your stats again, you can see the 64 packet queues is filled.

(queue depth/total drops/no-buffer drops) 64/31990/0

Review Cisco Networking for a $25 gift card