Showing results for 
Search instead for 
Did you mean: 

about traffic shaping

Could you please  give me the simplest configuration  to  shape  all outgoing traffic  in cisco iou GNS3 to 20 mpbs ?

5 Replies 5

Joseph W. Doherty
Hall of Fame Master Hall of Fame Master
Hall of Fame Master

For what device running what IOS?


Hello @historicalswimming,

Basic config to adapt following your equipement and you case:

interface GigabitEthernet0/0
description LAN interface
ip address

interface GigabitEthernet0/1
description WAN interface
ip address
service-policy output SHAPE-TRAFFIC

class-map match-any TRAFFIC
match any

policy-map SHAPE-TRAFFIC
shape average 20000000

--Class-map match any traffic, the service-policy is applied directly to the WAN interface (GigabitEthernet0/1). This ensures that all outgoing traffic on the WAN interface will be shaped to a rate of 20 Mbps.



Best regards
******* If This Helps, Please Rate *******

What M02@rt37 describes would be one way to shape all interface traffic to 20Mbps.

But is it the "simplest" approach?  I believe not.

Possibly a simpler CBWFQ policy would be to drop the class-map TRAFFIC, and within the policy-map, use class "class-default" instead.

However, even using CBWFQ assumes your GNS3 device supports it (which it likely does).  However, if you truly want the "simplest" shaping, before CBWFQ, there was interface GTS (generic traffic shaping).  I recall (?), though the later IOS versions have stopped supporting this, but often IOS being used with GNS3 is an older version.

Definitely, both traffic shaping features were available on many IOS versions, and I would usually recommend using the CBWFQ version, if available, but if you truly want "simplest", I suggest GTS is that.

paul driver
VIP Expert VIP Expert
VIP Expert

You could apply a simple Hqos policy to traffic shape to 20MB

access-list 1 permit any
class-map  all_traffic_cm
match access-group 1

policy_map child_pm

class all_traffic_cm

policy_map parent_pm
class class-default
shape average 20mb
service-policy child_pm

int x/x
description WAN
service-policy output parent_pm

Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards

Ah, @paul driver reply appears to have been posted while I was composing my prior reply.

Basically, what I wrote in my prior reply, also applies to Paul too.

I.e. For the "simplest configuration" CBWFQ approach, likely:

policy-map SimpleShaper
class class-default
shape average 20000000

interface x
service-policy output SimpleShaper

Possibly the "simplest configuration":

interface x
traffic-shape rate 20000000

If you factor in other considerations, for using a shaper, beyond it being the "simplest configuration", then what both Paul and M02@rt37 have shown, should be considered.  For example, Paul's example of using a child policy.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers