CoS & DSCP Mapping mechanism

Source: Internet
Author: User
Keywords Port different if or

For Cos and DSCP, just the criteria for categorization, you can set the trust yourself. and Cos and DSCP there is a mapping between the priority of the packet, just identify the different priorities, according to the priority of the package to choose a different queue, different out of the queue of bandwidth resources, congestion when the proportion of discarded. To achieve the goal of quality of service.

The implementation of QoS is based on the DiffServ system of the IETF. DiffServ system stipulates that each transmission message will be classified into different categories in the network, the classification information is contained in the IP packet header, the DIFFSERV system uses the first 6 bits in the TOS (Type of Service) in the IP header to carry the classified information of the message. Of course the classification information can also be carried on the link Shong head. Generally, the classified information that comes with the message is:

The first 3 bits in the 1-frame tag control information, which contains 8 categories of priority information, typically called three bits as user Priority bits.

2 The TOS field in the message header is the first 3 bits, called IP precedence http://www.aliyun.com/zixun/aggregation/9541.html ">value; or the TOS field carried in the IP packet header 6 Bits, called differentiated Services Code Point (DSCP) value.

In a network that follows the DiffServ system, each switch and router adopts the same transmission service strategy for messages containing the same classified information, and adopts different transport service strategies for messages containing different classification information. Message classification information can be given to the host, switch, router or other network device on the network. Class information can be given to messages based on different application strategies or different message contents. The method of identifying the contents of a message to give class information to the message often consumes a lot of processing resources of network equipment, in order to reduce the processing overhead of the backbone network, this type of information is usually used in the network boundary.

Depending on the type of information carried by a packet, a switch or router can provide different transport priorities for a variety of traffic flows, reserve bandwidth for a traffic flow, or discard some of the less important messages, or take other actions, etc. This behavior of these stand-alone devices is called per-hop behavior (per-hop behavior) in the DiffServ system. If all devices on the network provide consistent per-hop behavior, then for the DiffServ system, this network can constitute end-to-end QoS solution.

The following paragraphs will detail the DiffServ-based QoS model provided by this switch.

QoS entry-side actions include classifying, policing, and CSA.

Classifying: Ensure that network traffic flows are divided into data streams identified by DSCP value. The switch then implements a different QoS policy for each data stream based on the DSCP value. For a more detailed description of the classification, see the classifying section.

Policing: The bandwidth used to constrain a stream, depending on the configured Policer, to determine which parts of the stream exceed the restricted transmission bandwidth and pass the result to the next stage of the CSA action. For a more detailed description of policing, see the policing chapter.

CSA: Determines how to handle the policing part of a data flow that is overrun in the action. The possible processing action is to discard the overrun section and mark the overrun portion with a different DSCP value. For a more detailed description of CSA, see the CSA chapter.

QoS exit actions include queueing and scheduling:queueing: Depending on the DSCP value attached to each message in the data flow to determine which output queue to send the message to the port, refer to the Queueing section for a more detailed description of queueing. Scheduling: Determine the manner in which the messages sent to each output queue in the port are handled in more detail about scheduling, see the scheduling section. The following paragraphs describe in detail the actions of each stage of the QoS model.

Classifying

The classifying is classified, and the process is based on the trust strategy or the analysis of the contents of each message to determine the classification of these packets to the DSCP value to represent the data flow, so the core task of classifying action is to determine the DSCP value of the input message. The classification occurs at the port receive input message phase, and when a port is associated with a policy-map that represents the QoS policy, the classification takes effect on that port, and it works on all messages entered from that port.

For general non-IP packets, the switch classifies the message according to the following guidelines:

1 1. If the message itself does not contain QoS information, that is, the second Shong header of the message does not contain user Priority bits, the message's QoS information can be obtained based on the default COS value of the message input port. The default COS value of the port is the same as the userpriority bits of the message, with a value range of 0~7. After the Cos value of the message is obtained, the Cos is converted to a DSCP value based on the COS-TO-DSCP map configured on the switch.

2. If the message itself contains QoS information, the second Shong of the message contains user Priority bits, the Cos value can be obtained directly from the message, and then the COS is converted to a DSCP value based on the COS-TO-DSCP map configured on the switch.

