Skip to content

Instantly share code, notes, and snippets.

@mostlygeek
Created August 9, 2014 08:20
Show Gist options
  • Save mostlygeek/d01fe931a69eb868c4f5 to your computer and use it in GitHub Desktop.
Save mostlygeek/d01fe931a69eb868c4f5 to your computer and use it in GitHub Desktop.
EdgeRouter LIte QoS configuration
#
# Settings for EdgeRouter Lite Traffic Shaping for a Shaw 25/2.5mbit connection
#
set traffic-policy shaper shaw25mbit
set traffic-policy shaper shaw25mbit description "QoS policy for home network"
set traffic-policy shaper shaw25mbit bandwidth 25mbit
# give priority to DNS / SSH because lag sucks here
set traffic-policy shaper shaw25mbit class 10 description "top"
set traffic-policy shaper shaw25mbit class 10 bandwidth 25%
set traffic-policy shaper shaw25mbit class 10 ceiling 100%
set traffic-policy shaper shaw25mbit class 10 match dns ip destination port 53
set traffic-policy shaper shaw25mbit class 10 match ssh ip destination port 22
# keep the web flowing!
set traffic-policy shaper shaw25mbit class 20 description "standard"
set traffic-policy shaper shaw25mbit class 20 bandwidth 50%
set traffic-policy shaper shaw25mbit class 20 ceiling 100%
set traffic-policy shaper shaw25mbit class 20 match http ip destination port '80'
set traffic-policy shaper shaw25mbit class 20 match https ip destination port '443'
# everything else gets 25% up to 100% of the traffic
set traffic-policy shaper shaw25mbit default bandwidth 25%
set traffic-policy shaper shaw25mbit default ceiling 100%
set interfaces ethernet eth0 traffic-policy out 'shaw25mbit'
commit
save
@sourcequench
Copy link

Stumbled on this from a Google search. this policy is outbound on eth0, which is presumably your upstream. a bandwidth limit that is higher (25mbit) than your upstream, 2.5mbit, won't actually do anything (even 25% for your smallest class is larger than your upstream). Are there logs for queue drops you can use to validate this stuff after applying the policy? (I've not done this yet, but will soon, so I am curious)

@beigna
Copy link

beigna commented Jan 13, 2017

Hi! I'm new on Ubiquity land. Can you help me to implement the equivalent of these https://gist.github.com/nachopro/f836868a68f6ec666a26

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment