Quality of Service
What is Quality of Service?
Sharing an Internet connection with limited bandwidth between many purposes, such as making a Skype call while someone else is watching streaming videos can result in the call breaking up or reducing in quality if the demand placed on the connection exceeds the connection's bandwidth.
Quality of Service is used as a solution to this issue by queuing data that isn't sensitive to delays, using a queueing system and reserved bandwidth and prioritising important traffic so that it is not delayed. This allows the time sensitive data such as Voice over IP to be sent first and without degrading the quality of either data type.
An Internet router without Quality of Service will treat all traffic on a "first come, first served" basis, which isn't a problem when there is enough bandwidth available for all applications. However, when the connection is fully utilised, this may result in time sensitive data waiting in the queue behind a bulk of data that isn't sensitive to delays.
The Quality of Service system available on DrayTek routers allows for full control of how traffic is prioritised and bandwidth is reserved, with five queues available (VoIP, High, Medium, Low, Other) .
The router assigns sessions to each one of these queues and schedules packets to be sent through the router in an order of priority instead of "first come, first served", with reserved bandwidth available to each queue, to ensure that important data can always be sent.
Assigning traffic to a Quality of Service queue requires matching a detail of a session, similarly to how the router's Firewall allows or blocks traffic based on matching criteria.
DrayTek's QoS system can classify traffic based on these parameters:
|The IP address (Single IP, Range IP or Subnet) of a local computer, server or device on the network, for instance to prioritise all traffic from a specified PC|
|Remote Address||The Internet / WAN IP address (Single IP, Range IP or Subnet) that the session is being sent to, which could be used to prioritise traffic to a remote website or the IP addresses of remote PCs available through a VPN tunnel|
|Service Type||The type of traffic, such as HTTPS, FTP, DNS, Ping. The router has a number of pre-defined types and any TCP or UDP port / range can be specified|
|DiffServ CodePoint (DSCP)||Traffic that has a DSCP or 802.1Q Priority tag assigned to it either by a managed switch or an IP phone. Many IP phones can tag time sensitive call audio so that it can be prioritised when the IP address and Service Type may not be constant|
The queuing system of Quality of Service uses five queues to determine the importance of each type of traffic. The router's packet scheduling re-orders packets so that highest priority traffic is sent first and with less latency than lower priority traffic, which is sent after the high priority packets have been sent.
This Quality of Service Status gives an example of how traffic is split into each of these queues:
- Time sensitive data is assigned the VoIP, High and Medium priority queues
- High bandwidth, bulk data is being assigned to the Low and Other priority queues
The Class 1, 2 and 3 queues can be configured to re-tag packets sent out by the router to the Internet connection with a DiffServ-CodePoint priority tag, your ISP can use these to prioritise traffic based on the tag used, if your ISP or WAN supports DSCP packet tags.
DrayTek's Quality of Service system is designed to be able to guarantee specified levels of bandwidth to each of the Class queues, as a percentage of the bandwidth available to each one of its Internet connections. When there is a matching traffic type detected, the router reserves the bandwidth assigned to the queue so that traffic in other queues cannot use that bandwidth, leaving it instantly available for use when needed.
The bandwidth available to each Internet connection is specified so that the router can divide traffic fairly between the different queues. On DrayTek routers with a built-in ADSL or VDSL modem, the router will automatically define the bandwidth available for the Quality of Service system through the DSL connection's Link Speed.
In this example, traffic in the High priority queue has 20Mbps reserved when High priority sessions are passing through the router; even if they're not using the full bandwidth at the time. This stops lower priority queues from interrupting the High priority queue if it needs to use more bandwidth.
The QoS system will allow the High priority queue to use the full 80Mbps of bandwidth if it's required, with 20Mbps being the minimum it would have available.
When there is no traffic detected in the High priority queue, that reserved bandwidth is available for use by the lower priority queues.
Managing the Firewall for a complex network is greatly simplified through use of Objects and Groups, which can allow multiple Local IP addresses, Remote IP addresses and Service Types to be defined as objects, then groups, which can be applied using a single Filter Rule. This makes it possible to apply one Filter Rule action to multiple IP addresses or Service Types with matching characteristics.
Quality of Service can also be applied in Filter Rules, so that traffic types that are allowed by the Firewall are then assigned to the relevant Quality of Service queue through the Filter Rule instead of through separate Quality of Service Rules.
In this example, the Local IP addresses of an IP PBX system and its IP phones are assigned through the use of IP Objects and IP Groups and the Remote IP addresses of the SIP Trunk provider are also assigned through objects.
With just one Firewall Filter Rule, all traffic sent by the IP telephone system to the SIP Trunk is assigned to the highest priority queue, Quality of Service "Class 1":
DrayTek routers can automatically prioritise SIP Voice over IP traffic over all other data, with no configuration required once this facility is enabled.
The router checks for SIP Signaling packets used to establish Voice over IP calls and observes how those calls are set up. With this information it will automatically determine the Local IP address of the IP phone, the Remote IP address of the remote caller and the ports used by the RTP (Real Time Protocol) stream to send the voice packets.
It then assigns those sessions to the highest priority "VoIP" queue so that the call audio is prioritised above file downloads and other Internet traffic with no other configuration required:
The router can then display details on the quality of each call that has passed through the router:
- Whether the call is still in progress (Status)
- The Internet connection used to make the call
- The Local IP and Remote (Peer) IP of the call
- Delay, Jitter and Packet Loss information
- Time and Duration of each call
App QoS is an easy way to control the priority of pre-defined traffic types that the router can recognise, for instance DNS and SSH traffic can be prioritised while Peer to Peer traffic is de-prioritised.
This works similarly to the router's App Enforcement for Content Security Management, which looks for certain packet types or sequences of packets and can block those types of traffic; App QoS sets the priority of these sessions instead:
The router has a number of "Untraceable" service types that are identified by packet sequences to determine the traffic type, in this example, Peer to Peer traffic types are set to the "Lowest" priority queue: