Qos for WAN

Posted: May 25, 2006 by sankar in QOS, WAN

Fair Queueing

fair-queue <congestive discard threshold>

fair-queue 128 <dynamic queues> <reservable queues>

after these many packets (128) in each queue, rest of packets are tail dropped

CBWFQ

class-map <name>
match access-group <number>
or
match ip dscp or match dscp
match ip precedence or match precedence
or
match input-interface
or
match protocol <protocol>

policy-map <name>
class <class1>
bandwidth <kbps> or
bandwidth percent <percent>

class <class2>
bandwidth <kbps>
queue-limit <number of packets> — defines number of packets that may be queued for this class

*** Upto 64 classes may be defined inside a policy map.
*** The total bandwidth allocated to all classes should add to 75%
*** 25% is used for routing and control traffic

This value can be changed using
ints0/0
max-reserved-bandwidth <value>

Random Early Detection

Enabling WRED instead of tail drop (which is the default)

policy-map <name>
class <class1>
bandwidth <kbps>
randmom-detect
random-detect exponential-weighting-constant <value>

The exp. weighting constant is used to find out the avg. length of queues.
The first random-detect command enables WRED for that class.

Configuring LLQ

class-map match-all VoiceB
match dscp ef
class-map match-all VoiceC
match dscp af31
class-map match-all Data
match access-group 101
!
!
policy-map CBWFQ
class VoiceB
priority percent 45
class Data
bandwidth percent 20
class VoiceC
bandwidth percent 10
class class-default
fair-queue 128
!
interface Serial0/0 .

encapsulation frame-relay

service-policy output CBWFQ — LLQ cannot be applied to sub interfaces

If you have sub interfaces use this template:
class-map match-all VoiceB
match dscp ef
class-map match-all VoiceC
match dscp af31
class-map match-all Data
match access-group 101
class-map match-all VoiceBearer
!
!
policy-map CBWFQ
class VoiceB
priority percent 45
class Data
bandwidth percent 20
class VoiceC
bandwidth percent 10
class class-default
fair-queue 128
map-class frame-relay LLQ
service-policy output CBWFQ

int s0/0
encapsulation frame-relay
frame-relay traffic-shaping
———– always enable shaping before applying map-class to subinterface
!

int s0/0.101
frame-relay interface-dlci 101
class LLQ

map-class frame-relay LLQ
service-policy output CBWFQ
frame-relay cir 120000
frame-relay mincir 60000

LLQ – Calculating Total bandwidth:
===========================

*** The bandwidth percent allocates bandwidth as a percentage of total bandwidth on link.

*** For a frame-relay PVC ,if minCIR is configured, total bandwidth = mincir
*** For a frame-relay PVC , if minCIR is not configured, total bandwidth = cir/2

*** Default CIR of 56000 bps is applied if no map-class is configured or a map-class with no cir/mincir settings r configured.
Ways to apply LLQ on a FR sub interface:
——————————————

a. Apply it on main interface and disable Traffic shaping and fair queue.

class-map match-all VoiceB
match dscp ef
class-map match-all VoiceC
match dscp af31
class-map match-all Data
match access-group 101
class-map match-all VoiceBearer
!
!
policy-map CBWFQ
class VoiceB
priority percent 45
class Data
bandwidth percent 20
class VoiceC
bandwidth percent 10
class class-default
fair-queue 128

int s0/0
no frame-relay traffic-shaping
no fair-queue
service-policy output CBWFQ
max-reserved-bandwidth 75 —- this is default. YOu may change this. This command is not supported with FR subinterfaces.

b. Apply on sub interface (point to point) using a map-class directly on the sub int. Enable TS on main interface.

class-map match-all VoiceB
match dscp ef
class-map match-all VoiceC
match dscp af31
class-map match-all Data
match access-group 101
class-map match-all VoiceBearer
!
!
policy-map CBWFQ
class VoiceB
priority percent 45
class Data
bandwidth percent 20
class VoiceC
bandwidth percent 10
class class-default
fair-queue 128
map-class frame-relay LLQ
service-policy output CBWFQ
frame-relay cir 120000
frame-relay mincir 60000

int s0/0
frame-relay traffic-shaping

int s0/0.1 p
frame-relay map-class LLQ
c. Apply at VC level (say point to point or PMP) using a map-class directly on the VC. Enable TS on main interface.

class-map match-all VoiceB
match dscp ef
class-map match-all VoiceC
match dscp af31
class-map match-all Data
match access-group 101
class-map match-all VoiceBearer
!
!
policy-map CBWFQ
class VoiceB
priority percent 45
class Data
bandwidth percent 20
class VoiceC
bandwidth percent 10
class class-default
fair-queue 128

map-class frame-relay LLQ
service-policy output CBWFQ
frame-relay cir 120000
frame-relay mincir 60000

int s0/0
frame-relay traffic-shaping

