Bandwidth restricting/limiting/shaping with sub-interface in Cisco IOS

Bandwidth restricting/limiting/shaping with Sub-Interfaces in Cisco IOS


The following port describes on what is bandwidth limiting and how we can configure them with Cisco routers which are configured with Sub-Interfaces.

Scenario:


Switch0 configure with 3 vlans
Router0 configured with 3 sub-interfaces with correct vlan tags.
switch <--> router configured as trunk port.

Configuration in router: 

Creating access lists that matches the LAN networks.

access-list 101 permit ip any 192.168.10.0 0.0.0.255
access-list 102 permit ip any 192.168.20.0 0.0.0.255
access-list 103 permit ip any 192.168.30.0 0.0.0.255 

Creating class-maps that maps to the LAN networks:

 class-map match-all vlan10
 match access-group 101
class-map match-all vlan20
 match access-group 102
class-map match-all vlan30
 match access-group 103

Note: here vlan10, vlan20, vlan30 are the names of the class-maps that we have created.


Creating a policy map:

policy-map ratelimit
 class vlan20
  shape average 8388608
 class vlan30
  shape average 8388608
 class vlan10
  shape average 8388608
 class class-default
  shape average 24000000


Where, ratelimit is the name of the policy-map and vlan10,vlan20and vlan30 are the class-maps that we have created earlier.
Note: In the class class-default we should give the total bandwidth that we want to do shaping.

Applying policy map to interfaces:

interface GigabitEthernet0/1.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 service-policy output ratelimit

interface GigabitEthernet0/1.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 service-policy output ratelimit

interface GigabitEthernet0/1.30
 encapsulation dot1Q 30
 ip address 192.168.30.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 service-policy output ratelimit



That's it.. ;)

Comments

Popular posts from this blog

Converting cisco 1852 AP to controller (Mobility express)

Cisco Access Point Cap to Sap / Sap to Cap conversion

HP Switch Comware firmware Upgradation