Monday 9 November 2009

Testing QoS with Cisco Call Manager and SIP,RTP - How To

This is the practical to this lab: here


Setting up basic IP connectivity:
R1

!
interface FastEthernet0/0
description ToLan
ip address 192.168.10.254 255.255.255.0
duplex auto
speed auto
!
!
interface Serial0/0.123 multipoint
bandwidth 110
ip address 192.168.0.1 255.255.255.0
ip ospf network point-to-multipoint
snmp trap link-status
frame-relay map ip 192.168.0.2 122 broadcast
frame-relay map ip 192.168.0.3 123 broadcast
no frame-relay inverse-arp
!
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 1
network 192.168.0.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 1
!



R2

!
interface FastEthernet0/0
description ToLan
ip address 192.168.10.254 255.255.255.0
duplex auto
speed auto
!
!
interface Serial0/0.123 multipoint
bandwidth 110
ip address 192.168.0.1 255.255.255.0
ip ospf network point-to-multipoint
snmp trap link-status
frame-relay map ip 192.168.0.2 122 broadcast
frame-relay map ip 192.168.0.3 123 broadcast
no frame-relay inverse-arp
!
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 1
network 192.168.0.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 1
!


R3

!
interface FastEthernet0/0
ip address 192.168.3.254 255.255.255.0
duplex auto
speed auto
!
!
interface Serial0/0.321 multipoint
bandwidth 110
ip address 192.168.0.3 255.255.255.0
ip ospf network point-to-multipoint
frame-relay map ip 192.168.0.1 321 broadcast
frame-relay map ip 192.168.0.2 321 broadcast
!
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 3
network 192.168.0.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 3
!


Set up DHCP for Call Manager/TFTP
R1

ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.10.100
ip dhcp excluded-address 192.168.10.254
!
ip dhcp pool POOL1
network 192.168.10.0 255.255.255.0
option 66 ip 192.168.10.100
default-router 192.168.10.254
!


(Pretty much the same on each router)


Now the important Stuff - QoS for SIP and RTP...

First the ACLs:

!
!Control is for SIP messages
ip access-list extended VOIP-CONTROL-ACL
permit tcp any any eq 5060
permit tcp any eq 5060 any
permit tcp any any eq 6970
permit tcp any eq 6970 any
! RTP is for the actual voices going down the line
ip access-list extended VOIP-RTP-ACL
permit udp any any eq 5060
permit udp any eq 5060 any
permit udp any any range 16384 32767
permit ip any any dscp ef
!


Now the Class Maps:

!
class-map match-any VOIP-CONTROL-CLASS
match access-group name VOIP-CONTROL-ACL
class-map match-any VOIP-RTP-CLASS
match access-group name VOIP-RTP-ACL
!



Now the Policy Maps:

!
policy-map VOIP
class VOIP-RTP-CLASS
priority 70
class VOIP-CONTROL-CLASS
bandwidth 8
class class-default
fair-queue
!


Map Class - Frame Relay:

!
map-class frame-relay FRAME-CLASS
!Provided by ISP
frame-relay cir 110000
!Set Tc to 10ms or 0.01 sec
frame-relay bc 1100
frame-relay be 0
!If you get a BECN set to this rate
frame-relay mincir 110000
!Remember to place this on both ends
frame-relay fragment 120
!Policy map
service-policy output VOIP
!





A few little extras(needed):

!
interface Serial0/0
bandwidth 400
no ip address
encapsulation frame-relay
frame-relay traffic-shaping
no frame-relay inverse-arp
frame-relay ip rtp header-compression
!
!
interface Serial0/0.123 multipoint
bandwidth 110
ip address 192.168.0.1 255.255.255.0
ip ospf network point-to-multipoint
snmp trap link-status
frame-relay class FRAME-CLASS
frame-relay map ip 192.168.0.2 122 broadcast
frame-relay map ip 192.168.0.3 123 broadcast
no frame-relay inverse-arp
!




Here is a video of the lab set up and me trying to break it!

Testing Quality of Service with Cisco Call Manager,VoIP from Richard Vimeo on Vimeo.







Here are the iPerf options I am using:
Server UDP:

iperf.exe -us -n 128m -i5

Client UDP:

iperf.exe -uc 192.168.2.3 -b256k -n 1G -i5 -d


*Remember if you wish to test DSCP tags try the "-s" options to tag the packets for example: "-s ef"

1 comment:

Pasunoori Hari Prasad said...

hi roggy,
This is hari, and i am facing so much problem with VOIP phones can you plz do the needful. we are using ccm 4.0 and configured all the things in router. QOS also configured on router. still there is a voice packet drops. may i know your mail id such that i can send u the configurations.