int s0/0.1 m
frame-relay interface-dlci 101
class LLQ
frame-relay interface-dlci 102
class LLQ

Configuring FRTS
——————–

CIR = Bc/Tc (set it to 95% of the actual link speed)

If the link speed is a full T1 (1,544,000), then set the CIR to 1466800

map-class frame-relay test
frame-relay cir 64000 — set to actual cir.
no frame-relay adaptive-shaping becn
frame-relay bc 1000 — keep this low so that Tc is low. (tc = 10ms)
frame-relay be 0

int s0/0
frame-relay traffic-shaping
int s0/0.1
frame-relay interface dlci
class test

Traffic shaping parameters for Voice

For data Bc = CIR / 8, tc – 125ms
For Voice Bc = CIR/100 tc – 10ms
map-class frame-relay FRTS_Site3
frame-relay cir 768000
frame-relay bc 7680
frame-relay be 0
frame-relay mincir 768000
frame-relay fragment 1000
frame-relay fair-queue
map-class frame-relay FRTS_Site2
frame-relay cir 256000
frame-relay bc 2560
frame-relay be 0
frame-relay mincir 256000
frame-relay fragment 320
frame-relay fair-queue

FRF 12 fragmentation:
====================

FRF12 fragments all packets above the specified size. Specify a size greater than voice packet).
Voice packets wont be fragmented. Long data packets get fragmented. Voice packets will be interleaved
between fragmented data packets…

Default fragment size – 53 bytes
g711 160 bytes (voice payload)
g729 20 bytes (voice payload)

Total size of IP header (IP/UDP/RTP) – (20/8/12)
Total g711 packet size = 160 + 40 = 200 bytes
Total g729 packet size = 20 + 40 = 60 bytes

Set frame-relay fragment > 200 bytes (say 220 bytes)

map-class frame-relay test
frame-relay fragment <bytes>

RTP header compression for frame interfaces:
——————————————-

int s0/0.1
frame-relay ip rtp header-compression
## all outgoing is compressed

frame-relay ip rtp header-compression passive
## all outgoing is compressed only if incoming is compressed. Dont give passive option on both ends.
frame-relay ip rtp header-compression iphc-format
## enables TCP headre and RTP header compression
ip rtp header-compression ietf-format

Calculating fragment size using serialization delay

56kbps 70
64 kbps 80 bytes
128 160
256 320
512 640
768 960

Comments
  1. Selt says:

    This ‘CIR’ thing might be very confusing since you mentioned for CIR = “set it to 95% of the actual link speed” and then you gave example for voice TS where your CIR is set to 768000 (where that by no means can be 95% of the link speed but actual link speed, if at all).
    So, confusion comes in terms of ‘link speed’ and in terms of voice TS config.
    Are you trying to say that when configuring voice TS, one should not set CIR to 95% of link speed?
    then again, what is a link speed?
    So, QoS topic requires to be more consistent.
    I.e.:
    QoS SRND states this:
    Recommendation: Set the CIR to 95 percent of the PVC contracted speed.

    So, this is NOT a link speed, right?
    This is PVC contracted speed, which is actually CIR.
    So, recommendation is that if you contract CIR with provider, when configuring your router, you should consider 95% of that actual CIR contracted value as your base point for QoS (while, btw, you should still consider actual CIR value for fragmentation, when setting fragment size)

  2. Selt says:

    in above comment, I wasn’t maybe clear enough:
    PVC Contracted speed is considered PVC Speed in QoS SRND, where in fact actual port speed might be completely different (but of course, always at least equal or higher than PVC speed) since under one port you can have multiple PVCs.

    ah, yeah, then also you need to be careful with ‘percent’ commands as they will actually be calculated based on the interface bandwidth, which is not CIR but however, it will come to the same point since if requirement is in percents as well then it doesn’t matter. However, if you need to convert your real values to percents, then you need to use given value against your 95%CIR value and then convert that to percentage value of that 95%CIR value… :)))
    in example: your PVC speed is 768kbps, then you will take 95% of that when configuring CIR value under FR which is 729,600 bps.
    However, your port speed can still be full T1.
    then, if you need to set 128kbps for voice part but you want to configure that with percentage command, you will actually have the situation that by default only 75% of the bandwith is used for the calculation, so the 100% of the percent configurable value corresponds to actual 75% of the available bandwith (which is full T1, so 75% of T1 is taken as 100% for the BW distribution via bandwith percent command).
    However, that’s what is going to happen if you forget to set your bandwith on interface. But you can set bandiwth for interface to be your actual CIR value and then you are good to go 😉

  3. Adhering to simple, (Google PageRank )?For healing wounds, and nuance Do.Webs mit der, actual birth This.Online education will good review of pertefctmatch, Keep them even RF hash on.Sourcing firms always, according to effectiveness.,

  4. Young Money says:

    Cool blog you have here. I just heard that new Curren$y track and your site came up.

Leave a comment