Quantcast
Channel: EdgeRouter topics
Viewing all articles
Browse latest Browse all 20028

Time of day bandwidth restrictions

$
0
0
It took me a little while to figure it out, but I eventually managed to create some time of day bandwidth restrictions and thought I'd share what I did so someone else can find it easily. In this example, I wanted to restrict a box running CrashPlan from using more than 4Mbps during the day and allow unlimited bandwidth at night. First, create a rule to mark the packets. This mark will be used to apply a traffic-policy to them. In my case, the machine has a static IP and is used exclusively for the kind of traffic I want to modify. I wanted to throttle it between 7AM and midnight, hours when someone could be awake. set firewall modify throttle rule 10 action modify set firewall modify throttle rule 10 description 'Limit CrashPlan bandwidth' set firewall modify throttle rule 10 modify mark 10 set firewall modify throttle rule 10 source address 192.168.1.240 set firewall modify throttle rule 10 time starttime '07:00:00' set firewall modify throttle rule 10 time stoptime '23:59:59' set firewall modify throttle rule 20 action modify set firewall modify throttle rule 20 modify connmark save-mark Make sure you associate the modify policy with your WAN interface. set interfaces ethernet eth1 firewall out modify throttle Next, you need to specify how to want to restrict the packets with that mark. I used a shaper policy since it can filter by mark. This is set to make sure that packets marked with 10 won't exceed 40% of my available upstream or 4Mbps. set traffic-policy shaper CrashPlan bandwidth 10000kbit set traffic-policy shaper CrashPlan class 10 bandwidth 40% set traffic-policy shaper CrashPlan class 10 burst 15k set traffic-policy shaper CrashPlan class 10 match CrashPlan mark 10 set traffic-policy shaper CrashPlan class 10 queue-type fair-queue set traffic-policy shaper CrashPlan default bandwidth 100% set traffic-policy shaper CrashPlan default burst 15k set traffic-policy shaper CrashPlan default queue-type fair-queue And don't forget to associate the traffic-policy with your WAN interface too. set interfaces ethernet eth1 traffic-policy out CrashPlan Viola, time of day bandwidth limits! I hope this helps someone else avoid the time I had to spend doing research and playing around.

Viewing all articles
Browse latest Browse all 20028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>