Classificando Voip Com DSCP
Classificando Voip Com DSCP
for QoS
Feature History
Release Modification
12.2(2)XB This feature was introduced.
12.2(2)T This feature was integrated into Cisco IOS Release 12.2(2)T.
This document describes the Classifying VoIP Signaling and Media with DSCP for QoS feature in Cisco
IOS Release 12.2(2)T. It includes the following sections:
• Feature Overview, page 1
• Supported Platforms, page 4
• Supported Standards, MIBs, and RFCs, page 5
• Prerequisites, page 6
• Configuration Tasks, page 6
• Configuration Examples, page 7
• Command Reference, page 9
• Glossary, page 12
Feature Overview
The ip precedence command in dial-peer configuration mode, was originally designed to allow the
prioritizing of H.323 traffic and the priority used, typically higher than that of IP data traffic. There was
no means, however, for the end user to configure prioritization of H.245, H.225, and SIP signaling
packets, which resulted in a delay when a call was set up over a congested network.
In order to provide finer tuning of priorities, the ip precedence command has been replaced by the ip
qos dscp command. If a non zero value is specified for a particular type of traffic stream, this value is
stored in the DSCP (Differentiated Services Code Point) before the gateway sends the packet out its
WAN interface.
DS Field Definition
A replacement header field, called the DS field, is defined by Differentiated Services. The DS field
supersedes the existing definitions of the IPv4 type of service (ToS) octet (RFC 791) and the IPv6 traffic
class octet. Six bits of the DS field are used as the DSCP to select the Per Hop Behavior (PHB) at each
interface. A currently unused (CU) 2-bit field is reserved for explicit congestion notification (ECN). The
value of the CU bits is ignored by DS-compliant interfaces when determining the PHB to apply to a
received packet.
Per-Hop Behaviors
RFC 2475 defines PHB as the externally observable forwarding behavior applied at a
DiffServ-compliant node to a DiffServ Behavior Aggregate (BA).
With the ability of the system to mark packets according to DSCP setting, collections of packets with
the same DSCP setting and sent in a particular direction can be grouped into a BA. Packets from multiple
sources or applications can belong to the same BA.
In other words, a PHB refers to the packet scheduling, queueing, policing, or shaping behavior of a node
on any given packet belonging to a BA, as configured by a service level agreement (SLA) or a policy
map.
The following sections describe the four available standard PHBs:
• Default PHB (as defined in RFC 2474).
• Class-Selector PHB (as defined in RFC 2474).
• Assured Forwarding (AFny) PHB (as defined in RFC 2597).
• Expedited Forwarding (EF) PHB (as defined in RFC 2598).
Default PHB
The default PHB essentially specifies that a packet marked with a DSCP value of 000000
(recommended) receives the traditional best-effort service from a DS-compliant node (that is, a network
node that complies with all of the core DiffServ requirements). Also, if a packet arrives at a
DS-compliant node, and the DSCP value is not mapped to any other PHB, the packet will get mapped to
the default PHB.
Class-Selector PHB
To preserve backward-compatibility with any IP Precedence scheme currently in use on the network,
DiffServ has defined a DSCP value in the form xxx000, where x is either 0 or 1. These DSCP values are
called Class-Selector Code Points. (The DSCP value for a packet with default PHB 000000 is also called
the Class-Selector Code Point.)
The PHB associated with a Class-Selector Code Point is a Class-Selector PHB. These Class-Selector
PHBs retain most of the forwarding behavior as nodes that implement IP Precedence-based classification
and forwarding.
For example, packets with a DSCP value of 110000 (the equivalent of the IP Precedence-based value of
110) have preferential forwarding treatment (for scheduling, queueing, and so on), as compared to
packets with a DSCP value of 100000 (the equivalent of the IP Precedence-based value of 100). These
Class-Selector PHBs ensure that DS-compliant nodes can coexist with IP Precedence-based nodes.
Assured Forwarding PHB is nearly equivalent to Controlled Load Service available in the integrated
services model. AFny PHB defines a method by which BAs can be given different forwarding
assurances.
For example, network traffic can be divided into the following classes:
• Gold: Traffic in this category is allocated 50 percent of the available bandwidth.
• Silver: Traffic in this category is allocated 30 percent of the available bandwidth.
• Bronze: Traffic in this category is allocated 20 percent of the available bandwidth.
Further, the AFny PHB defines four AF classes: AF1, AF2, AF3, and AF4. Each class is assigned a
specific amount of buffer space and interface bandwidth, according to the SLA with the service provider
or policy map.
Within each AF class, you can specify three drop precedence (dP) values: 1, 2, and 3. Assured
Forwarding PHB can be expressed as shown in the following example: AFny. In this example, n
represents the AF class number (1, 2, or 3) and y represents the dP value (1, 2, or 3) within the AFn class.
In instances of network traffic congestion, if packets in a particular AF class (for example, AF1) need to
be dropped, packets in the AF1 class will be dropped according to the following guideline:
dP(AFny) >= dP(AFnz) >= dP(AFnx)
where dP (AFny) is the probability that packets of the AFny class will be dropped. In other words, y
denotes the dP within an AFn class.
In the following example, packets in the AF13 class will be dropped before packets in the AF12 class,
which in turn will be dropped before packets in the AF11 class:
dP(AF13) >= dP (AF12) >= dP(AF11)
The dP method penalizes traffic flows within a particular BA that exceed the assigned bandwidth.
Packets on these offending flows could be re-marked by a policer to a higher drop precedence.
An AFx class can be denoted by the DSCP value, xyzab0, where xyz can be 001, 010, 011, or 100, and
ab represents the dP value.
Table 1 lists the DSCP value and corresponding dP value for each AF PHB class.
Table 1 DSCP Values and Corresponding Drop Precedence Values for Each AF PHB Class
Resource Reservation Protocol (RSVP), a component of the integrated services model, provides a
Guaranteed Bandwidth Service. Applications such as Voice over IP (VoIP), video, and online trading
programs require this kind of robust service. The EF PHB, a key ingredient of DiffServ, supplies this
kind of robust service by providing low loss, low latency, low jitter, and assured bandwidth service.
EF can be implemented using priority queueing (PQ), along with rate-limiting on the class (or BA).
When implemented in a DiffServ network, EF PHB provides a virtual leased line, or premium service.
For optimal efficiency, however, EF PHB should be reserved for only the most critical applications
because, in instances of traffic congestion, it is not feasible to treat all or most traffic as high priority.
EF PHB is ideally suited for applications such as VoIP that require low bandwidth, guaranteed
bandwidth, low delay, and low jitter.
Benefits
This DS-compliant CLI provides a means by which you can specify different priority levels for voice
payload traffic and signaling traffic at the originating gateway.
Restrictions
The default DSCP for voice is ef codepoint 101110 (RFC 2598) and the default DSCP for signaling is
af31 codepoint 011010 (RFC 2597). Preferred settings are required for each type of traffic stream.
Related Documents
• Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2
• Cisco IOS Quality of Service Solutions Command Reference, Release 12.2
• Implementing Quality of Service Policies with DSCP
Supported Platforms
• Cisco IAD2400 series
MIBs
None
To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules,
go to the Cisco MIB website on Cisco.com at the following URL:
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
RFCs
• RFC 2474, Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers
• RFC 2475, An Architecture for Differentiated Services
• RFC 2597, Assured Forwarding PHB Group
• RFC 2598, An Expedited Forwarding PHB
Prerequisites
Cisco IOS Release 12.2(2)XB or 12.2(2)T or a later release must be running.
Configuration Tasks
See the following sections for configuration tasks for the Classifying VoIP Signaling and Media with
Differentiated Services Code Point for QoS feature. Each task in the list is identified as either required
or optional.
• Configuring IP DSCP (Optional)
• Verifying IP DSCP Configuration (Optional)
Configuring IP DSCP
To configure IP DSCP precedence, use the following commands:
Command Purpose
Step 1 Router(config)# dial-peer voice tag voip Enters dial-peer configuration mode and specifies VoIP voice
encapsulation.
Step 2 Router(config-dial-peer)# ip qos dscp Specifies IP DSCP.
[number | set-af | set-cs | default | ef]
[media | signaling] The optional keywords and arguments are as follows:
• number—DSCP value. Valid entries are from 0 to 63.
• set-af—Sets DSCP to assured forwarding bit pattern. The
recommended value is af31, which sets the DSCP to assured
forwarding (af31) bit pattern 011010. For a complete list of
acceptable values, see the "Command Reference" section.
• set-cs—Sets DSCP to class-selector code point. For a
complete list of acceptable values, see the "Command
Reference" section.
• default—Sets DSCP to default bit pattern 000000.
• ef—Sets DSCP to expedited forwarding bit pattern 101110.
• media—Applies DSCP to media payload packets.
• signaling—Applies DSCP to signaling packets.
Configuration Examples
The following displays the screen output using the show running-config command.
Router# show running-config
Building configuration...
no ip address
no ip route-cache
no ip mroute-cache
!
ip classless
ip route 0.0.0.0 172.19.169.65
no ip http server
!
!
!
call rsvp-sync
!
mgcp
!
mgcp profile default
!
dial-peer voice 1 voip
ip qos dscp cs1 media
!
dial-peer voice 2 voip
!
!
line con 0
password #1writer
line 1 48
transport output lat pad telnet rlogin udptn v120 lapb-ta
line aux 0
line vty 0 4
password #
login
!
end
Command Reference
This section documents the new ip qos dscp command. All other commands used with this feature are
documented in the Cisco IOS Release 12.2 command reference publications.
ip qos dscp
To set the DSCP for the quality of service, use the ip qos dscp command in dial-peer configuration mode.
To disable DSCP, use the no form of this command.
Syntax Description number (Optional) DSCP value. Valid entries are from 0 to 63.
set-af (Optional) Sets DSCP to assured forwarding bit pattern. Acceptable values
are as follows:
• af11—bit pattern 001010
• af12—bit pattern 001100
• af13—bit pattern 001110
• af21—bit pattern 010010
• af22—bit pattern 010100
• af23—bit pattern 010110
• af31—bit pattern 011010
• af32—bit pattern 011100
• af33—bit pattern 011110
• af41—bit pattern 100010
• af42—bit pattern 100100
• af43—bit pattern 100110
set-cs (Optional) Sets DSCP to class-selector code-point. Acceptable values are as
follows:
• cs1—codepoint 1 (precedence 1)
• cs2—codepoint 2 (precedence 2)
• cs3—codepoint 3 (precedence 3)
• cs4—codepoint 4 (precedence 4)
• cs5—codepoint 5 (precedence 5)
• cs6—codepoint 6 (precedence 6)
• cs7—codepoint 7 (precedence 7)
default (Optional) Sets DSCP to default bit pattern 000000.
ef (Optional) Sets DSCP to expedited forwarding bit pattern 101110.
media (Optional) Applies DSCP to media payload packets.
signaling (Optional) Applies DSCP to signaling packets.
Usage Guidelines To configure voice and signaling traffic priorities, use the ip qos dscp command.
Recommended values are ip qos dscp ef media and ip qos dscp af31 signaling.
Examples The following example specifies that DSCP is set to precedence 1 and is applied to media payload
packets.
dial-peer voice 1 voip
ip qos dscp cs1 media
Glossary
CLI—command-line interface. An interface that allows the user to interact with the operating system by
entering commands and optional arguments.
DSCP—differentiated services code point. A 6-bit setting in IP packets or source and destination
addresses.
IP—Internet Protocol. Network layer protocol in the TCP/IP stack offering a connectionless
internetwork service. IP provides features for addressing, type-of-service specification, fragmentation
and reassembly, and security. Defined in RFC 791.
QoS—quality of service. Measure of performance for a transmission system that reflects its transmission
quality and service availability.
ToS—type of service. An indication of how an upper-layer protocol requires a lower-layer protocol to
treat its messages.
VoIP—Voice over IP. The capability to carry normal telephony-style voice over an IP-based internet
with POTS-like functionality, reliability, and voice quality. VoIP enables a router to carry voice traffic
(for example, telephone calls and faxes) over an IP network. In VoIP, the DSP segments the voice signal
into frames, which then are coupled in groups of two and stored in voice packets. These voice packets
are transported using IP in compliance with ITU-T specification H.323.
WAN—wide-area network. Data communications network that serves users across a broad geographic
area and often uses transmission devices provided by common carriers. Frame Relay, SMDS, and X.25
are examples of WANs.