Note that both of the above collation guidelines work only when the QoS trust mode on the port is open. The trust mode of QoS for open ports means that the message QoS information is obtained directly from the message or the input port of the message without analyzing the contents of the message, thereby obtaining the DSCP value.

2 3. If a ACLs collation based on the Mac Access-list extended is used in the policy-map of the port association, then the associated EtherType is matched by extracting the source MAC address of the message, the destination MAC address, and the ACLs domain. To determine the DSCP value of the message. Note that if a port is associated with a policy-map, but the corresponding DSCP value is not set for it, the switch assigns a priority to the message that conforms to this collation according to the default behavior: that is, the priority information contained in the second Shong header of the message or the default priority of the port.

Note that the above three collation criteria may work on one port at a time. In this case, the above three classification guidelines work at the priority level of 3, 2, and 1. That is, according to the ACLs classification, in the case of the classification failure, it is possible to select collation 2, 1, at this time, if the port's QoS trust mode is open, according to the guidelines 2 and 1 directly from the message or from the port to obtain QoS information; If the Port's QoS trust mode shuts down, Then those packets that failed to classify will be given the DSCP default value of 0.

For IP packets, the message can be categorized according to the following criteria:

1 1. The DSCP value is extracted directly from the TOS field of the IP message. The IETF provides the first 6 bits of the TOS field of the IP message as a DSCP value of 0~63, which corresponds to the DSCP value one by one used inside the switch.

2. According to the non-IP message processing, according to the above mentioned non-IP message collation criteria 1, and second, determine the DSCP value of the message.

Note that these collation guidelines only work when the QoS Trust mode of the port is open. The trust mode that opens the QoS of the port means that the DSCP value is obtained by not analyzing the content of the IP message directly from the TOS field of the IP message or by obtaining the QoS information from the input port of the message.

2 3. If a ACLs collation based on IP access-list (extended) is used in the policy-map of the port association, then the port will be extracted by extracting the source IP address of the message, the destination IP address, the Kyoto field, and the fourth layer UDP The port field matches the associated ACLs to determine the DSCP value of the message. Note that if a port is associated with a policy-map, but the corresponding DSCP value is not set for it, the switch assigns a priority to the message that conforms to this collation according to the default behavior: that is, the priority information contained in the second Shong header of the message or the default priority of the port.

As with the non-IP packet classification guidelines, these collations can be applied to a single port at the same time. In this case, the above collation criteria work according to the priority of 3, 2, and 1. That is, according to the ACLs classification, in the case of classification failure, it is possible to select the collation criteria 2, 1; At this time, if the port chooses the QoS trust mode trusted ip-precedence, then guideline 1 works; If the port chooses the QoS trust mode trusted CoS, then guideline 2 Work。

A detailed description of the COS-TO-DSCP map and IP-PRECEDENCE-TO-DSCP map maps mentioned above is often described later.

Policing

The policing action occurs after the data flow classification is completed, which is used to constrain the transmission bandwidth occupied by the data stream being classified. The policing action examines each message in the data stream being categorized, if the packet exceeds the restricted bandwidth allowed by the policer that is acting on the data stream, the packet will be processed for special processing, either to be discarded or to be given another DSCP value.

Policing actions are optional in the QoS processing process. If there is no policing action, the DSCP value of the message in the sorted data stream will not be modified and the message will not be discarded before being sent to the CSA action.

Csa

After the classifying and policing actions are processed, in order to ensure that the corresponding DSCP value of the classified message message can be passed to the next hop device on the network, the QoS information can be written to the message through the CSA Action, and the QoS in the message may be reserved directly by trust way. Information, for example, select the Trust cos to retain the COS information in the tag control information of the 802.1Q header, by default, CSA always converts the DSCP value of the message to the QoS information and writes to the Message Cos field ( For non-IP packets, DSCP fields, or Ip-precedence fields (for IP packets).

Queueing

Queueing action is responsible for sending packets in the data stream to the port of which output queue, sent to the port of the different output queue message will get different levels and the nature of the transport service strategy.

There are 8 output queues on each port, and the DSCP value of the message is converted to the output queue number by using the Dscp-to-cos map and cos-to-queue map two map tables configured on the switch to determine the output queue to which the message should be sent.

Scheduling

The last step of the QoS process when scheduling an action. When the message is sent to different output queues on the port, the switch will use the WRR or SP rotation algorithm to send messages in 8 queues.

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.