WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Computer Networking · Advanced · question 50 of 100

How does traffic shaping and policing work, and how do they help manage network congestion?

📕 Buy this interview preparation book: 100 Computer Networking questions & answers — PDF + EPUB for $5

Traffic shaping and policing are techniques used in computer networking to manage network congestion. Traffic shaping is a technique used to control the rate at which data is transmitted over a network, while traffic policing is a technique used to monitor and enforce traffic rules and regulations on a network.

Traffic shaping manages bandwidth by delaying packets at the source, which smooths out the transmission of data over time. This technique is used when network traffic exceeds available bandwidth, and traffic shaping is necessary to prevent the network from becoming congested. The idea behind traffic shaping is to limit the sending rate of data on a particular link to avoid congestion.

Traffic shaping is accomplished through a variety of algorithms that aim to reduce congestion in the network, including token bucket and leaky bucket algorithms. These algorithms monitor the amount of traffic going through a particular network link and adjust the rate at which data is transmitted to ensure that the network does not become congested.

For example, consider a network with a maximum bandwidth of 100 Mbps, but the traffic flow exceeds 120 Mbps for a few minutes. If traffic shaping is not in place, this would lead to network congestion and packet loss. However, if traffic shaping is used, packets can be delayed at the source, so the bandwidth usage is smoothed out, and packets are delivered in a more controlled way resulting in reduced congestion and packet loss.

Traffic policing, on the other hand, enforces the rules and regulations on a network. It ensures that each user is not consuming more than their fair share of bandwidth, which can lead to congestion and slowdowns.

Generally, traffic policing provides a flexible way to shape the traffic based on an organization’s specific needs. For example, an organization can prioritize different types of traffic depending on its importance, such as video conferencing and email. It also helps in enforcing policies like data usage limit or SLA commitments.

In conclusion, both traffic shaping and policing are essential techniques for managing network congestion. Traffic shaping helps in managing bandwidth by controlling the rate at which data is transmitted over a network, while traffic policing enforces rules and regulations on the network to ensure that each user is not exceeding their fair share of bandwidth. Together, they work to ensure that network bandwidth is utilized efficiently and effectively, reducing congestion and improving network performance.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Computer Networking interview — then scores it.
📞 Practice Computer Networking — free 15 min
📕 Buy this interview preparation book: 100 Computer Networking questions & answers — PDF + EPUB for $5

All 100 Computer Networking questions · All topics