How to Set Up Outbound Buffers on Junos Routers - dummies

How to Set Up Outbound Buffers on Junos Routers

By Walter J. Goralski, Cathy Gadecki, Michael Bushong

The whole point behind constraining the total bandwidth allocated to specific forwarding classes is that you want to prevent a single application or traffic flow from consuming an interface’s entire set of resources. Well, if bandwidth is the most important resource to cap, buffer size is a close second.

In this context, buffers refer to the available memory on an interface card available for queuing packets before they’re sent downstream. Essentially, after the router performs the next-hop lookup, it sends the packets to the interface where it’s stored in memory.

The interface then services its queues based on the relative priority of each queue. While it services those queues, packets being sent by the router for eventual transmission are stored up.

During periods of congestion (defined here as times when the total rate of queuing packets exceeds the rate of transmission), these buffers begin to fill. When they’re completely full, any new packets being sent to the interface can be dropped because there is no place to store them.

Because some traffic may be less critical (or because you can tolerate drops of some types of traffic more than others), you may want to guarantee a slice of the buffer pie. Also, similar to capping the transmit rates, you may want to prevent a particular forwarding class or traffic flow from consuming all available buffer space.

The configuration to shape the outbound buffers closely resembles the configuration to shape outbound traffic:

[edit class-of-service]
schedulers {
  cos-sched-video {
   transmit-rate percent 40;
   buffer-size percent 40;
  cos-sched-buscrit {
   transmit-rate percent 30;
   buffer-size percent 10;
  cos-sched-noncrit {
   transmit-rate percent 10;
   buffer-size percent 10;
  cos-sched-default {
   transmit-rate remainder;
   buffer-size remainder;

The deeper the buffer, the more delay that can occur. In a well-functioning network, buffer memory usage will be low most of the time. Buffers are really intended to absorb bursts of traffic.