CCIE Pursuit Blog

April 5, 2008

Internetwork Expert Volume II: Lab 8 – Section 7

QoS – 8 Points

7.1  Queueing

Configure r1’s traffic shaping queue to hold 10 times the default amount of packets.

r1#sh traffic queue
Traffic queued in shaping queue on Serial0/0 dlci 105
  Queueing strategy: fcfs

r1#sh queueing int s0/0
Interface Serial0/0 queueing strategy: none

So what is the default number of packets?

Here’s the answer:

r1#sh frame pvc 104

PVC Statistics for interface Serial0/0 (Frame Relay DTE)


  input pkts 1371          output pkts 1726         in bytes 79864
  out bytes 93708          dropped pkts 0           in pkts dropped 0
  out pkts dropped 0                out bytes dropped 0
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0
  out BECN pkts 0          in DE pkts 0             out DE pkts 0
  out bcast pkts 1145      out bcast bytes 59946
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 05:18:08, last time pvc status changed 05:17:48
  cir 128000    bc 16000     be 0         byte limit 2000   interval 125
  mincir 64000     byte increment 2000  Adaptive Shaping none
  pkts 1726      bytes 93708     pkts delayed 0         bytes delayed 0
  shaping inactive
  traffic shaping drops 0
  Queueing strategy: fifo
  Output queue 0/40, 0 drop, 0 dequeued 

Or the easier to read version:

r1#sh frame pvc 104 | i que
  Output queue 0/40, 0 drop, 0 dequeued

Now I need to find a way to change that from 40 to 400:

r1(config)#map-class frame-relay FRTS
r1(config-map-class)#frame ?
  adaptive-shaping   Adaptive traffic rate adjustment, Default = none
  bc                 Committed burst size (Bc), Default = 7000 bits
  be                 Excess burst size (Be), Default = 0 bits
  cir                Committed Information Rate (CIR), Default = 56000 bps
  congestion         Congestion management parameters
  custom-queue-list  VC custom queueing
  end-to-end         Configure frame-relay end-to-end VC parameters
  fair-queue         VC fair queueing
  fecn-adapt         Enable Traffic Shaping reflection of FECN as BECN
  fragment           fragmentation – Requires Frame Relay traffic-shaping to be
                     configured at the interface level
  holdq              Hold queue size for VC
  idle-timer         Idle timeout for a SVC, Default = 120 sec
  interface-queue    PVC interface queue parameters 
  ip                 Assign a priority queue for RTP streams
  mincir             Minimum acceptable CIR, Default = CIR/2 bps
  priority-group     VC priority queueing
  tc                 Policing Measurement Interval (Tc)
  traffic-rate       VC traffic rate
  voice              voice options

holdq looks promising:

frame-relay holdq

To configure the maximum size of a traffic-shaping queue on a switched permanent virtual circuit (PVC), use the frame-relay holdq command in map-class configuration mode.

40 packets

That’s the stuff!

r1(config-map-class)#frame holdq 400

r1#sh frame pvc 104 | i que
  Output queue 0/400, 0 drop, 0 dequeued

The IE solution guide shows the configuration on r4 but it should be configured on r1:

Task 7.1

7.2 Congestion Management

Configure traffic with a UDP destination port of 7070 between r1 and r3 over the serial link with:

1) Priority over all other traffic on the link
2) A maximum of 128Kbps outbound on r1 and r3
3) A burst value of 64Kbps

Well we’re definitely talking LLQ here.  Let’s start by classifying the traffic:

r1(config)#ip access-list extended TASK72
r1(config-ext-nacl)#permit udp any any eq 7070

Now let’s put that in a class-map:

r1(config)#class-map TASK72
r1(config-cmap)#match access-group name TASK72

Now let’s configure our policy-map:

r1(config)#policy-map TASK72
r1(config-pmap)#class TASK72
r1(config-pmap-c)#priority 128000 64000

Finally, let’s apply this outbound on the serial link:

r1(config-if)#service-policy out TASK72
I/f Serial0/1 class TASK72 requested bandwidth 128000 (kbps), available only 1152 (kbps)

DOH!!!!  RTFM!

r1(config-pmap-c)#priority ?
  <8-2000000>  Kilo Bits per second
  percent      % of total bandwidth
r1(config-pmap-c)#  priority 128 ?
  <32-2000000>  Burst in bytes
