Business Support: Network


Configuring traffic shaping

Traffic shaping is configurable on many vendors and platforms. This topic provides some of the more common vendors/platforms and how to configure traffic shaping on these devices. We recommend configuring a committed burst size equal to a 4ms Tc and an excess burst size equal to 0 bits (when applicable).

We also have a topic that provides an overview of traffic shaping.

Examples:

CIR: 50Mbps
Burst size = 50,000,000bps * .004 seconds = 200,000 bits

CIR: 20Mbps
Burst size = 20,000,000bps * .004 seconds = 80,000 bits

You can use the menu below to jump to a specific configuration or you can scroll through to find what you're looking for:

Jump to a specific configuration:

Cisco—IOS—shaping without QoS

The commands below configure the following settings and apply traffic shaping to interface FastEthernet0/1. In this example the Bc is 200,000 bits. This is because 50,000,000 bps * .004 seconds = 200,000 bits. Note you may need to adjust your queue-limit depending upon your traffic load.

CIR = 50,000,000 bits/sec
Bc = 200,000 bits
Be = 0 bits
Queue-Limit = 400 packets

CPE-ROUTER#config t
Enter configuration commands, one per line.  End with CNTL/Z.
CPE-ROUTER (config)#policy-map SHAPE
CPE-ROUTER (config-pmap)#class class-default
CPE-ROUTER (config-pmap-c)#shape average 50000000 200000 0
CPE-ROUTER (config-pmap-c)#queue-limit 400
CPE-ROUTER (config-pmap-c)#interface FastEthernet0/1
CPE-ROUTER (config-if)#service-policy output SHAPE

For reference: http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-policing/19645-policevsshape.html

Cisco—IOS—shaping with QoS

The commands below configure the following settings and apply traffic shaping to interface FastEthernet0/1. Additionally the child policy XYZ-QOS is nested under the parent policy SHAPE. The parent policy (SHAPE) provides the traffic shaping for all traffic, the child policy (XYZ-QOS) provides the QoS functions per queue (scheduling, prioritization, etc).

CIR = 50,000,000 bits/sec
Bc = 200,000 bits
Be = 0 bits
Queue-Limit = 400 packets

CPE-ROUTER#config t
Enter configuration commands, one per line.  End with CNTL/Z.
CPE-ROUTER (config)#policy-map SHAPE
CPE-ROUTER (config-pmap)#class class-default
CPE-ROUTER (config-pmap-c)#shape average 50000000 200000 0
CPE-ROUTER (config-pmap-c)#queue-limit 400
CPE-ROUTER (config-pmap-c)#service-policy XYZ-QOS
CPE-ROUTER (config-pmap-c)#interface FastEthernet0/1
CPE-ROUTER (config-if)#service-policy output SHAPE

For reference: http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-policing/19645-policevsshape.html

Cisco—IOS-XR—shaping without QoS

The commands below will configure traffic shaping and apply it to interface Te0/1/0/1.1000 with the following settings:

CIR: 50,000,000 bits/sec
Be: 1 byte

RP/0/RSP0/CPU0:CPE-ROUTER#config t
RP/0/RSP0/CPU0:CPE-ROUTER(config)#policy-map SHAPE
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap)#class class-default
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap-c)#shape average 50000000 1 bytes
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap-c)#interface Te0/1/0/1.1000
RP/0/RSP0/CPU0:CPE-ROUTER(config-subif)#service-policy output SHAPE
RP/0/RSP0/CPU0:CPE-ROUTER(config-subif)#commit

For reference: http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r4-3/qos/configuration/guide/b_qos_cg43xasr/b_qos_cg43asr_chapter_0100.html

Cisco—IOS-XR—shaping with QoS

The commands below will configure traffic shaping and apply it to interface Te0/1/0/1.1000 with the following settings. Additionally the child policy XYZ-QOS will be nested under the parent shaping policy (SHAPE).

CIR: 50,000,000 bits/sec
Be: 1 byte

RP/0/RSP0/CPU0:CPE-ROUTER#config t
RP/0/RSP0/CPU0:CPE-ROUTER(config)#policy-map SHAPE
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap)#class class-default
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap-c)#shape average 50000000 1 bytes
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap-c)#service-policy XYZ-QOS
RP/0/RSP0/CPU0:CPE-ROUTER(config-pmap-c)#interface Te0/1/0/1.1000
RP/0/RSP0/CPU0:CPE-ROUTER(config-subif)#service-policy output SHAPE
RP/0/RSP0/CPU0:CPE-ROUTER(config-subif)#commit

For reference: http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r4-3/qos/configuration/guide/b_qos_cg43xasr/b_qos_cg43asr_chapter_0100.html

Juniper—JUNOS

The commands below will configure traffic shaping on interface ge-0/0/0 with a CIR of 50 Mbits/sec

CPE-ROUTER> configure private
warning: uncommitted changes will be discarded on exit
Entering configuration mode

[edit]
CPE-ROUTER # set class-of-service interfaces ge-0/0/0 unit 0 shaping-rate 50m

[edit]
CPE-ROUTER # commit and-quit

For reference: http://www.juniper.net/techpubs/en_US/junos/topics/example/example-configuring-port-shaping.html

ADTRAN—AOS

The commands below will configure traffic shaping on interface eth 0/1 with the following settings:

CIR: 50,000,000 bits/sec
Burst: 30,000 bytes
Count-ethernet overhead = Count Ethernet FCS in bandwidth calculation

CPE-ROUTER#config t
CPE-ROUTER (config)#int eth 0/1
CPE-ROUTER (config-eth 0/1)#traffic-shape rate 50000000 30000 count-eth-overhead
CPE-ROUTER (config-eth 0/1)#end

For reference: https://supportforums.adtran.com/docs/DOC-1634

SonicWall—SonicOS

Use the information below to configure SonicWall: