No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Principles

Principles

This section describes the principles of token buckets, traffic measurement, traffic policing, traffic shaping, and interface-based rate limiting.

There are various types of service traffic from different users on a network. The network will be congested if traffic sent by users is not limited. To make use of limited network resources and provide better user services, limit the user traffic.

Traffic policing, traffic shaping, and interface-based rate limiting limit the traffic and resource usage by monitoring the rate limit. Before monitoring the traffic, assess the traffic and implement a policy based on the assessment result. Generally, token buckets are used to assess traffic.

Traffic Measurement and Token Bucket

Overview

To make use of limited network resources and provide better user services, limit the user traffic. Traffic policing, traffic shaping, and interface-based rate limiting limit the traffic and resource usage by monitoring the rate limit. Before implementing traffic policing, traffic shaping, and interface-based rate limiting, assess whether the traffic exceeds the limit. Then traffic policies are implemented based on the assessment result. Generally, token buckets are used to assess traffic.

With a certain capacity, a token bucket stores tokens. The system places tokens into a token bucket at the configured rate. If the token bucket is full, excess tokens overflow and no token is added. When measuring traffic, a token bucket forwards packets based on the number of tokens in the token bucket. If there are enough tokens in the token bucket for forwarding packets, the traffic rate is within the rate limit. Otherwise, the traffic rate is not within the rate limit.

RFC standards define two token bucket algorithms:
  • Single rate three color marker (srTCM) focuses on packet length burst.
  • Two rate three color marker (trTCM) focuses on packet rate burst.

srTCM and trTCM color packets red, yellow, and green based on the assessment result. Then the device processes packets according to the packet color. The two algorithms can work in color-aware and color-blind modes. The color-blind mode is used as an example.

Dual Buckets at a Single Rate

Dual buckets at a single rate use A Single Rate Three Color Marker (srTCM) defined in RFC 2697 to assess traffic and mark packets in green, yellow, and red based on the assessment result.

Figure 13-10 Dual buckets at a single rate
As shown in Figure 13-10, the two buckets are called bucket C and bucket E. Tc indicates the number of tokens in bucket C, and Te indicates the number of tokens in bucket E. Dual buckets at a single rate use the following parameters:
  • CIR: indicates the rate at which tokens are put into bucket C, that is, average traffic rate permitted by bucket C.
  • CBS: indicates the capacity of bucket C, that is, maximum volume of burst traffic allowed by bucket C each time.
  • Excess burst size (EBS): indicates the capacity of bucket E, that is, maximum volume of excess burst traffic allowed by bucket E each time.
The system places tokens into the bucket at the CIR:
  • If TC is smaller than the CBS, Tc increases.
  • If TC is equal to the CBS and Te is smaller than the EBS, Te increases.
  • If TC is equal to the CBS and Te is equal to the EBS, Tc and Te do not increase.
B indicates the size of an arriving packet:
  • If B is smaller than or equal to Tc, the packet is colored green, and Tc decreases by B.
  • If B is greater than Tc and smaller than or equal to Te, the packet is colored yellow and Te decreases by B.
  • If B is greater than B, the packet is colored red, and Tc and Te remain unchanged.

Dual buckets at a single rate allow burst traffic. When the user traffic rate is smaller than the CIR, packets are colored green. When the user burst traffic is larger than the CBS and smaller than the EBS, packets are colored yellow. When the user burst traffic is larger than the EBS, packets are colored red.

Single Bucket at a Single Rate

If burst traffic is not allowed, the EBS is set to 0 in dual buckets at a single rate. The number of tokens in bucket E is always 0, that is, one token bucket is used.

Figure 13-11 Single bucket at a single rate
As shown in Figure 13-11, the bucket is called bucket C. Tc indicates the number of tokens in bucket C. A single bucket at a single rate uses the following parameters:
  • Committed Information Rate (CIR): indicates the rate at which tokens are put into bucket C, that is, the average traffic rate permitted by bucket C.
  • Committed burst size (CBS): indicates the capacity of bucket C, that is, maximum volume of burst traffic allowed by bucket C each time.

The system places tokens into the bucket at the CIR. If Tc is smaller than the CBS, Tc increases. If Tc is smaller than or equal to the CBS, Tc remains unchanged.

B indicates the size of an arriving packet:
  • If B is smaller than or equal to Tc, the packet is colored green, and Tc decreases by B.
  • If B is greater than Tc, the packet is colored red, and Tc remains unchanged.

Single bucket at a single rate does not allow burst traffic. When the user traffic rate is smaller than the CIR, packets are colored green. When the user traffic is larger than the CIR packets are colored red.

Dual Buckets at Dual Rates

Dual buckets at dual rates use A Two Rate Three Color Marker (trTCM) defined in RFC 2698 to assess traffic and mark packets in green, yellow, and red based on the assessment result.

