Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

shaping-rate (Applying to an Interface)

Syntax

Hierarchy Level

Description

For logical interfaces on which you configure packet scheduling, configure traffic shaping by specifying the amount of bandwidth to be allocated to the logical interface. Applying a shaping rate can help ensure that higher-priority services do not starve lower-priority services.

For physical interfaces, by default, shaping is not configured and traffic can be up to the line rate for that interface. Port shaping enables you to control the amount of traffic passing through a physical interface. Port shaping enables you to shape the aggregate traffic through an interface to a rate that is less than the line rate for that interface. This can be useful to reduce downstream congestion.

Note:

For platforms that support both logical and physical interface shaping, logical and physical interface traffic shaping rates are mutually exclusive. This means you can include the shaping-rate statement at the [edit class-of-service interfaces interface-name] hierarchy level or at the [edit class-of-service interfaces interface-name unit logical-unit-number] hierarchy level, but not at both.

Note:

For MX Series routers and for EX Series switches, the shaping rate value for the physical interface at the [edit class-of-service interfaces interface-name] hierarchy level must be a minimum of 160 Kbps. If the value is less than the sum of the logical interface guaranteed rates, you cannot apply the shaping rate to a physical interface.

For PTX Series routers, the shaping rate value for the physical interface at the [edit class-of-service interfaces interface-name] hierarchy level must be a minimum of 1 Gbps and an incremental granularity of 0.1 percent of the physical interface speed after that (for example, 10 Mbps increments on a 10 Gbps interface).

On EX4650, QFX5110, QFX5120, QFX5200, QFX5210 Series 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: xe-0/0/0, xe-0/0/1, and xe-0/0/2. If you configure a shaping rate of X Mpbs on ae0, traffic up to the rate of X Mpbs flows through each of the three interfaces. Therefore, the total traffic flowing through ae0 can be at the rate of 3X Mbps.

Alternatively, you can configure a shaping rate for a logical interface and oversubscribe the physical interface by including the shaping-rate statement at the [edit class-of-service traffic-control-profiles] hierarchy level. With this configuration approach, you can independently control the delay-buffer rate, as described in Oversubscribing Interface Bandwidth.

Default

If you do not include this statement at the [edit class-of-service interfaces interface-name unit logical-unit-number] hierarchy level, the default logical interface bandwidth is the average of unused bandwidth for the number of logical interfaces that require default bandwidth treatment. If you do not include this statement at the [edit class-of-service interfaces interface-name] hierarchy level, the default physical interface bandwidth is the average of unused bandwidth for the number of physical interfaces that require default bandwidth treatment.

Options

rate

Peak rate, in bits per second (bps). You can specify a value in bits per second either as a complete decimal number or as a decimal number followed by the abbreviation k (1000), m (1,000,000), or g (1,000,000,000).

  • Range: 1000 through 6,400,000,000,000 bps.

Note:

For all MX Series and EX Series interfaces, the rate can be from 65,535 to 6,400,000,000,000 bps.

For all PTX Series interfaces, the rate can be from 1,000,000,000 to 160,000,000,000 bps in increments of 0.1 percent of the interface speed.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

[edit class-of-service interfaces interface-name] hierarchy level added in Junos OS Release 7.5.