20090818

Cisco - Router Time based QOS with ACL

!--------------------------------------------------------------------
! Time based QOS with acl on Cisco Routers
!
! Comments : rajshekar.j@gmail.com
! The following examples allows you to create QOS on both interface
! of gateway router. With this QOS you will be able to dedicated minimum
! amount of bandwidth to end users and allow them to peak if free bandwidth
! is available also include a time range during which you can increase their
! bandwidth to a greater extent. We have defined two range time range - time_high
! and time_low. During Time range time_high, end users will be given higher
! bandwidth and during time range time_low, end user will be having a very
! lower bandwidth
! We have tested this on Cisco Router with two ethernet interfaces.
!-------------------------------------------------------------------------
!
! time ranges are defined here.
time-range time_high
periodic weekdays 08:00 to 20:00

time-range time_low
periodic weekdays 20:01 to 07:59
!
!Access control lists for both inbound traffic and outbound are defined here
!Fastethernet 0/0 - External facing interface
ip access-list extended acl_inbound_high
permit ip any host time-range time_high
!
ip access-list extended acl_inbound_low
permit ip any host time-range time_low
!
! Fastthernet 0/1 - Internal facing interface
ip access-list extended acl_outbound_high
permit ip host any time-range time_high
!
ip access-list extended acl_outbound_low
permit ip host any time-range time_low
!
!
!class map for inbound traffic are defined here.
class-map match-all class_high-in
match access-group name acl_inbound_high
class-map match-all class_low-in
match access-group name acl_inbound_low
!
!
!Policy map - QOS for inbound traffic
policy map QOS-in
class class_high-in
bandwidth 1024
shape average 1024000
class class_low-in
bandwidth 64
shape average 64000
!
! class map for outbound traffic are defined here.
!
class-map match-all class_high-out
match access-group name acl_outbound_high
class-map match-all class_low-out
match access-group name acl_outbound_low
!
!
!Policy map - QOS for outbound traffic
policy map QOS-out
class class_high-out
bandwidth 1024
shape average 1024000
class class_low-out
bandwidth 64
shape average 64000
!
! Do not forget to apply this QOS policies on outbound traffic of both interfaces of router.

No comments:

Post a Comment