Sunday, February 7, 2010

Configuring LLQ and LFI on a Router

LFI

Link fragmentation and interleaving, why do we need it cisco recommends that for links equal to or lower than 768 kbps needs fragmentation and interleaving for voice packets, links slower than 768 kbps consume higher serialization delay when putting a voice packet, which is inherently large, on the wire. this is recommended for higher sped links.


#access-list 102 permit udp any nay range 16384 32767
#access-list 103 permit tcp any eq 1720 any
#access-list 103 permit tcp any any eq 1720

#class-map match-all VOICE-SIGNALING
#match access-group 103
#class-map match-all VOICE-TRAFFIC
#match access-group 102

#policy-map VOICE-POLICY
#class VOICE-TRAFFIC
#priority 48
#class VOICE-SIGNALING
#bandwidth 8
#class class-default
#fair-queue

#interface multilink1
#ip address 172.22.130.1 255.255.255.252
#ip tcp header-compression iphc-format
#ip rtp header-compression iphc-format

#serivce policy output VOICE-POLICY

#ppp multilink
#ppp multilink fragment-delay
#ppp multilink interleave
#multilink-group 1

#interface serial 0/0
#multilink-group 1

Config description,



#access-list 102 permit udp any nay range 16384 32767
#access-list 103 permit tcp any eq 1720 any
#access-list 103 permit tcp any any eq 1720

in the first statement 102 we are matching UDP ports 16384 to 32767  which are responsible for carrying voice RTP payload.
in the second & third statement we are matching TCP voice signaling port 1720

#class-map match-all VOICE-SIGNALING
#match access-group 103
#class-map match-all VOICE-TRAFFIC
#match access-group 102


Relevant class maps, against configured ACL's


#policy-map VOICE-POLICY
#class VOICE-TRAFFIC
#priority 48
#class VOICE-SIGNALING
#bandwidth 8
#class class-default
#fair-queue

Policy maps are configured with relevant policies, here we have configured 48 kbps of priority bandwidth for voice traffic which is merely a single call so you should configure it according to your situation, one thing very important here the VOICE-TRAFFIC will get 48 kbps of priority bandwidth traffic exceding that will be policed, on the contrary the bandwidth command reserves minimum 8 kbps of bandwidth for VOICE-SIGNALING and it can exceed its threshold of 8 kbps whereas priority cant.

Every thing else will be treated by Weighted fair queuing (fair-queue) which penalizes high talkers i.e. sessions consuming higher bandwidth as compared to low talkers sessions consuming lower bandwidth



#interface multilink1
#ip address 172.22.130.1 255.255.255.252
#ip tcp header-compression iphc-format
#ip rtp header-compression iphc-format

We have to create interface multilink1 to enable LFI.
Then the header compressions will compress the headers accordingly.

#serivce policy output VOICE-POLICY

applies the LLQ to this interface, to be used along with LFI.


#ppp multilink
#ppp multilink fragment-delay 10
#ppp multilink interleave
#multilink-group 1

#interface serial 0/0
#multilink-group 1

the first statement enables multilink.

#ppp multilink fragment-delay 10, statement enables delay no more than 10 ms, on a 56 k link a 1500 Bytes packet takes 215 mSec to be put on the wire which is to much, we need delay something b/w 150-200 msec so fragmentation will definately help.

#ppp multilink interleave, will enable interleaving so the packets that were chip choped by fragmentation are treated voice packets are sent first always.

Then the interleaving and fragmentation is applied on the interface

No comments: