MQC Class-Based Average Traffic Shaping


Scenario:

You work for a large provider in India as a senior network engineer specialized in Quality of Service. All the customers of the service provider have an Ethernet connection which is capable of delivering speeds up to 10Mbps. The ISP has diffferent subscriptions and you need to enforce that customers only get what they are paying for…time to get in shape!

Goal:

  • All IP addresses have been preconfigured for you.
  • Configure router Line to shape all ICMP traffic towards router Jack to 128Kbps. The burst interval should be 10ms.

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

Traffic Shaping Network Topology

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

15 Comments

    1. Tc = Bc/rate

      0.01 = x/128000

      x = 128000 x 0.01

      x = 1280 (you are correct)

      I don’t know the all "show" commands offhands, but I would imagine you can check Tc with "show policy-map interface".

  1. class-map match-all ICMP
    match protocol icmp

    policy-map SHAPE
    class icmp
    shape average 64000 640 640

    Line(config-if)#service-policy output SHAPE
    less than 1000 bits in an interval doesn’t make sense

    I believe we have to use 100ms instead of 10ms, Rene could you suggest here pls.

    1. Ignore my previous comments

      Correction,

      class-map match-all ICMP
      match protocol icmp

      policy-map SHAPE
      class icmp
      shape average 128000 1280 1280

  2. The exact burst size can be personalized and customized per customer. In real world, you probably wouldn’t use this math to satisfy the customer due to normal internet and circuit traffic congestion. Try explaining this math to the customer when they are averaging 9Mbps to 9.8Mbps when they pay for 10Mbps.

    It’s best to give the customer about 2Mbps to 5Mbps of burst size. Some ISP actually charge the customer extra for bursting…

    The point is that the math isn’t precise or fixed. It’s actually granular and changeable.

  3. Line(config)#do sh policy-map int
    Serial0/0

    Service-policy output: POLICY

    Class-map: ICMP (match-all)
    1928 packets, 2878712 bytes
    5 minute offered rate 75000 bps, drop rate 0 bps
    Match: protocol icmp
    Traffic Shaping
    Target/Average Byte Sustain Excess Interval Increment
    Rate Limit bits/int bits/int (ms) (bytes)
    128000/128000 320 1280 1280 10 160

    Adapt Queue Packets Bytes Packets Bytes Shaping
    Active Depth Delayed Delayed Active
    – 0 1928 2878712 1912 2872848 no

    Class-map: class-default (match-any)
    86 packets, 5432 bytes
    5 minute offered rate 0 bps, drop rate 0 bps
    Match: any

  4. I believe the final config in Router Line to be

    class-map match-all ICMP
    match protocol icmp
    !
    !
    policy-map SHAPE
    class ICMP
    shape average 128000 1280 1280
    !
    !
    interface Serial0/0
    ip address 192.168.23.3 255.255.255.0
    serial restart-delay 0
    !
    interface FastEthernet1/0
    ip address 192.168.34.3 255.255.255.0
    duplex auto
    speed auto
    service-policy output SHAPE

  5. In Addition to my comment above you may use the following ping command from Router Frank

    ping 192.168.34.4 re 10 size 15000

Comments are closed.