Figure 13-12 Dual buckets at dual rates
As shown in Figure 13-12, the two buckets are called bucket P and bucket C. Tp indicates the number of tokens in bucket P, and Tc indicates the number of tokens in bucket C. Dual buckets at dual rates use the following parameters:
  • Peak information rate (PIR): indicates the rate at which tokens are put into bucket P, that is, maximum traffic rate permitted by bucket P. The PIR must be greater than the CIR.
  • CIR: indicates the rate at which tokens are put into bucket C, that is, average traffic rate permitted by bucket C.
  • Peak burst size (PBS): indicates the capacity of bucket P, that is, maximum volume of burst traffic allowed by bucket P each time.
  • CBS: indicates the capacity of bucket C, that is, maximum volume of burst traffic allowed by bucket C each time.
The system places tokens into bucket P at the PIR and places tokens into bucket C at the CIR:
  • If Tp is smaller than the PBS, Tp increases. If Tp is greater than or equal to the PBS, Tp remains unchanged.
  • If Tc is smaller than the CBS, Tc increases. If Tc is greater than or equal to the CBS, Tp remains unchanged.
B indicates the size of an arriving packet:
  • If B is greater than Tp, the packet is colored red.
  • If B is greater than Tc and smaller than or equal to Tp, the packet is colored yellow and Tp decreases by B.
  • If B is smaller than or equal to Tc, the packet is colored green, and Tp and Tc decrease by B.

Dual buckets at dual rates allow burst data transfer rate. When the user traffic rate is smaller than the CIR, packets are colored green. When the user burst traffic is larger than the CIR and smaller than the PIR, packets are colored yellow. When the user burst traffic is larger than the PIR, packets are colored red.

Color-aware Mode
In color-aware mode, if the arriving packet has been colored red, yellow, or green, the token bucket assesses the traffic as follows:
  • If the packet has been colored green, the assessment mechanism of the token bucket is the same as that in color-blind mode.
  • If the packet has been colored yellow, the packet within the rate limit is colored yellow and the packet not within the rate limit is colored red according to the packet length and the number of tokens. In single bucket at a single rate, the packet is colored red.
  • If the packet has been colored red, the token bucket colors the packet red.

Traffic Policing

Traffic policing discards excess traffic to limit the traffic within a specified range and to protect network resources as well as the enterprise users' interests.

Implementation of traffic policing
Figure 13-13 Traffic policing components

As shown in Figure 13-13, traffic policing involves the following components:

  • Meter: measures the network traffic using the token bucket mechanism and sends the measurement result to the marker.

  • Marker: colors packets in green, yellow, or red based on the measurement result received from the meter.

  • Action: performs actions based on packet coloring results received from the marker. The following actions are defined:

    • Pass: forwards the packets that meet network requirements.

    • Re-mark + pass: changes the local priorities of the packets that do not meet network requirements and forwards them.

    • Discard: drops the packets that do not meet network requirements.

If the rate of a type of traffic exceeds the threshold, the device lowers the packet priority and then forwards the packets or directly discards the packets based on traffic policing configuration. By default, green and yellow packets are forwarded, whereas red packets are discarded.

Traffic Shaping

Traffic shaping adjusts the rate of outgoing traffic so that the outgoing traffic can be sent out at an even rate. Traffic shaping uses the buffer and token bucket to control traffic. When packets are sent at a high speed, traffic shaping caches packets in the buffer and then evenly sends these cached packets based on the token bucket.

Process

Traffic shaping is a queue-based traffic control technique used to limit the rate of packets of a type passing through an interface.

Flow-based queue shaping using the single bucket at a single rate is used as an example. Figure 13-14 shows the traffic shaping process.

Figure 13-14 Traffic shaping process

The traffic shaping process is as follows:

  1. When packets arrive, the device classifies packets and places them into different queues.
  2. If the queue that packets enter is not configured with traffic shaping, the packets are immediately sent. Packets requiring queuing proceed to the next step.
  3. The system places tokens to the bucket at the specified rate (CIR):
    • If there are sufficient tokens in the bucket, the device sends the packets and the number of tokens decreases.
    • If there are insufficient tokens in the bucket, the device places the packets into the buffer queue. When the buffer queue is full, packets are discarded.
  4. When there are packets in the buffer queue, the system compares the number of packets with the number of tokens in the token bucket. If there are sufficient tokens, the system forwards packets until all the packets in the buffer queue are sent.

Interface-based Rate Limiting

Interface-based rate limiting limits the rate of packets sent or received by the interface.

Interface-based rate limiting uses the token bucket to control traffic. If rate limiting is configured on an interface, packets passing through this interface must be processed by the token bucket. If there are sufficient tokens in the token bucket, packets can be sent. Otherwise, packets are discarded or buffered. The packets passing through the interface are controlled.

Interface-based rate limiting can be configured in the inbound or outbound direction. The following example uses interface-based rate limiting in the outbound direction.

Process

The following example uses the single bucket at a single rate on the interface to describe interface-based rate limiting in the outbound direction.

Figure 13-15 Interface-based rate limiting

The interface-based rate limiting process is as follows:

  1. If there are sufficient tokens in the bucket, the switch sends the packets and the number of tokens decreases.
  2. If there are insufficient tokens in the bucket, the device places the packets into the buffer queue. When the buffer queue is full, packets are discarded.
  3. When there are packets in the buffer queue, the system compares the number of packets with the number of tokens in the token bucket. If there are sufficient tokens, the system forwards packets until all the packets in the buffer queue are sent.
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 58694

Downloads: 3621

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next