There are many ways to limit bandwidth for Night and Day, but i found this person is the easiest way, here it is.
i have used Simple QUEUE, script and scheduler.
Details we have 192.168.1.0/24 network and want to limit Bandwidth for the day and the Night Time.
Network 192.168.1.0/24
Bandwidth = 06:00am - 18:00pm - 1Mbps.
Bandwidth = 18:00pm - 06:00am - 2Mbps.
Create two simple queues for the same network with different Bandwidth Limit.
/queue simple
#name="Day" target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0
interface= parent=none direction=both priority=8
queue=default-small/default-small limit-at=512k/512k
max-limit=1M/1M total-queue=default-small
#name="Night" target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0
interface= parent=none direction=both priority=8
queue=deafult-small/default-small limit-at=1M/1M
max-limit=2M/2M total-queue=default-small
Now, Write Scripts
/system script
#name="Day" source=/queue simple enable
Day; /queue simple disable Night
#name="Night" source=/queue simple enable
Night; /queue simple disable Day
Finally, Schedule it
/system scheduler
#name="Day" on-event=Day start-date=oct/13/2008
start-time=06:00:00 interval=1d
#name="Night" on-event=Night start-date=oct/13/2008 start-time=18:00:00 interval=1d
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment