By delaying traffic, it ensures that critical applications get priority over others and this makes it a highly useful technique for organizations and ISPs. Home » Articles » Traffic shaping How to avoid rush hours on your network. Lavanya Rathnam is a professional writer of tech and financial blogs. Creative thinker, out of the boxer, content builder and tenacious researcher who specializes in explaining complex ideas to different audiences.
Your email address will not be published. Learn about the latest security threats, system optimization tricks, and the hottest new technologies in the industry. Over 1,, fellow IT Pros are already on-board, don't be left out! TechGenix reaches millions of IT Professionals every month, and has set the standard for providing free technical content through its growing family of websites, empowering them with the answers and tools that are needed to set up, configure, maintain and enhance their networks.
Lavanya Rathnam December 30, What is traffic shaping? Application-based shaping You can change the settings on your router to set higher priority for certain applications, so its data packets are sent quickly. Route-based shaping The other option is route-based shaping based on the source of the packets and their intended destination.
Why do you need traffic shaping? Now that you know what is traffic shaping, why do you need it and where can you use it? Post Views: 1, Featured Links. Contact Support. Product Login. Customer Support Login. Partner Portal Login. Become a Partner. Next Generation Firewalls. Zero Trust Access. Industrial and IoT Security. Web Security and Filtering. Total Email Protection. Cloud Security Guardian. Healthcare Retail Financial Services Education.
Office This brings us to an important question: how do we ensure the quality performance of a network even in cases where connectivity can be expensive? Enter the world of Quality of Service QoS. Since different applications react differently to the four factors that affect network quality, QoS aims to provide the best level of service for the various types of applications depending on user requirement.
Even though the packets that make up a voice traffic do not need a lot of bandwidth, voice does not do well with delay and packet loss. On the other hand, when downloading a large file over a TCP connection, bandwidth is the most important factor; TCP can make up for packet loss by retransmitting packets. We have now come to the focus of this article which is Traffic Shaping. For me, I think of someone molding a sculpture using clay.
This is exactly what Traffic Shaping is — the ability to shape a certain category of traffic into a particular form, usually done by controlling the speed of the traffic flow.
This means that if the traffic subject to shaping is arriving at a rate lower than the configured rate, then there is no problem — it will be forwarded normally. However, if the traffic is arriving faster than the configured rate, then it will usually be held in a buffer and delayed until it can be sent out without going over the configured rate.
Note : This is the difference between traffic policing and traffic shaping. In the case of excess traffic flow, traffic policing will usually drop the excess packets while traffic shaping will delay it and send it out at a later time.
Why will you want to implement traffic shaping? Now, the physical link between you and the ISP could be a FastEthernet cable which has a theoretical speed of Mbps. This means that theoretically, you can push Mbps over that link while paying for only 2Mbps. So how will the ISP prevent this? Usually, they will implement some form of traffic policing that drops any traffic above the agreed rate 2Mbps.
To make sure you are not sending more traffic than the ISP is willing to receive, you can implement traffic shaping on your end such that your traffic will be sent at an average rate of 2Mbps, reducing the chances of the ISP dropping your traffic. Different device manufacturers will implement this feature differently but let us look at how it is implemented on Cisco devices which are very common in enterprise networks.
It is easier to explain this using an example. Imagine a router connected to an ISP via an interface that is capable of sending 10Mbps i. This means that every second , this interface is capable of sending out about 10,, bits of data. This means that anything extra that you send over 2Mbps will be dropped. First of all, you must be aware that it is not possible to make an interface send lower than its line speed in this case, 10Mbps.
We cannot physically slow down bits as they exit an interface. So for example:. You should get the point by now, even though this explanation is theoretical. In other words, if the previous arrival of the packet was at t1 and the current time is t, the bucket is updated with t-t1 worth of bytes based on the token arrival rate. Note that a traffic policer uses burst values specified in bytes, and the above formula converts from bits to bytes. The token buckets starts full at bytes.
If a byte packet arrives, the packet conforms because enough bytes are available in the token bucket. The conform action transmit is taken by the packet and bytes are removed from the token bucket leaving bytes. If the next packet arrives. The calculation leaves bytes in the token bucket. If the next packet is bytes, the packet exceeds and the exceed action drop is taken. No bytes are taken from the token bucket.
Generic Traffic Shaping. Frame Relay Traffic Shaping. All traffic shaping methods are similar in implementation, though their command-line interfaces CLIs differ somewhat, and they use different types of queues to contain and shape traffic that is deferred. Cisco recommends class-based shaping and distributed shaping, which are configured using the modular QoS CLI. The following diagram illustrates how a QoS policy sorts traffic into classes and queues packets that exceed the configured shaping rates.
Committed Access Rate. Class-Based Policing. Use the police command to specify that a class of traffic should have a maximum rate imposed on it, and if that rate is exceeded, an immediate action must be taken. In other words, with the police command, it is not an option to buffer the packet and later send it out, as is the case for the shape command. In addition, with policing, the token bucket determines whether a packet exceeds or conforms to the applied rate.
The following diagram illustrates a common application of traffic policing at a congestion point, where QoS features generally apply. Both the shape and police commands restrict the output rate to a maximum kbps value.
Importantly, neither mechanism provides a minimum bandwidth guarantee during periods of congestion. Use the bandwidth or priority command to provide such guarantees. A hierarchical policy uses two service policies — a parent policy to apply a QoS mechanism to a traffic aggregate and a child policy to apply a QoS mechanism to a flow or subset of the aggregate.
Logical interfaces, such as subinterfaces and tunnel interfaces, require a hierarchical policy with the traffic-limiting feature at the parent level and queuing at lower levels.
The traffic-limiting feature reduces the output rate and presumably creates congestion, as seen by queuing excess packets. The following configuration is sub-optimal and is shown to illustrate the difference between the police versus the shape command when limiting a traffic aggregate — in this case class-default — to a maximum rate. In this configuration, the police command sends packets from the child classes based on the size of the packet and the number of bytes remaining in the conform and exceed token buckets.
See Traffic Policing. The result is that rates given to the Voice over IP VoIP and Internet Protocol IP classes may not be guaranteed since the police feature is overriding the guarantees made by the priority feature.
0コメント