[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1420
  • Last Modified:

Cisco Time based Traffic Shaping

We have a server in head office that sends out updates to remote office servers regularly. When this happens it can slow down the connections between offices by utilizing most of the bandwidth. I want to throttle the bandwidth that travels over our WAN links and implement a time scheule so that after hours it can use more bandwidth. We only have T1 connections to remote offices so the bandwidth isnt that huge. This is what I have now and it is effectively shaping the traffic but I want to add some time rules for it.

interface FastEthernet0/0
 ip address 192.168.4.21 255.255.252.0

interface FastEthernet0/1
  ip address 172.17.1.6 255.255.255.252
  traffic-shape group 102 395264 49408 49408 1000

access-list 102 permit ip host 192.168.5.2 any
access-list 102 permit ip any host 192.168.5.2
0
damte
Asked:
damte
  • 2
2 Solutions
 
rochey2009Commented:
Hi,

Try the following:

Create a time range.

time-range shape-server
 periodic weekdays 8:00 to 18:00

replace your access-list with:

access-list 102 permit ip host 192.168.5.2 any time-range shape-server
access-list 102 permit ip any host 192.168.5.2 time-range shape-server
0
 
voyager2ieCommented:
While you can continue to use Generic Traffic Shaping to achieve the desired result, using CBWFQ is much more scalable and will allow you to do a lot more.

Use the following configurations to enable time-based traffic shaping:

---Define the time ranges (use your own values here)---
time-range DAY
 periodic daily 8:00 to 20:00
!
time-range NIGHT
 periodic weekdays 20:01 to 7:59
 periodic weekend 0:00 to 23:59
 
---Configure ACLs to specify interesting traffic and call the time ranges---

 ip access-list extended police-updates-daytime
  permit ip host 192.168.5.2 any time-range DAY
 ip access-list extended police-updates-nighttime
  permit ip host 192.168.5.2 any time-range NIGHT
 
 ---Configure class-map statements which call the ACLs---

 class-map match-all police-updates-daytime
   description Police updates to remote sites between 8am to 8pm
   match access-group name police-updates-daytime
 class-map match-all police-updates-nighttime
   description Police updates to remote sites between 8pm to 8am and weekends
   match access-group name police-updates-nighttime
 !
 
---Configure the main policy-map which calls the two class-maps and enforces the max BW for the server during the time ranges (again, use your own BW values...I set 200Kbps max during the day and full 1.544 at night/weekends)---

 policy-map Police-Update-Traffic
  class police-updates-daytime
     police 200000
  class police-updates-nighttime
     police 1544000

Once this is in, you will need to bind this to your WAN interface:

int Fa0/1:
service-policy output Police-Update-Traffic

Using this method should allow you to easily tack other shaping needs on top...more config than what you have now, but much more flexible.

Hope this helps!
0
 
damteAuthor Commented:
Thank you for the responces. Both seemed to have working in my testing.

Voyager2ie, just one command that did not work for me was:
periodic weekdays 20:01 to 7:59
I had to separate those in 2 commands, I was not able to have an end time less that the start time. Fixed by
periodic weekdays 20:01 to 23:59
periodic weekdays 0:00 to 7:59
0
 
voyager2ieCommented:
Good catch. I forgot about the change of day when there are multiple statements.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now