Using Generic Traffic Shaping
Problem
You want to do traffic shaping on an interface.
Solution
Generic Traffic Shaping works on an entire interface to limit the rate that it sends data. This first version restricts all outbound traffic to 500,000 bits per second:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interfaceRouter(config-if)#FastEthernet0/0traffic-shape rateRouter(config-if)#500000exitRouter(config)#endRouter#
You can also specify traffic shaping for packets that match a particular access-list. This will buffer only the matching traffic, and leave all other traffic to use the default queuing mechanism for the interface:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list101permit tcp any eqwwwanyRouter(config)#access-list101permit tcp any any eqRouter(config)#wwwaccess-list102permit tcp any eqftpanyRouter(config)#access-list102permit tcp any any eqRouter(config)#ftpinterfaceRouter(config-if)#FastEthernet0/0traffic-shape groupRouter(config-if)#101 100000traffic-shape groupRouter(config-if)#102 200000exitRouter(config)#endRouter#
There is also a newer class-based method for configuring traffic shaping on an interface using CBWFQ. We discuss this technique in Recipe 11.16.
Discussion
The first example shows how to configure an interface to restrict the total amount of outbound information. This is extremely useful when there is something ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access