voip over fr Qos

如今voip大行其道, wan 管理中的Qos变得非常重要。工作中经常遇到相关设置,从cisco找了一篇资料研究一下,cisco的config解释非常清楚,很有教学意义
version 12.2
service timestamps debug datetime msec
service timestamps log uptime
no service password-encryption
!
hostname FR
!
enable password cisco
!
username ATM password 0 cisco
voice-card 0
dspfarm
!
ip subnet-zero
!
!
!
!
access-list 105 permit ip any any dscp ef 1
access-list 105 permit udp any any  range 16384 32767
access-list 105 permit ip any any precedence critical
!
class-map match-all voice 2
match access-group 105
!


!--- 1 Specifies that all traffic with Differentiated
!---
Services Code Point (DSCP) set to 40 falls into this access-list.
!--- 2 This class-map command defines a class of traffic called "voice".
!        
!
policy-map VOIP 3
  class voice 4
    priority 48 5
  class class-default 6
   fair-queue 7

!--- 3 This policy-map command defines a policy for LLQ called "VoIP" and
!---
4 maps the "voice" class to the "VoIP" policy.
!---
5 Defines the amount of bandwidth reserved for the priority queue.
!---
6 The default class is also mapped to this policy. 
!---
7 Specifies that all other traffic is served in the WFQ.

!--- Note: Although it is possible to queue various types of
!--- real-time traffic to the priority queue, !--- Cisco recommends that you direct only voice traffic !--- to it. Real-time traffic such as video or voice !--- could introduce variations in delay. Please note voice and !--- video should not be combined in the same PVC.
!--- (the priority queue is a First In First Out (FIFO)
!--- queue). Voice traffic requires that delay be
!--- nonvariable in order to avoid jitter.

!--- Note: The sum of the values for priority and
!--- bandwidth statements needs to be less
!--- than or equal to 75% of the link bandwidth.
!--- Otherwise service-policy cannot be
!--- assigned to the link. When configuring VoIP over a
!--- 64 Kbps link to support two
!--- voice calls, it is common to allocate more than 75%
!--- (48 Kbps) of the link bandwidth to
!--- the priority queue. In such cases, you can use the command
!--- max-reserved-bandwidth <#%> to raise
!--- available bandwidth to a value more than 75%.


!
!
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
ip address 10.1.1.2 255.255.255.0
!
!
interface FastEthernet0/0
ip address 172.17.111.16 255.255.255.224
duplex auto
speed auto
!
interface Serial0/0
no ip address
encapsulation frame-relay IETF
no ip route-cache
no ip mroute-cache
frame-relay traffic-shaping
!
interface Serial0/0.1 point-to-point 18
no ip route-cache
no ip mroute-cache
frame-relay interface-dlci 16 ppp Virtual-Template1 19
  class mlp 20

!--- 19 Select the frame relay interface to be
!--- associated with the virtual interface. The
!--- virtual template could equally have been associated
!--- with the physical interface.
!--- 20 Associates the virtual template interface
!--- defined in
8 below with a Frame Relay DLCI.
!--- 21 Associates a Frame Relay map class with a DLCI.
!
interface Virtual-Template1 8
bandwidth 64 9
ip unnumbered loopback0
ip rtp header-compression 9b
no ip route-cache
load-interval 30
max-reserved-bandwidth 99
service-policy output VOIP 10
ppp multilink 11
ppp multilink fragment-delay 10 12
ppp multilink interleave 13
!

!--- 8 The interface command creates a virtual
!--- template called Virtual-Template1.
!---
9 A bandwidth of 64 Kbps is assigned to this
!--- template interface. This bandwidth is used
!--- by Cisco IOS to calculate the data fragement size as noted in
13 below.

!---
9b cRTP is supported in an ATM/Frame Relay Interworking
!--- environment. It requires Cisco IOS Software Release 12.2(2)T on the
!--- ATM router.

!---
10 The VoIP policy created earlier is assigned
!--- to this interface in the outbound direction.

!---
11 PPP multilink is enabled and the
!---
12 maximum delay per segment is specified. This bandwidth is  
!--- used by IOS to calculate the data fragement size as noted in
!--- 13 below.

!---
13 Interleaving of PPP segments is enabled allowing
!--- voice packets to be expedited. Voice 
!--- packets need only wait behind a single segment of
!--- a previously queued data packet
(for example, 10 ms
!--- delay) rather than wait until the end of the
!--- entire data packet.
IOS calculates the 
!--- data fragment size using the following formula:
!--- fragment size = delay x bandwidth/8
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.17.111.1
no ip http server
ip pim bidir-enable
!
!
!
map-class frame-relay mlp
14
no frame-relay adaptive-shaping 15
frame-relay cir 64000 16
frame-relay bc 640 17
frame-relay be 0 18 !--- 14 A map class called mlp is created. !--- 15 Adaptive shaping is disabled. We do not !--- want to exceed CIR and have voice packets !--- possibly queued within the Frame Relay network. !--- Waiting for a BECN to resolve this !--- situation could result in poor voice quality. !--- 16 This command forces the router to transmit !--- at the desired CIR rate rather than line !--- rate for the port. !--- 17 Configure the Bc value to force the desired !--- Tc (shaping interval) value is 10 ms. !--- The following formula should be used to determine !--- the Bc value to use: Tc = Bc/CIR. A !--- smaller Tc value will reduce the interval a voice !--- packet will have to wait to be sent. !--- 18 The Be value should be set to zero to avoid !--- voice being sent as part of a burst !--- that is not guaranteed by the Frame Relay network.
!
call rsvp-sync
!
voice-port 1/0/0
!
voice-port 1/0/1
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
dial-peer voice 123 voip
destination-pattern 123
session target ipv4:10.1.1.1
ip qos dscp cs5 media
ip qos dscp cs5 signaling
no vad
!
dial-peer voice 456 pots
destination-pattern 456
port 1/0/0
!
!
line con 0
line aux 0
line vty 0 4
exec-timeout 0 0
password cisco
login
!
!
end

你可能感兴趣的:(over,voip,休闲,qos,FR)