Understanding Port Shaping and Queue Shaping for CoS on EX Series Switches
When the amount of traffic on a switch’s network exceeds the maximum bandwidth, packets are lost because of congestion in the network. The excess traffic in the network must be handled carefully to ensure minimum or no data loss in the network. A class-of-service (CoS) configuration includes several parameters that classify traffic into different queues and also define packet loss priorities (PLPs) to ensure smooth transmission of data in the network. You can use these configuration parameters to control or shape traffic for a specific port on a switch or for a specific CoS queue. While port shaping defines the maximum bandwidth allocated to an interface, queue shaping defines a limit on excess-bandwidth usage for each queue.
This topic covers:
Port shaping enables you to shape the aggregate traffic through a port or channel to a rate that is less than the line rate. You can configure interfaces to shape traffic based on the rate-limited bandwidth of the total interface bandwidth. This allows you to shape the output of the interface so that the interface transmits less traffic than it is capable of transmitting. For port shaping, you can specify shaping rate as the peak rate at which traffic can pass through the interface. You can specify rate as a value in bits per second (bps) either as a decimal number or as a decimal number followed by the abbreviation k (1000), m (1,000,000), or g (1,000,000,000) and the value can range from 1000 through 160,000,000,000 bps.
By default, shaping is not configured on an interface. If you do not configure a shaping rate on an interface, the default shaping rate is 100 percent, which is the equivalent to no shaping configured for that interface.
On EX Series switches except EX4300 switches, when you configure a shaping rate on an aggregated Ethernet (ae) interface, all members of the ae interface are shaped at the configured shaping rate. For example, consider an interface ae0 that consists of three interfaces: ge-0/0/0, ge-0/0/1, and ge-0/0/2. If a shaping rate of X Mpbs is configured on ae0, traffic at the rate of X Mpbs flows through each of the three interfaces. Therefore, the total traffic flowing through ae0 would be at the rate of 3X Mbps. On EX4300 switches, when you configure a shaping rate on an ae interface, the traffic is equally divided among the members of the ae interface.
Queue shaping throttles the rate at which queues transmit packets. For example, using queue shaping, you can rate-limit a strict-priority queue so that the strict-priority queue does not lock out (or starve) low-priority queues. Similarly, for any queue, you can configure queue shaping.
You can specify queue shaping as the maximum rate at which traffic can pass through the queue or as a percentage of the available bandwidth. On EX Series switches except EX4300 switches, you can specify the rate as a value between 3200 and 160,000,000,000 bps and the percentage as a value from 0 to 100 percent. On EX4300 switches, you can specify the rate as a value between 8000 and 160,000,000,000 bps and the percentage as a value from 0 to 100 percent.