r1(config-pmap-c)#  priority 128 8000 <-64000/8

r1(config-if)#service-policy out TASK72
Must remove fair-queue configuration first.


r1(config-if)#do sh run int s0/1
interface Serial0/1
 ip address
 ip pim sparse-dense-mode
 fair-queue 64 256 256  <-WTF????

r1(config-if)#int s0/1
r1(config-if)#no fair
r1(config-if)#service-policy out TASK72


r1#sh policy-map int s0/1 out

  Service-policy output: TASK72

    Class-map: TASK72 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name TASK72
        Strict Priority
        Output Queue: Conversation 264
        Bandwidth 128 (kbps) Burst 8000 (Bytes)
        (pkts matched/bytes matched) 0/0
        (total drops/bytes drops) 0/0

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

The cool thing is that you can drop this same configuration on r3:

r1#sh run | sec TASK72
class-map match-all TASK72
 match access-group name TASK72
policy-map TASK72
 class TASK72
  priority 128 8000
 service-policy output TASK72
ip access-list extended TASK72
 permit udp any any eq 7070

This discussion brings up a good point about the question asking for the burst in bps rather than just ‘bits’:

7.2 Cong. Mgmt

I think this question is flawed…..

The question is worded such that it wants 6400bps (bits PER SEC) of a burst.
The token bucket burst is entered as total bytes (i.e. within an interval of Tc, you can burst x bytes of data).
Since the rate needs to be 128kbps, you can’t send bursts at another rate as the CIR along with the burst bytes gives you a fixed Tc.

Yes I agree. I guess it’s 200ms in this case as default value calculated that way in the command reference.

So if question had asked 64000bits then 8000bytes is correct.

But question has asked 64000bps. therefore:
Be=64000bps*0,200sec = 12800bits = 1600 bytes.

so config should be:
priority 128 1600

7.3 Congestion Avoidance

Use WRED on traffic s0/0 on r4 [I initially read this question as requiring only traffic from VLAN 4 to be matched]:

1) Do not drop ‘critical’ traffic until there are 60 packets in queue
2) Drop 5 of every 25 packets of ‘critical’ traffic when there are 60 – 90 packets in queue
3) Drop all ‘critical’ packets once the queue exceeds 90

“critical” traffic is traffic with an IP precedence value of 5:

critical        Set packets with critical precedence (5)

So we need to set the queueing for traffic that matches ip precence 5

random-detect precedence

 Minimum threshold in number of packets. The value range of this argument is from 1 to 4096. When the average queue length reaches the minimum threshold, WRED randomly drops some packets with the specified IP Precedence.
 Maximum threshold in number of packets. The value range of this argument is from the value of the min-threshold argument to 4096. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified IP Precedence.
 Denominator for the fraction of packets dropped when the average queue depth is at the minimum threshold. For example, if the denominator is 512, 1 out of every 512 packets is dropped when the average queue is at the minimum threshold. The value range is from 1 to 65536. The default is 10; 1 out of every 10 packets is dropped at the minimum threshold.

The 5 out of 25 packets is the same as 1 out of 5 so:

policy-map TASK73
 class class-default
  random-detect precedence 5   60    90    5

Finally, we apply this to our existing map-class:

r4(config)#map-class frame FRTS
r4(config-map-class)#service-policy out TASK73

r4#sh frame pvc 401 | b policy
  service policy TASK73
 Serial0/0: DLCI 401 –

  Service-policy output: TASK73

    Class-map: class-default (match-any)
      10 packets, 581 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 16
        (total queued/total drops/no-buffer drops) 0/0/0
         exponential weight: 9

  class    Transmitted      Random drop      Tail drop    Minimum Maximum  Mark
           pkts/bytes       pkts/bytes       pkts/bytes    thresh  thresh  prob
      0       0/0               0/0              0/0           20      40  1/10
      1       0/0               0/0              0/0           22      40  1/10
      2       0/0               0/0              0/0           24      40  1/10
      3       0/0               0/0              0/0           26      40  1/10
      4       0/0               0/0              0/0           28      40  1/10
      5       0/0               0/0              0/0           60      90  1/5
      6      10/581             0/0              0/0           32      40  1/10
      7       0/0               0/0              0/0           34      40  1/10
   rsvp       0/0               0/0              0/0           36      40  1/10

  Output queue size 0/max total 600/drops 0



Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: