cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
528
Views
5
Helpful
3
Replies

how can I limit internet bandwidth for some ip clients?

Samiullah Osman
Level 1
Level 1

I have a C3900 cisco router and I want to limit internet bandwidth for some users using there ip address. How can I do this?

I appreciate any replay. 

1 Accepted Solution

Accepted Solutions

anboom
Cisco Employee
Cisco Employee

as @Thomas Schmitt mentioned, you could use an ACL to shape traffic for traffic. I added an example you can use below.

There are different ways to do this, and if you want to test in a lab, check out this link on QoS on Cisco IOS:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_regpkt/configuration/15-mt/qos-regpkt-15-mt-book/qos-regpkt-gts.html

 

Configuring Generic Traffic Shaping Using an Access Control List

SUMMARY STEPS
1.    enable

2.    configure terminal

3.    access-list access-list-number {deny | permitsource [source-wildcard]

4.    interface type number

5.    traffic-shape group access-list bit-rate [burst-size [excess-burst-size]]

6.    end

7.    show traffic-shape [interface-type interface-number]

8.    show traffic-shape statistics [interface-type interface-number]

9.    exit

DETAILED STEPS
  Command or Action Purpose
Step 1 enable


Example:
Router> enable
 

Enables privileged EXEC mode.

  • Enter your password if prompted.

     

 
Step 2 configure terminal


Example:
Router# configure terminal
 

Enters global configuration mode.

 
Step 3 access-list access-list-number {deny | permitsource [source-wildcard]


Example:
Router(config)# access-list 1 permit 192.5.34.0 0.0.0.255
 

Shapes traffic according to specified access list.

  • Enter the access list number, one of the required keywords, and the source information. 

     

Step 4 interface type number


Example:
Router(config)# interface s4/0 
 

Configures an interface (or subinterface) type and enters interface configuration mode.

  • Enter the interface type number.

     

 
Step 5 traffic-shape group access-list bit-rate [burst-size [excess-burst-size]]


Example:
Router(config-if)# traffic-shape group 101 128000
 

Enables traffic shaping based on a specific access list for outbound traffic on an interface.

  • Enter the access list number and the bit rate.

     

 
Step 6 end


Example:
Router(config-if)# end 
 

Returns to privileged EXEC mode.

 
Step 7 show traffic-shape [interface-type interface-number]


Example:
Router# show traffic-shape serial4/0
 

(Optional) Displays the current traffic-shaping configuration.

 
Step 8 show traffic-shape statistics [interface-type interface-number]


Example:
Router# show traffic-shape statistics serial4/0
 

(Optional) Displays the current traffic-shaping statistics.

 
Step 9 exit


Example:
Router# exit
 

(Optional) Exits privileged EXEC mode.

 
What to Do Next

anboom_0-1668416259089.gif

 

Note

Repeat the above procedure for each additional type of traffic you want to shape.


View solution in original post

3 Replies 3

Thomas Schmitt
Level 1
Level 1

You can create an ACL matching IP addresses, then apply that ACL to new class and then create a service policy to shape traffic from that class

anboom
Cisco Employee
Cisco Employee

as @Thomas Schmitt mentioned, you could use an ACL to shape traffic for traffic. I added an example you can use below.

There are different ways to do this, and if you want to test in a lab, check out this link on QoS on Cisco IOS:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_regpkt/configuration/15-mt/qos-regpkt-15-mt-book/qos-regpkt-gts.html

 

Configuring Generic Traffic Shaping Using an Access Control List

SUMMARY STEPS
1.    enable

2.    configure terminal

3.    access-list access-list-number {deny | permitsource [source-wildcard]

4.    interface type number

5.    traffic-shape group access-list bit-rate [burst-size [excess-burst-size]]

6.    end

7.    show traffic-shape [interface-type interface-number]

8.    show traffic-shape statistics [interface-type interface-number]

9.    exit

DETAILED STEPS
  Command or Action Purpose
Step 1 enable


Example:
Router> enable
 

Enables privileged EXEC mode.

  • Enter your password if prompted.

     

 
Step 2 configure terminal


Example:
Router# configure terminal
 

Enters global configuration mode.

 
Step 3 access-list access-list-number {deny | permitsource [source-wildcard]


Example:
Router(config)# access-list 1 permit 192.5.34.0 0.0.0.255
 

Shapes traffic according to specified access list.

  • Enter the access list number, one of the required keywords, and the source information. 

     

Step 4 interface type number


Example:
Router(config)# interface s4/0 
 

Configures an interface (or subinterface) type and enters interface configuration mode.

  • Enter the interface type number.

     

 
Step 5 traffic-shape group access-list bit-rate [burst-size [excess-burst-size]]


Example:
Router(config-if)# traffic-shape group 101 128000
 

Enables traffic shaping based on a specific access list for outbound traffic on an interface.

  • Enter the access list number and the bit rate.

     

 
Step 6 end


Example:
Router(config-if)# end 
 

Returns to privileged EXEC mode.

 
Step 7 show traffic-shape [interface-type interface-number]


Example:
Router# show traffic-shape serial4/0
 

(Optional) Displays the current traffic-shaping configuration.

 
Step 8 show traffic-shape statistics [interface-type interface-number]


Example:
Router# show traffic-shape statistics serial4/0
 

(Optional) Displays the current traffic-shaping statistics.

 
Step 9 exit


Example:
Router# exit
 

(Optional) Exits privileged EXEC mode.

 
What to Do Next

anboom_0-1668416259089.gif

 

Note

Repeat the above procedure for each additional type of traffic you want to shape.


BTW, do take note this is for IOS Release 15M&T.

I recall (?) on some later ISRs finding GTS no longer provided on interfaces.  Needed to use CBWFQ's traffic shaping.  Which interestingly, in the referenced document has the note:


GTS is similar to Class-Based Traffic Shaping. Although Class-Based Traffic Shaping is the Cisco-recommended mechanism, GTS is still supported.


Review Cisco Networking for a $25 gift card