30-22 Riverstone Networks RS Switch Router User Guide Release 8.0
WAN Rate Shaping WAN Configuration
Once the templates are applied, all Ethernet flows on R1 originating from ports et.2.1, et.2.7, and et.3.8 are rate shaped
to a maximum of 150 kbps, while Ethernet flows on R2 originating from subnet 124.141.77.0 are rate shaped to a
maximum of 170 Kbps in the opposite direction.
30.13.4 Using WAN Rate Shaping
The following section lists a few situations to keep in mind when using WAN rate shaping.

Using Multiple Rate Shaping Templates

The rate shaping algorithm can use only one identifier to determine whether an Ethernet flow should be rate shaped.
Furthermore, the identifiers are tested against a flow in the following order:
1. Destination IP address
2. Source IP address
3. VLAN
4. Traffic source port
If more than one rate shaping template is applied to a WAN port, the first template with an identifier that matches an
Ethernet flow’s internal parameters (as shown in the ordered list above) is applied to the flow. Keep in mind this
hierarchy of identifiers when configuring rate shaping to assure that Ethernet flows are rate shaped by the desired
template.
For example, two templates are created (temp1 and temp2), each with a different value for CIR and Bc:
Both templates are applied to a single Clear Channel T3 port, one using traffic-source-port as its identifier, the
other using vlan as its identifier:
Notice that vlan is higher in the identifier hierarchy than traffic-source-port. Because of this, the VLAN name
is examined first. As a result, if et.1.2 belongs to VLAN west-district, flows from port et.1.2 will be shaped
according to temp2, rather than temp1.

Rate Shaping by Best Effort

If CIR and Bc are both set to zero, and Be is set to some value greater than zero, packets from the Ethernet flow
controlled by this template will pass through the WAN port only if there is surplus bandwidth equal to or greater than
Be. This configuration does not provide any guarantee that the flow’s packets will get through the WAN port; and
bandwidth for this flow is attained only on a best-effort basis.
rs(config)# wan define rate-shape-parameters temp1 cir 150000 bc 5000
rs(config)# wan define rate-shape-parameters temp2 cir 200000 bc 9000
rs(config)# wan apply rate-shape-parameters temp1 port t3.2.1 traffic-source-port
et.1.2
rs(config)# wan apply rate-shape-parameters temp2 port t3.2.1 vlan west-district