time based policy

Answered Question
May 2nd, 2012

Dear All, I have configured policies to shape the traffic on the interface of cisco 7206 router. Now my managemet wants to configure these policies on time based ie policy should be applicable during specified time period onle. Is it possible? if yes how to configure it?

Please help.                 

I have this problem too.
0 votes
Correct Answer by John Blakley about 1 year 11 months ago

Yes. You can use the time range anywhere an acl can be used as far as I know...

John

Please rate all useful posts...

Correct Answer by John Blakley about 1 year 11 months ago

You can do it depending on how your class maps are set up. If you're classifying traffic with an acl, you can create a time range and then apply that time range to your acl. Let's say that you want to shape web traffic between the hours of 8am and 10am, but anytime after that is not shaped and has 100% of the link:

time-range Web

     periodic 08:00 to 10:00

ip access-list ext Web

     permit tcp any any eq 80 time-range Web

class-map Web

match access-group name Web

policy-map Web

class Web

shape average 128000

class class-default

int s0/0

service-policy output Web

This would shape their traffic only between those hours.

HTH,

John

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (2 ratings)
Correct Answer
John Blakley Wed, 05/02/2012 - 03:43

You can do it depending on how your class maps are set up. If you're classifying traffic with an acl, you can create a time range and then apply that time range to your acl. Let's say that you want to shape web traffic between the hours of 8am and 10am, but anytime after that is not shaped and has 100% of the link:

time-range Web

     periodic 08:00 to 10:00

ip access-list ext Web

     permit tcp any any eq 80 time-range Web

class-map Web

match access-group name Web

policy-map Web

class Web

shape average 128000

class class-default

int s0/0

service-policy output Web

This would shape their traffic only between those hours.

HTH,

John

apkothiyal Thu, 05/03/2012 - 04:07

thanks dear for support, can i use time range in rate limit also?

Correct Answer
John Blakley Thu, 05/03/2012 - 04:12

Yes. You can use the time range anywhere an acl can be used as far as I know...

John

Please rate all useful posts...

apkothiyal Fri, 05/18/2012 - 02:34

Dear I ahve applied the policy as stated but i am facing some problem, Some time policy does not get started autometically at the specified time. and not gets stoped at the  configured time.

I have to remove and apply policy on interface to take effect.

following is the configuration i have done.

time-range wimx
periodic daily 7:00 to 17:30


access-list 115 permit ip any any time-range wimax

class-map wimax
  match access-group 115

policy-map wimax
  class wimax
    police cir 200000000 bc 31250000 be 31250000 conform-action transmit exceed-action drop violate-action drop
  class class-default

I am using cisco 7206 router running c7600rsp72043-advipservicesk9-mz.122-33.SRD5 ios.

Please help.....

John Blakley Fri, 05/18/2012 - 03:40

If I'm understanding you right, does the policy only work during the time if you remove it and then reapply it? What time does the local clock say on the router? Is it correct? ("sh clock") When you look at the access-list during the time that it's not working, does the access-list say "Inactive"? Are you wanting to police the traffic inbound during this time? If so, you could change your direction on the interface to "service-policy input wimax". Otherwise, you may need to look for bugs in the OS that you have or upgrade the OS as a test.

apkothiyal Fri, 05/18/2012 - 03:52

Dear following is the observation.

I mean if the policy applied on the interface it starts activated and some time even after beyond end time policy did not go to default. when i checked the show time-range and show access-list 115, both setting shows inactive.system clock is showing the correct time. but i have applied policy in both direction in and out. is it becose of this?

John Blakley Fri, 05/18/2012 - 04:02

If the time is showing inactive during the time that it should be active, I'd look into updating the OS. There could be a bug. You can apply the policy in and outbound with no issues. When the ACL is inactive, it shouldn't match on the class. I'm going to lab this up and get back with you....

John Blakley Fri, 05/18/2012 - 04:21

I did this in GNS with a 3745:

3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(15)T14, RELEASE SOFTWARE (fc2)

Actions

Login or Register to take actions

This Discussion

Posted May 2, 2012 at 2:58 AM
Stats:
Replies:11 Avg. Rating:5
Views:798 Votes:0
Shares:0
Tags: policy, based
+

Related Content

Discussions Leaderboard