Flow shaping

honggarae 21/06/2022 535

Confense of Flow Shaping

Traffic Shaping is an active action to adjust traffic output rate.

A typical application is a TP index based on a downstream network node to control the output of the local traffic. The main difference between traffic plastic and flow supervision is that traffic shaping needs to be discarded in traffic supervision - typically placing them into buffer or queue, also known as traffic shaping, referred to as TS). When the token barrel has enough token, send these cached messages evenly outward. Another difference between flow plastic surgery and traffic supervision is that places may increase delays, while the supervision is hardly introduced to additional delays.

As shown in the figure above, when the packet reaches the interface, first classify the packets, and processed in accordance with the following cases.

  • Continue directly to the message that does not participate in traffic shaping.

  • For packets involved in traffic shaping, if there is a shaped queue, the packets directly enter the queue, waiting for the queue to schedule packets in accordance with the shaping algorithm.

  • For packets involved in traffic shaping, if there is no shaping queue, the message is determined according to whether the message is transmitted.

When the message arrival interface discovers the shaping queue is full, the packet is discarded.

Cartial algorithm for flow shaping

The core algorithm of traffic shaping has the following two types, and the specific technology is GTS (Generic Traffic Shaping), universal traffic shaping:

< H3> Leak Bucket Algorithm

Leakage Bucket Algorithm (Leak Bucket) is often used when traffic shaping or rate limiting or rate limit in the network world. An algorithm, its main purpose is to control the data injected into the network, smooth traffic on the network. The drain bar algorithm provides a mechanism that provides a steady flow of the burst of traffic to provide a stable flow for the network.

token barrel algorithm

Token Bucket

Sometimes people are incorrectly confused with token barrel algorithms. In fact, these two algorithms have a distinct property and are used in distinct purposes. The most important difference between them is that the drain bar algorithm can force the transmission rate of the data, and the token barrel algorithm can also allow some degree of burst transmission while restricting the average transmission rate of data.

In some cases, the drain bar algorithm cannot effectively use network resources. Since the leakage rate of the drain bar is a fixed parameter, even if there is no resource collision (no congestion) in the network, the drain bar algorithm does not cause a separate stream to burst into port rate. Therefore, the drain bar algorithm lacks efficiency for the flow of burst characteristics. The token barrel algorithm can satisfy these burst characteristics. Typically, the discharge barrel algorithm can provide greater control for network traffic.

Common flow shaping classification

GTS Universal Flow Shaping

Flow Shaping By reducing the rate of outning flow, forcing traffic follows a certain bandwidth allocation limit. Unlike traffic regulation will discard the traffic of the burst size, which is in a buffer of the burst flow into the flow shaping, and when the bandwidth is available, it is sent out, or the number of buffered data packets When the configured limit is limited, it sends it out.

Flow shaping uses a token bucket system to determine whether to transfer, delay, or discard new packets. With this token bucket system, each interface has a commitment information rate (CIR), which is the rate at which the interface can transmit the packet within a time period. The sustained burst rate (BC) defines the maximum number of token can contain a maximum token bucket in a time interval. When the packet reaches an interface, it takes a token from the token bucket. When the packet is sent, the token will be released. After the time interval (TC), this token will return into the token barrel. If the token bucket is empty, any newly reached the packet of that interface will be placed in the queue until the time interval passes, the token is re-filled. If the CIR continues to exceed, the token will move from the token bucket with a speed greater than they added, while the queue is fill the queue and causing the packet to be discarded.

Flow shaping can be applied to some different second-layer technologies, such as Ethernet, ATM, HDLC, PPP (ISDN, and Dial Interfaces) and Frames relay. In addition to the frame relay, all of these technologies support universal traffic shaping (GTS). GTS can also form a type of traffic defined in the Control List, which is implemented by specifying groups in traffic shaping.

