{"id":147,"date":"2009-07-08T11:37:33","date_gmt":"2009-07-08T10:37:33","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=147"},"modified":"2009-07-08T11:39:24","modified_gmt":"2009-07-08T10:39:24","slug":"qos-%e2%80%93-throttle-bandwidth-based-on-the-time-of-day","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=147","title":{"rendered":"QoS \u2013 Throttle Bandwidth Based on the Time of Day"},"content":{"rendered":"<p><strong>Scenario:<\/strong> Say a device in your network performs incremental backups out to a server on the internet.\u00a0 These backups consume bandwidth and ruin the quality of your VoIP calls.\u00a0 You wish to throttle the bandwidth for this server traffic between 6 and 10pm (when you feel you need good phone quality). <!--more--><br \/>\nStep 1: <strong>Create an access-list that matches my file server (172.30.100.11), but <em>only during the day<\/em><\/strong>.<\/p>\n<p>Router(config)# <strong>time-range DAY <\/strong>(creates a new time range)<br \/>\nRouter(config-time-range)# <strong>periodic weekdays 6:00 to 22:00 <\/strong>(matches weekdays from 6:00am to 10:00pm)<br \/>\nRouter(config-time-range)# <strong>periodic weekend 6:00 to 22:00<\/strong> (matches weekends from 6:00am to 10:00pm)<br \/>\nRouter(config-time-range)# <strong>exit<\/strong><br \/>\nRouter(config)# <strong>ip access-list extended SERVER<\/strong><br \/>\nRouter(config-ext-nacl)# <strong>permit ip host 172.30.100.11 any time-range DAY<\/strong> (matches my server during the time-range I specified above)<br \/>\nRouter(config-ext-nacl)# <strong>exit<\/strong><br \/>\nRouter(config)#<\/p>\n<p>Step 2: <strong>Create a class-map (used for QoS) that matches the SERVER access-list we just created<\/strong>.<\/p>\n<p>Router(config)# <strong>class-map MATCH_SERVER<\/strong> (MATCH_SERVER is just the name)<br \/>\nRouter(config-class-map)# <strong>match access-group name SERVER <\/strong>(ties in the access-list above)<br \/>\nRouter(config-class-map)# <strong>exit<\/strong><br \/>\nRouter(config)#<\/p>\n<p>Step 3: <strong>Create a policy-map (used for QoS) that throttles the bandwidth<\/strong>.<\/p>\n<p>Router(config)# <strong>policy-map LIMIT_SERVER<\/strong> (creates the policy)<br \/>\nRouter(config-pmap)# <strong>class MATCH_SERVER<\/strong> (applies policy to this class)<br \/>\nRouter(config-pmap-c)# <strong>police 80000 <\/strong>(limits bandwidth to 80Kbps)<br \/>\nRouter(config-pmap-c)# <strong>exit<\/strong><br \/>\nRouter(config-pmap)# <strong>exit<\/strong><br \/>\nRouter(config)#<\/p>\n<p>Step 4: <strong>Apply the new policy to the incoming interface (the one connected to my LAN, not the Internet)<\/strong>.<\/p>\n<p>Router(config)# <strong>interface fa0\/0<\/strong><br \/>\nRouter(config-if)# <strong>service-policy input LIMIT_SERVER<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scenario: Say a device in your network performs incremental backups out to a server on the internet.\u00a0 These backups consume bandwidth and ruin the quality of your VoIP calls.\u00a0 You wish to throttle the bandwidth for this server traffic between 6 and 10pm (when you feel you need good phone quality).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[3],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/147"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":3,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":149,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions\/149"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}