Tuesday, October 18, 2016

Limit bandwidth on cisco router differently base on destination ip address

*** todo
- target host subnet 10.0.0.0/24
- limit 512kbps to subnet 192.168.56.0/24
- all other subnet limit to 265kbps


1- configuration on router

class-map match-any alltraffic
 match access-group 115
class-map match-any intranettraffic
 match access-group 100
!            
policy-map queueHost1
 class intranettraffic
   police cir 512000 bc 51200 be 51200
     conform-action transmit
     exceed-action drop
     violate-action drop
 class alltraffic
   police cir 256000 bc 25600 be 25600
     conform-action transmit
     exceed-action drop
     violate-action drop  
!        
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.0
 duplex auto
 speed auto
 service-policy input queueHost1
 service-policy output queueHost1
!        
interface FastEthernet0/1
 ip address 10.0.1.2 255.255.255.0
 duplex auto
 speed auto
!        
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.0.1.1
!               
ip http server
no ip http secure-server
!        
access-list 100 permit ip 10.0.0.0 0.0.0.255 192.168.56.0 0.0.0.255
access-list 100 permit ip 192.168.56.0 0.0.0.255 10.0.0.0 0.0.0.255
access-list 115 permit ip 10.0.0.0 0.0.0.255 any
access-list 115 permit ip any 10.0.0.0 0.0.0.255



2- after configuration router as above, we ready to test

- snapshot of download file base on the requirement we set above


No comments:

Post a Comment