Traffic shaping in Cisco IOS/Queuing-only test

From CT3

Jump to: navigation, search

By Ivan Pepelnjak

In the first test in the traffic shaping test series we’ve verified the behavior of the MQC traffic shaping when the offered load does not exceed the traffic contract (specified with the shape rate class configuration command).

Image:TrafficShapingTestbed.png

Contents

Test result summary

The test verifies that Cisco IOS performs regular output interface queuing when the classified traffic does not exceed the traffic rate configured with the shape command.

Test setup

The following traffic shaping configuration was used on the test router:

Traffic shaping configuration on the test router

policy-map SHAPE
 class UDP
  shape average 128000
  bandwidth 96
 class class-default
  bandwidth 32 

The traffic generator was sending two UDP streams: a 112 kbps UDP stream to IP address 172.16.0.12 …

UDP stream in class UDP

$ flood.pl --size=200 --bandwidth=112 172.16.0.12
Flooding 172.16.0.12 random port with 200-byte packets
Interpacket delay 14.2857142857143 msec
total IP bandwidth 112 kbps
Break with Ctrl-C 

… and a 64 kbps UDP stream to IP address 172.16.0.13

UDP stream in the default class

$ flood.pl --size=200 --bandwidth=64 172.16.0.13
Flooding 172.16.0.13 random port with 200-byte packets
Interpacket delay 15 msec
total IP bandwidth 64 kbps
Break with Ctrl-C 

Test results

The show policy-map interface command clearly shows that the router does not perform any traffic shaping activity (highlighted). The throughput of the UDP class is approximately 96 kbps (115 kbps offered rate minus 22 kbps drop rate) due to the output interface congestion.

The printout also shows the traffic shaping parameters (sustain bits = Bc, excess bits = Be, interval = Tc)

Test#show policy-map interface ser 0/1/0
 Serial0/1/0

  Service-policy output: SHAPE

    Class-map: UDP (match-all)
      33601 packets, 6854604 bytes
      30 second offered rate 115000 bps, drop rate 22000 bps
      Match: access-group name UDP
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
           128000/128000    1984   7936      7936      62        992

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         33601     6854604   38        7752      no
      Queueing
        Output Queue: Conversation 41
        Bandwidth 96 (kbps)Max Threshold 64 (packets)
        (pkts matched/bytes matched) 33600/6854400
        (depth/total drops/no-buffer drops) 63/2248/0

    Class-map: class-default (match-any)
      39223 packets, 4076832 bytes
      30 second offered rate 68000 bps, drop rate 37000 bps
      Match: any
      Queueing
        Output Queue: Conversation 42
        Bandwidth 32 (kbps)Max Threshold 64 (packets)
        (pkts matched/bytes matched) 14058/1462032
        (depth/total drops/no-buffer drops) 64/7567/0

The show queueing command displays the state of the interface output queue. The output queue on the Test router has two reserved WFQ conversations, belonging to class UDP and the default class. The third conversation is dynamic (outbound CDP packet).

Test#show queueing int ser 0/1/0
Interface Serial0/1/0 queueing strategy: fair
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 59449
  Queueing strategy: Class-based queueing
  Output queue: 128/1000/64/44234 (size/max total/threshold/drops)
     Conversations  3/34/32 (active/max active/max total)
     Reserved Conversations 2/2 (allocated/max allocated)
     Available Bandwidth 0 kilobits/sec

  (depth/weight/total drops/no-buffer drops/interleaves) 64/256/2087/0/0
  Conversation 42, linktype: ip, length: 104
  source: 10.0.0.10, destination: 172.16.0.13, id: 0x8BA1, ttl: 127,
  TOS: 0 prot: 17, source port 1044, destination port 8992

  (depth/weight/total drops/no-buffer drops/interleaves) 63/86/589/0/0
  Conversation 41, linktype: ip, length: 204
  source: 10.0.0.10, destination: 172.16.0.12, id: 0x8BFB, ttl: 127,
  TOS: 0 prot: 17, source port 1043, destination port 19678

  (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
  Conversation 33, linktype: cdp, length: 326

Additional Resources