Home network QoS: Modern smart home control
Home networks have more connected devices than ever, up from 11 devices per network in 2019 to 25 devices per network by the end of 2020 according to a survey by Deloitte. This era of connectivity also means more data transfer than ever, so how do we prevent network traffic jams? Introducing Quality of Service (QoS), settings in home networking hardware that allow for granular or pre-configured traffic optimization to keep devices in their lane.
What is home network QoS?
Network QoS is a feature in network traffic routing that delegates fairness between devices based on either automated or manually configured rules within a router. These settings control the timing and order of delivery for packets, the units in which network traffic is divided, measured, and delivered. Each packet contains information about the type of data being transmitted and where it's going, whether it's the images that make up a show being streamed or posts on a social media feed. QoS uses the information in each packet to optimize traffic and reduce problematic congestion by informing the router which traffic takes priority.
Why is QoS important for smart home control?
Home networks now have an unprecedented number of connected devices. While QoS started as an enterprise solution for large corporate networks that needed load balancing, home networks now require traffic prioritization to keep devices from hogging attention. This is particularly useful for those who rely on Voice over Internet Protocol (VoIP) services like video conferences. When network activities like large game downloads and media streaming occur upstairs, the home network is distracted from maintaining a solid VoIP connection to a video conference downstairs. Proper QoS settings explain to the router that the video conference takes priority over other services on the network and helps ensure a strong, sustained connection.
What does QoS do?
QoS was designed for network stability and while it wasn't created as a speed-enhancing feature, it may still give an illusion of better speeds because of how the network "feels." These configurations were designed to maintain stability on a network, and the increase in traffic efficiency makes the connected experience much smoother.
Without QoS, routers delegate resources indiscriminately on a first-come, first-served basis. Default router configurations that respond to each device sequentially are okay for homes with a bandwidth surplus in their service plan, but QoS is able to place limits on devices to prevent bandwidth hogging and leverage traffic-optimizing algorithms to prevent packet loss. This is especially useful for homes that share traffic with an abundance of devices among two or more people.
- Bandwidth: Amount of deliverable information at any given moment to each device
- Delay: Travel time from a packet's source to its final destination
- Loss: Data lost from dropped packets during traffic jams
- Jitter: Amount of mistaken sequencing in network packets due to traffic jams
QoS settings are able to allot bandwidth to specified devices, giving users the power to choose more network resources for important devices and less resources for others. They can also control the timing of packet delivery and which packets are dropped in the event of an error. For example, Explicit Congestion Notification (ECN) in OpenWRT's fq_codel queueing discipline will mark packets that are suffering from traffic congestion and notifies the router to adjust its delivery speed accordingly.
How does QoS work?
To take a look at the mechanics, we'll use two examples of QoS methodologies: Stochastic Fairness Queueing (SFQ) in MikroTik RouterOS and Smart Queue Management (SQM) in OpenWRT for Minim-enabled hardware.
SFQ was created as a pre-configuration of the tc (traffic control) command in Ubuntu Linux. It's a classless method for queueing packets on a network, meaning it does not "shape" traffic by altering speed of packet transmission; it merely optimizes the scheduling for each packet.
As network packets begin queueing, SFQ uses classifiers for the source address, source ports, destination address, and destination ports for each packet. This information is placed into a hash table, which is used to determine what category—termed a "flow"—of prioritization the packet falls under in traffic control. Once organized, packets are delivered one by one to their respective devices. As a delightful side effect, the Ubuntu manual claims this can somewhat defend against Denial-of-Service (DoS) attacks. It can also handle a maximum queue length of over 65,000 network packets.
SQM was primarily created to address buffer bloat, latency from data overload inside a router. OpenWRT's granular manual controls are particularly great for more technically savvy power users as SQM divides the configurations by:
- Basic Settings: Manages the packet queue at the slowest link in your network connection
- Queue Discipline: Chooses the method in which packets are queued
- Link Layer Adaptation: Educates the router on extraneous data in packets to better calculate packet send time
For those who want an automated, set-it-and-forget-it configuration, OpenWRT documentation recommends configuring Basic Settings to 85% of your internet service plan's speeds and setting your Queue Discipline to cake. However, users with Minim-enabled hardware don’t have to fuss with manual QoS settings themselves, since optimization techniques for their network traffic are discussed and configured with their Internet Service Providers (ISPs).
How do I enable QoS?
QoS setting availability will vary by home router hardware, as some settings can get highly technical for the average user. For users' convenience, some Internet Service Providers (ISPs) will pre-configure QoS to automatically modify their subscribers' networks. For example, Minim is able to create custom deployments for ISPs using preferred and universally beneficial QoS settings to automate network balance.
For home users who have QoS settings available on their routing hardware, here are some general steps to enabling QoS configuration:
- Use a web browser to navigate to your router's IP address, 192.168.1.1 by default
- Log in using your username and password, commonly printed on the router
- Navigate to QoS Settings to enable your preferred configuration
Depending on the hardware, the settings can get fairly detailed, which is why some users seek advice and post their prioritizations online.
Remember that computing devices do not consider human context or circumstances; unless configured otherwise, routers offer their resources based on a first-come first-served basis, with no discernment as to what's optimized for humans. Thankfully, QoS frameworks were built by humans to communicate to computers what's important for our networks.