Rate Limiting

CLI Syntax

Syntax: [no] rate-limit input output [access-group <num>] <average-rate> <normal-burst-size> <excess-burst­ size> conform-action <action> exceed-action <action>

The input output parameter specifies whether the rule applies to inbound traffic or outbound traffic.

Specify input for inbound traffic.

Specify output for outbound traffic.

The access-group<num> parameter specifies an ACL. When you use this parameter, the rule applies only to traffic that matches the specified ACL. Otherwise, the rule applies to all Ethernet traffic that does not match a previous rule on the interface. You can specify the number of a standard ACL, and extended ACL, or a rate limit ACL. If you specify a rate limit ACL, use the parameter ratelimit (without a space) in front of the ACL number; for example, ratelimit 100.

NOTE: You cannot specify a named ACL.

The <average-rate> parameter specifies the portion, in bits per second (bps) of the interface’s total bandwidth you want to allocate to traffic that matches the rule. You can specify a value can from 262144 (256Kbps) up to the maximum line rate of the port. For example, for a 100Mbps port, the maximum value is 100,000,000 (100Mbps).

If the interface is a trunk group, a virtual interface, or a VLAN, you can specify a value up to the maximum combined line rate of all the ports in the interface. For example, if the interface is a trunk group that consists of two one-Gigabit Ethernet ports, then the maximum value for <average-rate> is 2,000,000,000 (two times the maximum for each of the individual Gigabit ports).

The <normal-burst-size> parameter specifies the maximum number of bytes that specific traffic can send on the

interface within the Committed Time Interval and still be within that traffic's rate limit. The minimum value is 32771 or 1/10th of the Average Rate (whichever is higher), and the maximum value is the Average Rate. The smallest fraction of the Average Rate you can specify is 1/10th.

The <excess-burst-size> parameter specifies the maximum number of additional bytes (bytes over the <normal­ burst-size>) that can be transmitted within the Committed Time Interval. The <excess-burst-size> can be a value equal to or greater than the <normal-burst-size> up to the maximum number of bytes the interface can forward within the Committed Time Interval (see “Committed Time Interval” on page 4-9).

The device can take different actions for traffic within the <normal-burst-size> and traffic that falls into the <excess-burst-size>. For example, you can forward all traffic in the <normal-burst-size> and reset the precedence to a lower priority for all <excess-burst-size> traffic, or even just drop that traffic.

NOTE: Do not set the <excess-burst-size> parameter to a value greater than the maximum number of bytes the interface can forward within the Committed Time Interval. Even if the software allows you to specify a higher value, the interface cannot forward more data than its line rate supports.

The conform-action<action> parameter specifies the action you want the device to take for traffic that matches the rule and is within the Normal Burst Size. You can specify one of the following actions:

transmit – Send the packet.

set-prec-transmit<new-prec> – Set the IP precedence, then send the packet. You can specify one of the following:

0 – routine precedence

1 – priority precedence

2 – immediate precedence

3 – flash precedence

1.This value comes from dividing the minimum Average Rate (262144 bits) by eight to get 32768 bytes, then dividing 32768 bytes by 10 to get 3276.8, since the smallest fraction of the Average Rate you can specify is 1/10th. The value 3276.8 is then rounded up to 3277.

4 - 17