Traffic classification and marking


In order to provide different Qos for different services on the Internet, people record the QOS value according to certain fields in the packet header, so that each device in the network can provide different QoS based on this information.

Classification and marking of traffic

Traffic classification and marking are the basis for deploying QoS. The traffic can be classified according to the ACL and the information of the packet itself. Packets can be marked based on DSCP, IP Precedence, 802.1P, MPLS EXP and other information. Among them, 802.1P is aimed at the two-layer network. On the VLAN Tag, the Tag occupies 4 bytes, but only 12 bits are used as the VLAN ID, and the traffic priority occupies 3 bits, which can represent 0-7; MPLS The label, firstly, consists of a 20-bit label, a 1-bit S representing whether it is the bottom of the stack, and the EXP bit occupies 3 bits, which are used as the TTL value of the last 8 bits of the reserved bit. Labeling is available for various networks.

traffic classification

Traffic classification is to identify packets that meet certain characteristics according to certain rules. Packets with different characteristics enjoy different services. According to different reference information of classification rules, traffic classification can be divided into simple traffic classification and complex traffic classification.

  • Simple traffic classification refers to the use of simple rules, such as the DSCP/IP-PRE value in the IP packet header, the EXP field value in the MPLS packet, and the 802.1P value in the Vlan packet header to roughly classify the packets. Traffic with different priority or class-of-service characteristics is identified.
  • Complex traffic classification refers to the use of complex rules, such as comprehensive link layer, network layer, transport layer information (such as source MAC address, destination MAC address, source IP address, destination IP address, user group number, protocol type or application program) TCP/UDP port number, etc.) to finely classify packets. Complex traffic classification is usually performed on the traffic on the border router of the Diff-Serv domain.

Implementation of simple traffic classification in products

Huawei router products support the configuration of eight DS domains.
Upstream simple flow classification, according to IP DSCP, MPLS EXP or 802.1P, packets are divided into eight service types (CS7, CS6, EF, AF4——AF1, BE), and three colors (green, yellow, red), so that Differentiate between different services (eg, voice, video, data, etc.). During congestion management and queue scheduling, different services enter different queues to obtain differentiated scheduling. For example, voice can enter the high-priority PQ queue to ensure low delay. If the uplink does not perform simple traffic classification, the packet service type is BE.
Downstream simple flow classification, according to the internal service type (CS7, CS6, EF, AF4 - AF1, BE), three colors (green, yellow, red), reset the IP DSCPMPLS EXP or 802.1P of the message, and realize the reconfiguration Marking function, re-marking IP DSCP, MPLS EXP or 802.1P. When simple traffic classification is not configured on the downlink, IP DSCP, MPLS EXP, or 802.1P do not change.

Example of Simple Traffic Classification Scenario

insert image description here
Now the IP data packet will enter the MPLS domain, but the IP packet header is not checked in the MPLS domain. At this time, the MPLS EXP bit must be checked, so there will be a mapping process at this time, the mapping process from DSCP to EXP. When leaving the MPLS domain, it will correspond back.

Example of Complex Traffic Classification Scenarios

insert image description here

Implementation of complex traffic classification in products

When implementing complex traffic classification, it is divided into two parts: the rule part and the action part .
When processing a message, the keyword is formed according to the field information used for classification in the message, and the rule table is searched; if the message can match the rule part, the action list corresponding to the rule is determined according to the search result, and the message should be determined. what action to perform. If the packet does not match any of the rules, the packet will not be classified and forwarded normally as a normal packet.
ACL (Access Control List): Access Control List. Rules section for complex traffic classification.

Summarize:

Q: What is traffic classification?
A: Differentiate between different businesses.

Q: What classification methods are included in traffic classification?
A: Simple and complex. Simple traffic classification is based on IP priority, DSCP value, 802.1p and other information. Complicated traffic classification is based on source and destination ports, MAC, etc., and complex traffic classification is generally performed at the border.

Guess you like

Origin blog.csdn.net/ssslq/article/details/129377502