In the Cisco IOS on a Catalyst switch, there’s an Interface Mode command called shape round-robin queue bandwidth.specifically, the command is srr-queue bandwidth.
This command has been around since IOS 12.2(25). For these examples, Here is example of Cisco Catalyst 3560 switch.
Entering the command appended with a question mark will display the command options. Here’s an example:
Switch(config)# interface f0/1
Switch(config-if)# srr-queue bandwidth ?
limit Configure bandwidth-limit for this interface
shape Configure shaping on transmit queues
share Configure shared bandwidth
As you can see, the command options are limit, shape, and share. While we’ll focus on the limit option this time, keep in mind that you can also use the srr-queue bandwidth command to shape and share bandwidth.
For example, as you have a 100-Mb Ethernet port on a Catalyst switch. You are selling or leasing bandwidth on that port, and a customer has bought 45 Mb of bandwidth. Then, you want to limit the outbound bandwidth on the port to 45 Mb instead of the full 100 Mb.
To do so, go to Interface Configuration Mode on the switch port, and apply the srr-queue bandwidth limit command. Here’s an example:
Cisco(config)# interface FastEthernet 0/1
Cisco(config-if)# srr-queue bandwidth limit 55
The 55 sets the outbound bandwidth limit on the port to 55 percent of the port speed. Since this is a 100-Mb port, this should limit the outbound traffic from the port to 45 Mb.
Other Options of bandwidth limiting
There are multiple ways to do this thing. One way would be to manipulate the port speed. But if you want to hard-code the port speed on the Ethernet port, Then you can do it in as mentioned in diagram: