FortiWLC – Configuring Codec Rules

Configuring Codec Rules

Codec rules are configurable and can be specified with the commands in this section.

If your SIP phones support “ptime” then you will not need to configure any codec rules. Otherwise, you should configure QoS rules and ensure the rule you set is based on the packetization/sample rate that the phone uses.

The SIP ptime attribute is an optional part of the SIP Specification. It allows a SIP media device to advertise, in milliseconds, the packetization rate of the RTP media stream. For example, if ptime is set to the value “20” the SIP device sends 1 RTP packet to the other party every 20 milliseconds. With this specification, the Wireless LAN System can accurately reserve QoS bandwidth based on the Codec and Packetization rate.

The following is a sample of the “ptime” attribute included as part of an SDP media attribute:

m=audio 62986 RTP/AVP 0  a=rtpmap:0 PCMU/8000 a=ptime:20

If the ptime attribute is not present when the media is negotiated in SDP between the SIP devices, the Wireless LAN System uses the default value of the codec type specified with the qoscodec command.

The proper packetization rate must be configured to match the actual media traffic or the QoS reservation will be inaccurate. A spreadsheet, qoscodec_parameters.xls, is available from the Customer Support FTP site that can help you to determine the correct values for the relevant parameters. Please contact Customer Support for details and access.

To configure QoS Codec rules, you need to enter Codec configuration mode. To do this, follow these steps:

Configuring Codec Rules

Command Purpose
configure terminal Enter global configuration mode.
qoscodec rule-id codec <codec-type>  qosprotocol {H323v1|sip} tokenbucketrate tbr maxdatagramsize maxdg minpolicedunit minpol samplerate sr Enter QoS Codec configuration for the specified rule ID. Use show qoscodec to obtain a list of rule IDs. The following are the required parameters:

codec. Enter the Codec type after at the Codec keyword. The acceptable Codec types are given below.

qosprotocol. The QoS protocol. This can be one of the following:

H323 (H.323); sip (SIP – Session Initiation Protocol) tokenbucketrate. Token bucket rate, from 0 to 1000 Kbps or 164 Mbps, depending on the box checked.

maxdatagramsize. Maximum datagram size. From 0 to 1,500 bytes. minpolicedunit. Minimum policed unit. From 0 to 1,500 bytes. samplerate. Sample rate. From 0 to 200 packets per second.

… commands … Enter the QoS CODEC configuration commands here.
end Return to privileged EXEC mode.
copy running-config startup-config This is an optional step to save your entries in the configuration file.

The Codec type can be one of the following

TABLE 28: QoS Codec Type

Type Description
1016 1016 Audio: Payload Type 1, Bit Rate 16 Kbps
default Contains the default TSpec/ RSpec for unknown codecs or codecs for which there is no entry in the codec translation table
dv14 DV14 Audio: Payload Type 5, Bit Rate 32 Kbps
dv14.2 DV14.2 Audio: Payload Type 6, Bit Rate 64Kbps
g711a G711 Audio: Payload Type 8, G.711, A-law, Bit Rate 64 Kbps

Configuring Codec Rules

TABLE 28: QoS Codec Type

Type Description
g711u G711 Audio: Payload Type 0, G.711, U-law, Bit Rate 64 Kbps
g721 G721 Audio: Payload Type 2, Bit Rate 32 Kbps
g722 Audio: Payload Type 9, Bit Rate 64 Kbps, 7KHz
g7221 G7221 Audio: Payload Type *, Bit-Rate 24 Kbps, 16KHz
g7221-32 G7221 Audio: Payload Type *, Bit-Rate 32 Kbps, 16KHz
g723.1 G7231 Audio: Payload Type 4, G.723.1, Bit Rate 6.3Kbps
g728 G728 Audio: Payload Type 15, Bit Rate 16Kbps
g729 G729 Audio: Payload Type 16, Bit Rate 8Kbps
g7red Proprietary MSN Codec Audio: Payload Type *
gsm GSM Audio: Payload Type 3, Bit Rate 13Kbps
h261 H.261 Video
h263 H.263 Video
lpc IPC Audio: Payload Type 7, Bit Rate 2.4 Kbps
mpa MPA Audio: Payload Type 14, Bit Rate 32 Kbps
siren Proprietary MSN Audio: Payload Type *, Bit Rate 16Kbps, 16KHz

The following commands are used in the QoS Codec configuration mode:

TABLE 29: QoS CODEC Configuration Mode Commands

Command Purpose
tokenbucketsize size Token bucket size in bytes. From 0 to 16,000 bytes. Defaults to 8.
peakrate rate Traffic spec peak rate. From 0 to 1,000,000 bytes/second. Defaults to 0.
rspecrate rate Reservation spec rate. From 0 to 1,000,000 bytes/second. Defaults to 0.
rspecslack slack Reservation spec slack. From 0 to 1,000,000 microseconds. Defaults to 0.

Configuring Codec Rules

This entry was posted in Administration Guides, FortiWLC on by .

About Mike

Michael Pruett, CISSP has a wide range of cyber-security and network engineering expertise. The plethora of vendors that resell hardware but have zero engineering knowledge resulting in the wrong hardware or configuration being deployed is a major pet peeve of Michael's. This site was started in an effort to spread information while providing the option of quality consulting services at a much lower price than Fortinet Professional Services. Owns PacketLlama.Com (Fortinet Hardware Sales) and Office Of The CISO, LLC (Cybersecurity consulting firm).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.