Detailed description of IP QoS stream classification methods

Source: Internet
Author: User
Tags rfc

I recently read an article about QOS, which is good.

========================================================== ===

 

Detailed description of IP QoS stream classification methods
[Url] www.net130.com [/url] Date: 2007-11-18 views: 3337
Source: blog.sina.com.cn/stimwooi discussed with my colleagues the priority of qostraffic and resolution traffic. Later I found this article. . In RFC 791, the TOS-bit IP precedence is divided into eight priorities and can be applied to stream classification. A larger value indicates a higher priority.

0 1 2 3 & nbsp; 4 5 6 7
+ ----- +
| Precedence | d | T | r | 0 | 0 |
+ ----- +

111-Network Control
110-Internetwork Control
101-critic/ECP
100-Flash override
011-flash
010-immediate
001-priority
000-routine

However, during actual deployment in the network, these eight priorities are far from enough, so the TOS is redefined in RFC 2474. Define the first six digits as dscp, and the last two digits are retained.

0 1 2 3 4 5 6 7
+ --- +
| Dscp | Cu |
+ --- +

Dscp: Differentiated Services codepoin

Cu: currently unused

However, because dscp and IP precedence coexist, some compatibility problems exist, and dscp is less readable. For example, dscp 43 does not know what values correspond to IP precedence, therefore, dscp is further classified. Dscp is divided into four categories.

Class selector (CS) Aaa 000
Expedited for warding (EF) 101 110
Assured Forwarding (AF) Aaa bb0
Default (be) 000

1. The default dscp is 000 000.
2. The last three digits of CS dscp are 0, that is to say, CS still follows the IP precedence, but CS defines dscp = IP precedence * 8, for example, CS6 = 6*8 = 48, cs7 = 7*8 = 56
3. EF indicates accelerated forwarding. It can also be viewed as an IP address precedence of 5, which is a relatively high priority with a value of 101110 (46 ), however, the RFC does not define why the EF value is 46.
4. AF is divided into two parts: Part A and Part B. If Part A is 3 bits, it can still correspond to IP precedence. If Part B is 2 bits, it indicates discarding and three discarding priorities, it can be applied to red or wred. Currently, Part A has a maximum value of 8 for three bits, but currently only 1 ~ 4. In order to quickly convert to the 10th order, you can use the following method to first divide the 10th order value into an integer (AF), and convert the remainder to a binary value. The first two digits indicate the discard priority, for example, if the remainder of 34/8 = 4 is and the binary value is 010, 34 indicates that af4 discards the datagram whose priority is middle.

If you arrange cs ef af and be, you can find an interesting phenomenon, as shown in the following table. This table is the queue with the most application in reality. According to the precedence priority of the IP address, cs7 is ranked at the highest order to be the lowest. Generally, the usage of these queues depends on the Usage field of the table.

 
Corresponding service IPv4 priority/EXP/802.1 pdscp (Binary) dscp (decimal) TOS (hexadecimal) Application
Bedomaininternet
AF1 green110101028leased line
Af2 green2100101848iptv VOD
Af3 green3110102668iptv Broadcast
Af4 green41000103488ngn/3G singaling
Ef510111046b8ngn/3G voice
Cs661110948c0protocol
Cs7711100056e0protocol

1. CS6 and cs7 are used for protocol packets by default. For example, OSPF packets and BGP packets should be guaranteed first, Because protocol interruption may occur if these packets cannot be received. It is also the highest priority message in most manufacturers' hardware queues.
2. EF is used to carry voice traffic. Because voice requires low latency, low jitter, and low packet loss rate, it is the most important packet after Protocol packets.
3. af4 is used to carry the signaling traffic of speech. Here you may wonder why the voice here takes precedence over the signaling traffic? In fact, the signaling here is the call control of the phone, you can endure waiting for several seconds during the connection, but it is absolutely not allowed to interrupt the call. Therefore, voice must take precedence over signaling.
4. af3 can be used to carry the live video traffic of IPTV. the live video has a strong sense of continuity and high throughput.
5. af4 can be used to carry VOD traffic. Compared with live video VOD, af4 requires a low latency or buffer.
6. af5 can carry leased line services that are not very important, because compared with IPTV and voice, IPTV and voice are the most critical services of carriers and must be guaranteed first. Of course, for banks and other businesses that require diamond-level assurance, af4 or even EF can be arranged.
7. The least important business is Internet services, which can be transmitted in the be model.

In the hardware queue, how does one ensure that Protocol packets (data in CS6 and cs7) are transmitted preferentially? When creating a router, data in CS6 and cs7 is usually processed with PQ, which means that the data in the two queues must be transmitted with priority no matter whether or not the following data exists. Other ef-to-AF1 queues use wfq to ensure that all queues can receive bandwidth for transmission.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.