In order to configure GTS, it must know the purpose bit rate for the interface, that is, the commitment information rate (CIR), which refers to the rate of traffic transmitted under normal conditions. Sustained burst rate (BC) refers to the rate of flow in each time interval that is allowed to be out of normal flow rate, indicated by bit. Excessive burst rate (BE) refers to the rate of traffic that is allowed to surrendenect a burst rate within the first time interval. Every time a time interval (TC), the flow will be filled into the token barrel of the flow shaping.

Tc = Bc / CIR

The time interval for flow shaping cannot be less than 10 ms or greater than 125 ms. The router discovers the best time interval based on the formula of TC = BC / CIR. The default time interval is 125ms. This time interval is the result of CIR and BC configurations for unconfiguration. Cisco recommends the BC should be 1/8 of CIR. It will generate 8 125ms time intervals within every second.

Flow shaping

Configure the GTS for all interface traffic, using the traffic-shaping rate command on an interface that requires traffic shaping. For specific traffic, use the traffic-shaping group command and a list of access controls.

traffic-shaping {rate | group access-list-number} target-bit-rate [sustained] [excess] [buffer-limited]

group access-list-number specified All traffic of matching access control list (1-2699) is shaped.

rate Specifies all traffic on this interface being shaped.

target-bit-rate This traffic will be transmitted normal rate (CIR), the full CIR represented by the 8000 to the interface.

sustained continuous bit rate (BC) refers to the value of traffic being allowed to be burst, represented in a bit bit within each time interval.

Excess Excess Bit Rate (BE) refers to the flow rate of the burst over the last time interval, is represented in a bit bit within each time interval. It is an optional parameter that assumes that the token bucket is full of full: BE = BC * 2.

buffer is used to specify a limit of a cache, ranging from 1 to 4096.

GTS configuration requires two steps: Discover the value of traffic shaping and configure traffic shaping on the interface.

1, find the value of the correct flow shaping. CIR, BC, BE

BC Specifies the number of ratios that can be transmitted in a certain time interval. BC = CIR * TC

be specifies that the burst of bursts that can be supported when the interface is filled with enough tokens, usually considering within the first time interval. BE = BC * 2

If the interface does not support burst, you can use the following formula: BE = BC

2, in interface mode, use the traffic-shaping command to enable traffic shaping .

In order to view the configuration of GTS, use show traffic-shaping [statistics] command

frame relay traffic shaping (FRTS)

in the following 4 cases Using the FRTS: 1 center high speed, the branch is low speed. 2 Single physical lines are carried to many VCs of different destinations. 3 If the frock occurs, you want the router to stop the data stream. 4 The data stream of multiple protocols (IP, SNA) needs to be transmitted on the VC of the same FR, and you want each data stream to account for a certain BW. FECN and BECN in

fr are used to hint the network on the network. When receiving a packet with a BECN tag, the FR traffic shaping (FRTS) is shaped to move. Note: FRTS can only use PVC and SVC in FR. There is an adaptive FRTS, in each TC interval, the process will check if the BECN is received from the Frames Relay network, and if the BECN is received in one TC, the transfer rate is reduced by 25% until half of the CIR until. When it is only used in 16 TCs, the communication rate is restored to the CIR.

FRTS Configuration Step

1) Create a map-class, name is case sensitive.

2) Define how the flow shaping is set, such as setting average rate and maximum rate.

3) Package Frame-Relay on the interface.

4) Apply MAP-Class 5 on the port to turn on traffic shaping, generally used for source interface.

Traffic Supervision

Router A Send a message to the router B, in order to reduce the unimparation of the packet, the packet can be performed on the traffic shaping of the router A. The message that exceeds the traffic plasticity characteristic is present in router A. When the shaped algorithm allows the next batch of messages to be continued, the packet is removed from the buffer queue. Thus, the packets of the swivel router B will comply with the traffic regulations of router B.

The main difference between traffic shaping and traffic supervision is that

  • traffic shaping is cached on traffic in traffic regulation. When the integration algorithm allows the message to be sent, the cached packets are transmitted evenly outward.

  • The traffic plastic can increase the delay, and the traffic supervision is hardly introduced to additional delays.

Latest: Gangquarn

Next: Peak experience