« Using a Cisco Router as a DNS Server | Main | Recovering Hidden PIX Pre-Shared Keys/Passwords »

June 24, 2007

Throttle Bandwidth Based on the Time of Day

Okay...thanks to good-ol Vonage, I've thought of a simple, yet brilliant (in my humble opinion) method to throttle bandwidth based on the time of day. Here's the story: I use Vonage VoIP lines for ALL of my phone lines at home - primarily because I'm cheap, not because of the VoIP "cool factor." The problem? I run a massive file server at home that holds every digital picture, work project, video recording, etc... that I've ever done. Sure, I have a local backup that runs, but I always think "what if the house burns down?!?" so...I have an automated program that backs EVERYTHING up to a remote FTP server anytime things change (add/deletes/etc.) on my file server. The problem? I save so much stuff to the server, the FTP file backup is always running and destroying my Vonage call quality for my home phone. Here's how I fixed it:

Step 1: Create an access-list that matches my file server (172.30.100.11), but only during the day.

Router(config)# time-range DAY (creates a new time range)
Router(config-time-range)# periodic weekdays 6:00 to 22:00 (matches weekdays from 6:00am to 10:00pm)
Router(config-time-range)# periodic weekend 6:00 to 22:00 (matches weekends from 6:00am to 10:00pm)
Router(config-time-range)# exit
Router(config)# ip access-list extended SERVER
Router(config-ext-nacl)# permit ip host 172.30.100.11 any time-range DAY (matches my server during the time-range I specified above)
Router(config-ext-nacl)# exit
Router(config)#

Step 2: Create a class-map (used for QoS) that matches the SERVER access-list we just created.

Router(config)# class-map MATCH_SERVER (MATCH_SERVER is just the name)
Router(config-class-map)# match access-group name SERVER (ties in the access-list above)
Router(config-class-map)# exit
Router(config)#

Step 3: Create a policy-map (used for QoS) that throttles the bandwidth.

Router(config)# policy-map LIMIT_SERVER (creates the policy)
Router(config-pmap)# class MATCH_SERVER (applies policy to this class)
Router(config-pmap-c)# police 80000 (limits bandwidth to 80Kbps)
Router(config-pmap-c)# exit
Router(config-pmap)# exit
Router(config)#

Step 4: Apply the new policy to the incoming interface (the one connected to my LAN, not the Internet).

Router(config)# interface fa0/0
Router(config-if)# service-policy input LIMIT_SERVER

Awesome. Vonage issue solved. Now, I know this is a little cheezy home scenario, but if you think of it, you could apply this logic for any business, any type of traffic, any time of day. You could stretch this to just about any situation!!

Posted by JC at June 24, 2007 2:32 PM

Trackback Pings

TrackBack URL for this entry:
http://www.cioara.org/cgi-bin/mt-tb.cgi/143

Comments

JC,

Absolutely works. I have the same problem on my end, mostly caused by my kids downloading files, etc.. Thanks for the tip.

AIM-VOICE-30

Posted by: Jon G at June 25, 2007 3:14 PM

Sounds good. However why don't you just configure QoS with priority queue?

Posted by: Mike S. at July 17, 2007 1:16 PM

Looks good, but complicated. Why don't you use QoS with priority queue?

Posted by: mike4kz at July 17, 2007 1:18 PM

Post a comment




Remember Me?

(you may use HTML tags for style)