Difference between Traffic Shaping and Policing

Traffic shaping vs policing

Traffic regulation and traffic shaping are two similar approaches launched to regulate the flow of traffic from one network to another. This is done in accordance with the traffic contract between the networks. The traffic contract is an agreement between two networks. It defines the type of traffic to be transported and the performance requirements of this traffic, such as bandwidth and quality of service. In traffic engineering, traffic regulation and regulation are widely used as a method of providing quality of service. They are commonly applied at network ends, but can also be applied to the source of traffic.

What is the traffic police?

Traffic monitoring is the process of monitoring traffic in a network and taking action to comply with agreed traffic parameters. It basically measures the data flow and monitors each packet. When a violation is detected, it simply drops the packet. It marks each packet with a particular level of compliance (also called coloring). This continuous process makes it possible to control the maximum rate of traffic sent or received on each interface according to several priority levels. This is also known as classes of service.

Policing is done at different levels in a network; this can be done at the port level or for Ethernet service or a particular class of service. Traffic management uses a special algorithm called the token bucket algorithm to regulate the traffic flow. It is a comprehensive mathematical model developed to control the maximum traffic rate allowed for an interface at a given time. This has two basic components.


  1. Tokens: represents the authorization to send a fixed number of bits from one network to another.
  2. The compartment: used to hold a specified amount of tokens at a time.

The operating system running on the network places the tokens in the bucket at a certain rate. Each packet entering the network takes tokens from the compartment depending on the size of their packet when it is ready to be transmitted to another network. When the bucket is full, all new tokens will be rejected. These rejected tokens are also not available for future packages. All tokens are generated based on the maximum transmission rate defined in the traffic agreement. The number of tokens available determines the number of packets selected for transmission over the packet data network.

There are several traffic control mechanisms available to optimize it, such as single rate traffic color marker for traffic control, two-rate three-color marker for traffic control, percentage based control , etc.

What is traffic in shape?

Traffic shaping is a technique used in traffic management to delay all or part of the packets in order to confirm with a desired traffic data profile. In reality, this is a form of rate limiting that works by monitoring and queuing IP packets in transition mode, based on a number of parameters that can be configured at the advanced. Thus, this makes it possible to implement a specific policy which modifies the way in which the data is awaiting transmission.

Basically, traffic shaping works on two principles. The first is to apply bandwidth limitations based on the configured traffic limits, then queue the packets for later sending when the demand for bandwidth is lower. The second principle is to drop packets when the packet buffers are full. Here, the deposited package is selected from these packages, which are responsible for creating a "jam". Likewise, in traffic control, fitness also gives priority to traffic. However, the formatting prioritizes the traffic according to the administrator's choice. When traffic of higher priority is greatly increased while a communication line is full,

This task is usually implemented by treating a certain amount of traffic (the amount of traffic guaranteed in a traffic contract) as traffic of higher priority, and traffic exceeding this limit, which has the same priority as any other traffic, then competes with the rest of the traffic. traffic that is not prioritized.

Typically, traffic specialists do not allow large amounts of data to be queued when determining the exact traffic to send based on traffic prioritization. They first try to measure the amount of priority traffic and, therefore, dynamically limit non-priority traffic. This will not disrupt the flow of priority traffic.

Traffic police vs fitness


  1. Traffic regulation and shaping use a token compartment mechanism for their operation.
  2. Traffic control is used to control incoming or outgoing traffic on an interface, while traffic management can only be used to control outgoing traffic.
  3. Traffic regulation and shaping use a token compartment mechanism for their operation.
  4. Traffic control can be used inbound or outbound on an interface, while traffic shaping can only be used for outbound traffic.
  5. In both mechanisms, it is necessary to measure the rate of data transmission and reception and to take measures according to the agreed traffic rate according to the traffic contract.
  6. In regulation, it propagates bursts of traffic while shaping the traffic provides a smoothed packet output rate.
  7. Formatting supports queuing and provides enough memory to buffer delayed packets, while control does.
  8. A special scheduling function is necessary for shaping traffic for the subsequent transmission of any number of delayed packets.
  9. In formatting, token values ​​are configured in bits per second, while in management configured in bytes.
  10. The queuing in traffic shaping causes a delay; in particular creates very long queues, while the control controls the flow of output packets by deleting packets. This avoids the delay caused by queuing packets.
  11. In traffic profiling, token values ​​are configured in bits per second, while in regulation, they are configured in bytes per second.

Post a Comment

0 Comments