I have a Draytek Vigor2820Vn at home that provides ADSL 2+ services (until the NBN rollout is completed in our area later this year). We get a steady 14 Mbit downstream and 0.8MBit upstream from that device to iiNet. Since becoming a heavy user of Usenet we have suffered from the problem of network saturation, as lifeline (our SABnzbd and torrent host) sucks down maximum bandwidth from the news servers. I knew that the router has quality of service and bandwidth limitation features built in, but it wasn’t until this weekend that I experimented with them in an effort to solve the problem. Now that I have, it might be useful for others to know how.
First things first, shoot over to the Draytek support site and download the latest firmware for the device. I was running 220.127.116.11 from November 2010 and 18.104.22.168 is the latest, released in October 2012. Note that the release notes for 22.214.171.124 recommended upgrading to 126.96.36.199 first if you’re running an older firmware as the web user interface changed between releases, and using 188.8.131.52 as a stepping stone is the approved upgrade path. You can download older firmwares, including 184.108.40.206, from the Draytek FTP server.
With the shiny new firmware freshly installed I dug about in the Bandwidth Management menu options, knowing that either bandwidth Limit or Quality of Service would be what I wanted.
Bandwidth Limit is used, from what I can tell, to dedicate a maximum amount of bandwidth to an IP on the network. I want almost the opposite of that, and so after further digging I worked out that it was Quality of Service that I needed to investigate further.
QoS can be used to ensure minimum service levels for various applications (or rather, protocols) and is commonly used in conjunection with VOIP on the 2820Vn. In my case it’s a much simpler problem to solve – traffic to all IPs other that lifeline should take priority, but lifeline can use all the bandwidth if nobody else is. To create this formula I edited the Class 1 Class Rule and added a rule that matched all IPs within the range 192.168.10.2 – 192.168.10.254 (which is everything other than lifeline). This rule matches any Remote Address, any DiffServ CodePoint and any Service Type. I named Class Rule 1 “Preferred” and saved it. Back on the QoS admin page I setup the WAN1 rule and enabled QoS in both directions. I allocated 95% bandwidth to “Preferred”, 1% each to Class 2 and 3, and left 3% for Others.
My testing showed that this setup worked perfectly for the scenario when any other host on our network (wired or wireless) required bandwidth it was diverted from lifeline until it was no longer required, at which point lifeline maxed out the link again. No more lagging YouTube videos or slow web pages!
I went back and added some additional rules to handle remote access into my network, namely the web applications that I use to manage the downloading, and SSH. These rules include lifeline in the preferred pool for those protocols only. Connecting my laptop to the iPhone’s LTE showed the desired effects when coming into our network too.
With how easy QoS was to setup and configure on the Draytek it makes me regret not looking into it in more detail sooner. Furthermore, when the NBN gets lit up on my street I’ll be looking to Draytek for router options (though I do love using pfSense).