traffic-shape

Profile Config Commands

Enables traffic shaping and configures traffic shaping parameters. This command is applicable to both the profile and device configuration modes.

Traffic shaping is a means of regulating data transfers and ensuring a specific level of performance within a network. Traffic shaping does the following:

Use this option to apply traffic shaping to specific applications or application categories. Note, in scenarios where a traffic class is matched against an application, application-category, and ACL rule, the application rule will be applied first, followed by the application-category, and finally the ACL. Further, using traffic shaping, an application takes precedence over an application category.

To enable traffic shaping, configure QoS values on the basis of which priority of service is provided to some packets over others. For example, VoIP packets get higher priority than data packets to provide a better quality of service for high priority voice traffic. For configuring IPv6 traffic class mappings, see traffic-class-mapping. And for configuring DSCP traffic class mappings, see dscp-mapping.

Supported in the following platforms:

Syntax

traffic-shape [activation-criteria|app-category|application|class|enable| priority-map|total-bandwidth]
traffic-shape activation-criteria [always|cluster-master|rf-domain-manager|vrrp-master <1-255>]
traffic-shape app-category <APP-CATEGORY-NAME> class <1-4>
traffic-shape application <APPLICATION-NAME> class <1-4>
traffic-shape class <1-4> [max-buffers|max-latency|rate]
traffic-shape class <1-4> max-buffers <1-400> {red-level <1-400>|red-percent <1-100>}
traffic-shape class <1-4> max-latency <1-1000000> [msec|usec]
traffic-shape class <1-4> rate [<1-250000> [Kbps|Mbps]|total-bandwidth-percent <1-100>]
Note

Note

The available range for the ‘rate‘ field will vary depending on the unit selected. It is 250 - 250000 for Kbps and 1 - 250 for Mbps.
traffic-shape priority-map <0-7>
traffic-shape total-bandwidth <1-1000000> [Kbps|Mbps]
Note

Note

The available range for the ‘total-bandwidth‘ field will vary depending on the unit selected. It is 250 - 1000000 for Kbps and 1 - 1000 for Mbps.
traffic-shape enable

Parameters

traffic-shape activation-criteria [always|cluster-master|rf-domain-manager|
vrrp-master <1-255>]
traffic-shape activation-criteria Configures traffic-shape activation criteria that determines when the device invokes traffic shaping
always Always invokes traffic shaping. This is the default setting.
cluster-master Invokes traffic shaping when the device is the cluster master. The solitary cluster master (elected using a priority assignment scheme) is a cluster member that provides management configuration and Smart RF data to other members within the cluster. Cluster requests go through the elected master before dissemination to other cluster members.
rf-domain-manager Invokes traffic shaping when the device is the RF Domain manager. The RF Domain manager is the elected member capable of storing and provisioning configuration and firmware images for other members of the RF Domain.
vrrp-master <1-255> Invokes traffic shaping when the device is the VRRP master. As the VRRP master, the device responds to ARP requests, forwards packets with a destination link MAC layer address equal to the virtual router MAC layer address, rejects packets addressed to the IP associated with the virtual router and accepts packets addressed to the IP associated with the virtual router.
  • <1-255> – Specify the VRRP group ID from 1 - 255.
traffic-shape app-category <APP-CATEGORY-NAME> class <1-4>
traffic-shape app-category <APP-CATEGORY-NAME> class <1-4> Configures an application category to traffic-class mapping. Use this option to apply an application category to traffic-shaper class mapping. Naming and categorizing applications that do not fall into existing groups is an additional means of filtering and potentially limiting network airtime to consumptive non required applications negatively impacting network performance.
  • class <1-4> – Map the specified application category to a traffic-shaper class from 1 - 4.
    Note: app-category <APP-CATEGORY-NAME> – Specify the application category name. To list the available application categories, press [TAB] after entering app-category. Select the required category from the displayed list.
Before configuring an application category to class mapping, ensure that the specified classes have been configured. Use the ‘class > [max-buffers|max-latency|rate]‘ option available with this command to configure a traffic shaper class. For more information, see following parameter tables.
traffic-shape application <APPLICATION-NAME> class <1-4>
traffic-shape app-category <APPLICATION-NAME> class <1-4> Configures an application to traffic-class mapping. Use this option to apply an application to traffic-shaper class mapping.
  • app-category <APPLICATION-NAME> – Specify the application name.
    • class <1-4> – Map the specified application to a traffic-shaper class from 1 - 4.
      Note: Before configuring an application to class mapping, ensure that the specified classes have been configured. Use the ‘class > [max-buffers|max-latency|rate] option available with this command to configure a traffic shaper class. For more information, see following tables.
traffic-shape class <1-4> max-buffers <1-400> {red-level <1-400>|red-percent <1-100>}
traffic-shape class <1-4> max-buffers <1-400> Configures the queue length limit for different traffic-shaper class
  • class <1-4> – Specify the traffic-shaper class from 1 - 4.
    • max-buffers <1-400> – Configures the maximum queue lengths for packets of different priority queues, after which the queue starts to drop packets.
      • <1-400> – Configure the queue length limit from 1 - 400 for packets of priority queues 0, 1, 2, 3, 4, 5, 6, and 7.
        Note: For access points the upper queue length limit is 400.
red-level <1-400> Optional. Performs Random Early Drop (RED) when a specified queue length in packets is reached
  • <1-400> – Configure the queue length limit from 1 - 400 for packets of priority queues 0, 1, 2, 3, 4, 5, 6, and 7.

The RED algorithm is a queuing technique for congestion avoidance. RED monitors the average queue size and drops or marks packets. If the buffer is near empty, all incoming packets are accepted. When the queue grows, the probability for dropping an incoming packet also grows. When the buffer is full, the probability has reached 1 and all incoming packets are dropped.

Note: For more information on default values, see the Usage Guidelines section in this topic.
red-percent <1-100> Optional. Performs RED when a specified value, which is a percentage of the max-buffers configured, is reached
  • <1-100> – Configure the percentage of the maxi-buffers from 1 - 100 for packets of priority queues 0, 1, 2, 3, 4, 5, 6, and 7.
traffic-shape class <1-4> max-latency <1-1000000> [msec|usec]
traffic-shape class <1-4> max-latency <1-1000000> [msec|usec] Configures the max-latency for different traffic-shaper class. Max latency specifies the time limit after which packets start dropping (maximum packet delay in the queue). The maximum number of entries is 8.
  • class <1-4> – Specify the traffic-shaper class from 1 - 4.
    • max-latency <1-1000000> – Configures the max-latency for packets of different priority queues, after which the queue starts to drop packets.
      • <1-1000000> – Configure the max-latency from 1 - 100000 for packets of priority queues 0, 1, 2, 3, 4, 5, 6, and 7.

        [msec|usec] – Configures the unit for measuring latency as milliseconds (msec) or microseconds (usec). The default setting is msec.

traffic-shape class <1-4> rate [<1-250000> [Kbps|Mbps]|total-bandwidth-percent <1-100>]
traffic-shape class <1-4> rate Configures traffic rate, in either Kbps, Mbps or percentage, for the different traffic shaper class. Specify rates for different traffic shaper class to control the maximum traffic rate sent or received on an interface. Consider this form of rate limiting on interfaces at the edge of a network to limit traffic into or out of the network. Traffic within the set limit is sent and traffic exceeding the set limit is dropped or sent with a different priority.
  • class <1-4> – Specify the traffic-shaper class from 1 - 4.
<1-250000> [Kbps|Mbps] Configures the traffic rate, in Kbps, Mbps, for the class specified in the previous step
  • <1-250000> – Specify the rate from 1 - 250000.
    • [Kbps|Mbps] – Configures the unit for measuring bandwidth as Kbps or Mbps. The default setting is Kbps.
      Note: The range varies depending on the unit selected. It is 1 - 250 Mbps, or 250 - 250000 Kbps.
total-bandwidth-percent <1-100> Configures the traffic rate, as a percentage of the total available bandwidth, for the class specified in the previous first step
  • <1-100> – Specify the traffic rate from 1 - 100% of the total bandwidth.
traffic-shape priority-map <0-7>
traffic-shape priority-map <0-7> Configures the traffic-shaper queues, within a class, having different priority values (0, 1, 2, 3, 4, 5, 6, and 7). There are 8 queues (0 - 7), and traffic is queued in each based on the incoming packet‘s 802.1p 3-bit priority markings.
  • priority-map <0-7> – Specify the priority from 0 - 7 for priority levels 0, 1, 2, 3, 4, 5, 6, and 7.

The IEEE 802.1p standards sets a 3-bit value in the MAC header to indicate prioritization. This 3-bit value provides priority levels ranging from 0 to 7 (i.e., a total of 8 levels), with level 7 representing the highest priority. This permits packets to cluster and form different traffic classes. In case of network congestion, packets with higher priority receive preferential treatment while low priority packets are kept on hold.

traffic-shape total-bandwidth <1-1000000> [Kbps|Mbps]
traffic-shape total-bandwidth <1-1000000> [Kbps|Mbps] Configures the total-bandwidth for traffic shaping
  • <1-1000000> – Specify the value from 1 - 1000000 Kbps/Mbps. The default value is 10 Mbps.
    • [Kbps|Mbps] – Configures the unit for measuring bandwidth as Kbps or Mbps. The default setting is Mbps.
      Note: The range varies depending on the unit selected. It is 1 - 1000 Mbps, or 250 - 1000000 Kbps.
traffic-shape enable
traffic-shape enable Enables traffic shaping using the defined bandwidth, rate and class mappings configured using this command
Note: Traffic shaping is disabled by default.

Usage Guidelines

Following are the default max-buffers set for the traffic shaper classes:

traffic-shape class 1 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10

traffic-shape class 2 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10

traffic-shape class 3 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10

traffic-shape class 4 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10

Following is the default priority-map settings:

traffic-shape priority-map 2 0 1 3 4 5 6 7

Example

nx9500-6C8809(config-profile-ProfileNX5500)#show context include-factory | include traffic-shape
 traffic-shape priority-map 2 0 1 3 4 5 6 7
 traffic-shape class 1 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 2 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 3 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 4 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape activation-criteria always
 traffic-shape total-bandwidth 10 Mbps
 no traffic-shape enable
nx9500-6C8809(config-profile-ProfileNX5500)#

nx9500-6C8809(config-profile-ProfileNX5500)#traffic-shape enable
nx9500-6C8809(config-profile-ProfileNX5500)#traffic-shape class 1 rate 250 Mbps
nx9500-6C8809(config-profile-ProfileNX5500)#traffic-shape application Bing class 1
nx9500-6C8809(config-profile-ProfileNX5500)#traffic-shape total-bandwidth 200 Mbps

nx9500-6C8809(config-profile-ProfileNX5500)#show context include-factory | include traffic-shape
 traffic-shape priority-map 2 0 1 3 4 5 6 7
 traffic-shape class 1 rate 250 Mbps
 traffic-shape class 1 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 2 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 3 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape class 4 max-buffers 35 35 35 30 25 20 15 10 red-level 27 27 27 23 25 20 15 10
 traffic-shape activation-criteria always
 traffic-shape application Bing class 1
 traffic-shape total-bandwidth 200 Mbps
 traffic-shape enable
nx9500-6C8809(config-profile-ProfileNX5500)#

Related Commands

no Removes traffic shaping configuration or reverts them to the default values