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