Quality of Service (QoS)
QoS Overview
Quality of Service (QoS) refers to both a network’s ability to deliver data with minimum delay, and the networking methods used to control the use of bandwidth. Without QoS, all traffic data is equally likely to be dropped when the network is congested. This can cause a reduction in network performance and make the network inadequate for time-critical applications such as video-on-demand.
Configure QoS on the Zyxel Device to group and prioritize application traffic and fine-tune network performance. Setting up QoS involves these steps:
1 Configure classifiers to sort traffic into different flows.
2 Assign priority and define actions to be performed for a classified traffic flow.
The Zyxel Device assigns each packet a priority and then queues the packet accordingly. Packets assigned a high priority are processed more quickly than those with low priority if there is congestion, allowing time-sensitive applications to flow more smoothly. Time-sensitive applications include both those that require a low level of latency (delay) and a low level of jitter (variations in delay) such as Voice over IP (VoIP) or Internet gaming, and those for which jitter alone is a problem such as Internet radio or streaming video. There are eight priority levels, with 1 having the highest priority.
This chapter contains information about configuring QoS and editing classifiers.
What You Can Do in this Chapter
The General screen lets you enable or disable QoS and set the upstream bandwidth (Quality of Service General Settings).
The Queue Setup screen lets you configure QoS queue assignment (Queue Setup).
The Classification Setup screen lets you add, edit or delete QoS classifiers (QoS Classification Setup).
The Shaper Setup screen limits outgoing traffic transmission rate on the selected interface (QoS Shaper Setup).
The Policer Setup screen lets you control incoming traffic transmission rate and bursts (QoS Policer Setup).
What You Need to Know
The following terms and concepts may help as you read through this chapter.
QoS versus CoS
QoS is used to prioritize source-to-destination traffic flows. All packets in the same flow are given the same priority. CoS (Class of Service) is a way of managing traffic in a network by grouping similar types of traffic together and treating each type as a class. You can use CoS to give different priorities to different packet types.
CoS technologies include IEEE 802.1p layer 2 tagging and DiffServ (Differentiated Services or DS). IEEE 802.1p tagging makes use of 3 bits in the packet header, while DiffServ is a new protocol and defines a new DS field, which replaces the eight-bit ToS (Type of Service) field in the IP header.
Tagging and Marking
In a QoS class, you can configure whether to add or change the DSCP (DiffServ Code Point) value, IEEE 802.1p priority level and VLAN ID number in a matched packet. When the packet passes through a compatible network, the networking device, such as a backbone switch, can provide specific treatment or service based on the tag or marker.
Traffic Shaping
Bursty traffic may cause network congestion. Traffic shaping regulates packets to be transmitted with a pre-configured data transmission rate using buffers (or queues). Your Zyxel Device uses the Token Bucket algorithm to allow a certain amount of large bursts while keeping a limit at the average rate.
Traffic Policing
Traffic policing is the limiting of the input or output transmission rate of a class of traffic on the basis of user-defined criteria. Traffic policing methods measure traffic flows against user-defined criteria and identify it as either conforming, exceeding or violating the criteria.
The Zyxel Device supports three incoming traffic metering algorithms: Token Bucket Filter (TBF), Single Rate Two Color Maker (srTCM), and Two Rate Two Color Marker (trTCM). You can specify actions which are performed on the colored packets. See Queue Setup for more information on each metering algorithm.
Strictly Priority
Strictly Priority (SP) services queues based on priority only. As traffic comes into the Switch, traffic on the highest priority queue, Q7 is transmitted first. When that queue empties, traffic on the next highest priority queue, Q6 is transmitted until Q6 empties, and then traffic is transmitted on Q5 and so on. If higher priority queues never empty, then traffic on lower priority queues never gets sent. SP does not automatically adapt to changing network requirements.
Weighted Round Robin Schedule (WRR)
Round Robin Scheduling services queues on a rotating basis and is activated only when a port has more traffic than it can handle. A queue is given an amount of bandwidth irrespective of the incoming traffic on that port. This queue then moves to the back of the list. The next queue is given an equal amount of bandwidth, and then moves to the end of the list; and so on, depending on the number of queues being used. This works in a looping fashion until a queue is empty.
Weighted Round Robin Scheduling (WRR) uses the same algorithm as round robin scheduling, but services queues based on their priority and queue weight (the number you configure in the queue Weight field) rather than a fixed amount of bandwidth. WRR is activated only when a port has more traffic than it can handle. Queues with larger weights get more service than queues with smaller weights. This queuing mechanism is highly efficient in that it divides any available bandwidth across the different traffic queues and returns to queues that have not yet emptied.
Quality of Service General Settings
Use this screen to enable or disable QoS and set the upstream bandwidth or assign traffic priority. See QoS Overview for more information.
When one of the following situations happens, the current WAN linkup rate will be used instead:
1 WAN Managed Upstream Bandwidth is set to 0.
2 WAN Managed Upstream Bandwidth is empty.
3 WAN Managed Upstream Bandwidth is higher than the current WAN interface linkup rate.
*Manually defined QoS is ignored when Upstream Traffic Priority is selected.
*Upstream Traffic Priority automatically assigns a traffic priority level based on the selected criteria.
*To have your QoS settings configured in other QoS screens take effect, select None in the Upstream Traffic Priority Assigned by field.
Click Network Setting > QoS > General to open the screen as shown next.
Network Setting > QoS > General
The following table describes the labels in this screen.
Network Setting > QoS > General 
LABEL
Description
QoS
Click this switch to enable QoS to improve your network performance.
WAN Managed Upstream Bandwidth
Enter the amount of upstream bandwidth for the WAN interfaces that you want to allocate using QoS.
The recommendation is to set this speed to match the interfaces’ actual transmission speed. For example, set the WAN interfaces’ speed to 100000 kbps if your Internet connection has an upstream transmission speed of 100 Mbps.
You can also set this number lower than the interfaces’ actual transmission speed. This will cause the Zyxel Device to not use some of the interfaces’ available bandwidth.
If you leave this field blank, the Zyxel Device automatically sets this number to be 95% of the WAN interfaces’ actual upstream transmission speed.
Upstream Traffic Priority Assigned by
Select how the Zyxel Device assigns priorities to various upstream traffic flows.
None: Disables auto priority mapping and has the Zyxel Device put packets into the queues according to your classification rules. Traffic which does not match any of the classification rules is mapped into the default queue with the lowest priority.
Ethernet Priority: Automatically assign priority based on the IEEE 802.1p priority level.
IP Precedence: Automatically assign priority based on the first three bits of the TOS field in the IP header.
Packet Length: Automatically assign priority based on the packet size. Smaller packets get higher priority since control, signaling, VoIP, Internet gaming, or other real-time packets are usually small while larger packets are usually best effort data packets like file transfers.
Cancel
Click Cancel to restore your previously saved settings.
Apply
Click Apply to save your changes.
Queue Setup
Click Network Setting > QoS > Queue Setup to open the screen as shown next.
Use this screen to configure QoS queue assignment to decide the priority on WAN or LAN interfaces. Traffic with higher priority gets through faster than those with lower priority. Low-priority traffic is dropped first when the network is congested.
*Configure the priority level for a QoS queue from 1 to 8. The smaller the number in the Priority column, the higher the priority.
*The corresponding classifiers will be removed automatically if a queue is deleted.
*Rate limit 0 means there is no rate limit on a queue.
Network Setting > QoS > Queue Setup
The following table describes the labels in this screen.
Network Setting > QoS > Queue Setup 
LABEL
Description
Add New Queue
Click this to create a new queue entry.
Add a QoS Queue
Click Add New Queue or the Edit icon in the Queue Setup screen to configure a queue.
Network Setting > QoS > Queue Setup > Add New Queue/Edit
The following table describes the labels in this screen.
Network Setting > QoS > Queue Setup > Add New Queue/Edit  
LABEL
Description
Active
Click this switch to enable the queue.
Name
Enter a descriptive name for this queue. You can use up to 32 printable characters except [ " ], [ ` ], [ ' ], [ < ], [ > ], [ ^ ], [ $ ], [ | ], [ & ], or [ ; ]. Spaces are allowed.
Interface
Select the interface to which this queue is applied.
This field is read-only if you are editing the queue.
Priority
Select the priority level (from 1 to 8) of this queue.
The smaller the number, the higher the priority level. Traffic assigned to higher priority queues gets through faster while traffic in lower priority queues is dropped if the network is congested.
Weight
Select the weight (from 1 to 8) of this queue.
If two queues have the same priority level, the Zyxel Device divides the bandwidth across the queues according to their weights. Queues with larger weights get more bandwidth than queues with smaller weights.
Buffer Management
This field displays Drop Tail (DT). Drop Tail (DT) is a simple queue management algorithm that allows the Zyxel Device buffer to accept as many packets as it can until it is full. Once the buffer is full, new packets that arrive are dropped until there is space in the buffer again (packets are transmitted out of it).
Rate Limit
Specify the maximum transmission rate (in Kbps) allowed for traffic on this queue. If you enter 0 here, this means there's no rate limit on this queue.
Cancel
Click Cancel to exit this screen without saving.
OK
Click OK to save your changes.
QoS Classification Setup
Use this screen to add, edit or delete QoS classifiers. A classifier groups traffic into data flows according to specific criteria such as the source address, destination address, source port number, destination port number or incoming interface. For example, you can configure a classifier to select traffic from the same protocol port (such as Telnet) to form a flow.
You can give different priorities to traffic that the Zyxel Device forwards through the WAN interface. Give high priority to voice and video to make them run more smoothly. Similarly, give low priority to many large file downloads so that they do not reduce the quality of other applications.
Click Network Setting > QoS > Classification Setup to open the following screen.
Network Setting > QoS > Classification Setup
The following table describes the labels in this screen.
Network Setting > QoS > Classification Setup 
LABEL
Description
Add New Classification
Click this to create a new classifier.
Order
This is the index number of the entry. The classifiers are applied in order of their numbering.
Status
This field displays whether the classifier is active or not. A yellow bulb signifies that this classifier is active. A gray bulb signifies that this classifier is not active.
Class Name
This is the name of the classifier.
Classification Criteria
This shows criteria specified in this classifier, for example the interface from which traffic of this class should come and the source MAC address of traffic that matches this classifier.
DSCP Mark
This is the DSCP number added to traffic of this classifier.
802.1P Mark
This is the IEEE 802.1p priority level assigned to traffic of this classifier.
VLAN ID Tag
This is the VLAN ID number assigned to traffic of this classifier.
To Queue
This is the name of the queue in which traffic of this classifier is put.
Modify
Click the Edit icon to edit the classifier.
Click the Delete icon to delete an existing classifier. Note that subsequent rules move up by one when you take this action.
Add or Edit QoS Class
Click Add New Classification in the Classification Setup screen or the Edit icon next to a classifier to open the following screen.
Network Setting > QoS > Classification Setup > Add New Classification/Edit: Step1
Network Setting > QoS > Classification Setup > Add New Classification/Edit: Step2
Network Setting > QoS > Classification Setup > Add New Classification/Edit: Step3
Network Setting > QoS > Classification Setup > Add New Classification/Edit: Step4
Network Setting > QoS > Classification Setup > Add New Classification/Edit: Step5
The following table describes the labels in this screen.
Network Setting > QoS > Classification Setup > Add New Classification/Edit 
LABEL
Description
Step1: Class Configuration
Active
Click this switch to enable the classifier.
Class Name
Enter a descriptive name for this class. You can use up to 32 printable characters except [ " ], [ ` ], [ ' ], [ < ], [ > ], [ ^ ], [ $ ], [ | ], [ & ], or [ ; ]. Spaces are allowed.
Classification Order
Select an existing number for where you want to put this classifier to move the classifier to the number you selected after clicking Apply.
Select Last to put this rule in the back of the classifier list.
Step2: Criteria Configuration
Basic
From Interface
If you want to classify the traffic by an ingress interface, select an interface from the From Interface drop-down list box.
Ether Type
Select a predefined application to configure a class for the matched traffic. Traffic will be classified with the Ether Type of Ethernet frames. Ether Type is a field in an Ethernet frame used to identify the protocol encapsulated in the frame.
Select NA to specify traffic that does not belong to any Ether type.
If you select IP, you also need to configure source or destination, IP address, DHCP options, DSCP value or the protocol type.
If you select IPv6, you also need to configure source or destination, IPv6 address, DSCP value or the protocol type.
If you select 802.1Q, you can configure an 802.1p priority level.
Source
Address
Select the checkbox and enter the source IP address in dotted decimal notation. A blank source IP address means any source IP address.
Subnet Mask
 
This field is available only when you select IP in the Ether Type field.
Enter the source subnet mask.
Prefix Length
This field is available only when you select IPV6 in the Ether Type field.
Enter the source prefix length.
Port Range
If you select TCP or UDP in the IP Protocol field, select the checkbox and enter the port numbers of the source.
MAC
Select the checkbox and enter the source MAC address of the packet.
MAC Mask
Enter the mask for the specified MAC address to determine which bits a packet’s MAC address should match.
Enter “f” for each bit of the specified source MAC address that the traffic’s MAC address should match. Enter “0” for the bits of the matched traffic’s MAC address, which can be of any hexadecimal characters. For example, if you set the MAC address to 00:13:49:00:00:00 and the mask to ff:ff:ff:00:00:00, a packet with a MAC address of 00:13:49:12:34:56 matches this criteria.
Exclude
Select this option to exclude the packets that match the specified criteria from this classifier.
Destination
Address
Select the checkbox and enter the source IP address in dotted decimal notation. A blank source IP address means any source IP address.
Subnet Mask
 
This field is available only when you select IP in the Ether Type field.
Enter the source subnet mask.
Prefix Length
This field is available only when you select IPV6 in the Ether Type field.
Enter the source prefix length.
See the IPv6 Appendix for more IPv6 information.
Port Range
If you select TCP or UDP in the IP Protocol field, select the checkbox and enter the port numbers of the source.
MAC
Select the checkbox and enter the source MAC address of the packet.
MAC Mask
Enter the mask for the specified MAC address to determine which bits a packet’s MAC address should match.
Enter “f” for each bit of the specified source MAC address that the traffic’s MAC address should match. Enter “0” for the bits of the matched traffic’s MAC address, which can be of any hexadecimal characters. For example, if you set the MAC address to 00:13:49:00:00:00 and the mask to ff:ff:ff:00:00:00, a packet with a MAC address of 00:13:49:12:34:56 matches this criteria.
Exclude
Select this option to exclude the packets that match the specified criteria from this classifier.
Others
Service
This field is available only when you select IP or IPv6 in the Ether Type field.
This field simplifies classifier configuration by allowing you to select a predefined application. When you select a predefined application, you do not configure the rest of the filter fields.
IP Protocol
This field is available only when you select IP or IPv6 in the Ether Type field.
Select this option and select the protocol (service type) from TCP, UDP, ICMP or IGMP. If you select User defined, enter the protocol (service type) number.
DHCP
This field is available only when you select IP in the Ether Type field.
Select this option and select a DHCP option.
If you select Vendor Class ID (DHCP Option 60), enter the Vendor Class Identifier (Option 60) of the matched traffic, such as the type of the hardware or firmware.
If you select Client ID (DHCP Option 61), enter the Identity Association IDentifier (IAD Option 61) of the matched traffic, such as the MAC address of the device.
If you select User Class ID (DHCP Option 77), enter a string that identifies the user’s category or application type in the matched DHCP packets.
If you select Vendor Specific Info (DHCP Option 125), enter the vendor specific information of the matched traffic, such as the product class, model name, and serial number of the device.
IP Packet Length
This field is available only when you select IP in the Ether Type field.
Select this option and enter the minimum and maximum packet length (from 46 to 1500) in the fields provided.
DSCP
This field is available only when you select IP or IPv6 in the Ether Type field.
Select this option and specify a DSCP (DiffServ Code Point) number between 0 and 63 in the field provided.
802.1P
This field is available only when you select 802.1Q in the Ether Type field.
Select this option and select a priority level (between 0 and 7) from the drop-down list box.
"0" is the lowest priority level and "7" is the highest.
VLAN ID
This field is available only when you select 802.1Q in the Ether Type field.
Select this option and specify a VLAN ID number.
TCP ACK
This field is available only when you select IP in the Ether Type field.
If you select this option, the matched TCP packets must contain the ACK (Acknowledge) flag.
Exclude
Select this option to exclude the packets that match the specified criteria from this classifier.
Step3: Packet Modification
DSCP Mark
This field is available only when you select IP in the Ether Type field.
If you select Remark, enter a DSCP value with which the Zyxel Device replaces the DSCP field in the packets.
If you select Unchange, the Zyxel Device keep the DSCP field in the packets.
VLAN ID Tag
If you select Remark, enter a VLAN ID number with which the Zyxel Device replaces the VLAN ID of the frames.
If you select Remove, the Zyxel Device deletes the VLAN ID of the frames before forwarding them out.
If you select Add, the Zyxel Device treat all matched traffic untagged and add a second VLAN ID.
If you select Unchange, the Zyxel Device keep the VLAN ID in the packets.
802.1P Mark
Select a priority level with which the Zyxel Device replaces the IEEE 802.1p priority field in the packets.
If you select Unchange, the Zyxel Device keep the 802.1p priority field in the packets.
Step4: Class Routing
Forward to Interface
Select a WAN interface through which traffic of this class will be forwarded out. If you select Unchange, the Zyxel Device forward traffic of this class according to the default routing table.
Step5: Outgoing Queue Selection
To Queue Index
Select a queue that applies to this class.
You should have configured a queue in the Queue Setup screen already.
Cancel
Click Cancel to exit this screen without saving any changes.
OK
Click OK to save your changes.
QoS Shaper Setup
This screen lets you use the token bucket algorithm to allow a certain amount of large bursts of traffic while keeping most outgoing traffic at the average rate. Click Network Setting > QoS > Shaper Setup. The screen appears as shown.
Network Setting > QoS > Shaper Setup
The following table describes the labels in this screen.
Network Setting > QoS > Shaper Setup 
LABEL
Description
Add New Shaper
Click this to create a new entry.
#
This is the index number of the entry.
Status
This field displays whether the shaper is active or not. A yellow bulb signifies that this policer is active. A gray bulb signifies that this shaper is not active.
Interface
This shows the name of the Zyxel Device's interface through which traffic in this shaper applies.
Rate Limit
This shows the average rate limit of traffic bursts for this shaper.
Modify
Click the Edit icon to edit the shaper.
Click the Delete icon to delete an existing shaper. Note that subsequent rules move up by one when you take this action.
Add or Edit a QoS Shaper
Click Add New Shaper in the Shaper Setup screen or the Edit icon next to a shaper to show the following screen.
Network Setting > QoS > Shaper Setup > Add New Shaper/Edit
The following table describes the labels in this screen.
Network Setting > QoS > Shaper Setup > Add New Shaper/Edit
LABEL
Description
Active
Click this switch to enable the shaper.
Interface
Select a Zyxel Device's interface through which traffic in this shaper applies.
Rate Limit
Enter the average rate limit of traffic bursts for this shaper.
Cancel
Click Cancel to exit this screen without saving any changes.
OK
Click OK to save your changes.
QoS Policer Setup
Use this screen to view QoS policers that allow you to limit the transmission rate of incoming traffic and apply actions, such as drop, pass, or modify, to the DSCP value of matched traffic. Click Network Setting > QoS > Policer Setup. The screen appears as shown.
Network Setting > QoS > Policer Setup
The following table describes the labels in this screen.
Network Setting > QoS > Policer Setup 
LABEL
Description
Add New Policer
Click this to create a new entry.
#
This is the index number of the entry.
Status
This field displays whether the policer is active or not. A yellow bulb signifies that this policer is active. A gray bulb signifies that this policer is not active.
Name
This field displays the descriptive name of this policer.
Regulated Classes
This field displays the name of a QoS classifier.
Meter Type
This field displays the type of QoS metering algorithm used in this policer.
Rule
These are the rates and burst sizes against which the policer checks the traffic of the member QoS classes.
Action
This shows how the policer has the Zyxel Device treat different types of traffic belonging to the policer’s member QoS classes.
Modify
Click the Edit icon to edit the policer.
Click the Delete icon to delete an existing policer. Note that subsequent rules move up by one when you take this action.
Add or Edit a QoS Policer
Click Add New Policer in the Policer Setup screen or the Edit icon next to a policer to show the following screen.
Network Setting > QoS > Policer Setup > Add New Policer/Edit
The following table describes the labels in this screen.
Network Setting > QoS > Policer Setup > Add New Policer/Edit 
LABEL
Description
Active
Click this switch to enable the policer.
Name
Enter a descriptive name for this policer. You can use up to 16 printable characters except [ " ], [ ` ], [ ' ], [ < ], [ > ], [ ^ ], [ $ ], [ | ], [ & ], or [ ; ]. Spaces are allowed.
Meter Type
This shows the traffic metering algorithm used in this policer.
The Simple Token Bucket algorithm uses tokens in a bucket to control when traffic can be transmitted. Each token represents one byte. The algorithm allows bursts of up to b bytes which is also the bucket size.
The Single Rate Three Color Marker (srTCM) is based on the token bucket filter and identifies packets by comparing them to the Committed Information Rate (CIR), the Committed Burst Size (CBS) and the Excess Burst Size (EBS).
The Two Rate Three Color Marker (trTCM) is based on the token bucket filter and identifies packets by comparing them to the Committed Information Rate (CIR) and the Peak Information Rate (PIR).
Committed Rate
Specify the committed rate. When the incoming traffic rate of the member QoS classes is less than the committed rate, the device applies the conforming action to the traffic.
Committed Burst Size
Specify the committed burst size for packet bursts. This must be equal to or less than the peak burst size (two rate three color) or excess burst size (single rate three color) if it is also configured.
This is the maximum size of the (first) token bucket in a traffic metering algorithm.
Excess Burst Size
Specify the additional amount of bytes that are admitted at the committed rate besides the committed burst size.
This is the maximum size of the second token bucket in the srTCM.
This field is only available when you select Single Rate Three Color in the Meter Type field.
Peak Rate
Specify the maximum rate at which packets are admitted to the network.
The peak rate should be greater than or equal to the committed rate. This is to specify how many bytes of tokens are added to the second bucket every second in the trTCM.
This field is only available when you select Two Rate Three Color in the Meter Type field.
Peak Burst Size
Specify the maximum amount of bytes that are admitted at the committed rate.
This is the maximum size of the second token bucket in the trTCM.
This field is only available when you select Two Rate Three Color in the Meter Type field.
Conforming Action
Specify what the Zyxel Device does for packets within the committed rate and burst size (green-marked packets).
Pass: Send the packets without modification.
DSCP Mark: Change the DSCP mark value of the packets. Enter the DSCP mark value to use.
Partial Conforming Action
Specify the action that the Zyxel Device takes on yellow-marked packets.
Select Pass to forward the packets.
Select Drop to discard the packets.
Select DSCP Mark to assign a specified DSCP number (between 0 and 63) to the packets and forward them. The packets are dropped if there is congestion on the network.
This field is only available when you select Single/Two Rate Three Color in the Meter Type field.
Non-Conforming Action
Specify what the Zyxel Device does for packets that exceed the excess burst size or peak rate and burst size (red-marked packets).
Drop: Discard the packets.
DSCP Mark: Change the DSCP mark value of the packets. Enter the DSCP mark value to use. The packets may be dropped if there is congestion on the network.
Regulated Classes Member Setting
Available Class
Selected Class
Select a QoS classifier to apply this QoS policer to traffic that matches the QoS classifier.
Highlight a QoS classifier in the Available Class box and use the > button to move it to the Selected Class box.
To remove a QoS classifier from the Selected Class box, select it and use the < button.
Cancel
Click Cancel to exit this screen without saving any changes.
OK
Click OK to save your changes.
Technical Reference
The following section contains additional technical information about the Zyxel Device features described in this chapter.
IEEE 802.1Q Tag
The IEEE 802.1Q standard defines an explicit VLAN tag in the MAC header to identify the VLAN membership of a frame across bridges. A VLAN tag includes the 12-bit VLAN ID and 3-bit user priority. The VLAN ID associates a frame with a specific VLAN and provides the information that devices need to process the frame across the network.
IEEE 802.1p specifies the user priority field and defines up to eight separate traffic types. The following table describes the traffic types defined in the IEEE 802.1d standard (which incorporates the 802.1p).
IEEE 802.1p Priority Level and Traffic Type
Priority Level
Traffic Type
Level 7
Typically used for network control traffic such as router configuration messages.
Level 6
Typically used for voice traffic that is especially sensitive to jitter (jitter is the variations in delay).
Level 5
Typically used for video that consumes high bandwidth and is sensitive to jitter.
Level 4
Typically used for controlled load, latency-sensitive traffic such as SNA (Systems Network Architecture) transactions.
Level 3
Typically used for “excellent effort” or better than best effort and would include important business traffic that can tolerate some delay.
Level 2
This is for “spare bandwidth”.
Level 1
This is typically used for non-critical “background” traffic such as bulk transfers that are allowed but that should not affect other applications and users.
Level 0
Typically used for best-effort traffic.
DiffServ
QoS is used to prioritize source-to-destination traffic flows. All packets in the flow are given the same priority. You can use CoS (class of service) to give different priorities to different packet types.
DiffServ (Differentiated Services) is a class of service (CoS) model that marks packets so that they receive specific per-hop treatment at DiffServ-compliant network devices along the route based on the application types and traffic flow. Packets are marked with DiffServ Code Points (DSCPs) indicating the level of service desired. This allows the intermediary DiffServ-compliant network devices to handle the packets differently depending on the code points without the need to negotiate paths or remember state information for every flow. In addition, applications do not have to request a particular service or give advanced notice of where the traffic is going.
DSCP and Per-Hop Behavior
DiffServ defines a new Differentiated Services (DS) field to replace the Type of Service (TOS) field in the IP header. The DS field contains a 2-bit unused field and a 6-bit DSCP field which can define up to 64 service levels. The following figure illustrates the DS field.
DSCP is backward compatible with the three precedence bits in the ToS octet so that non-DiffServ compliant, ToS-enabled network device will not conflict with the DSCP mapping.
DSCP (6 bits)
Unused (2 bits)
The DSCP value determines the forwarding behavior, the PHB (Per-Hop Behavior), that each packet gets across the DiffServ network. Based on the marking rule, different kinds of traffic can be marked for different kinds of forwarding. Resources can then be allocated according to the DSCP values and the configured policies.
IP Precedence
Similar to IEEE 802.1p prioritization at layer-2, you can use IP precedence to prioritize packets in a layer-3 network. IP precedence uses three bits of the eight-bit ToS (Type of Service) field in the IP header. There are eight classes of services (ranging from zero to seven) in IP precedence. Zero is the lowest priority level and seven is the highest.
Automatic Priority Queue Assignment
If you enable QoS on the Zyxel Device, the Zyxel Device can automatically base on the IEEE 802.1p priority level, IP precedence and/or packet length to assign priority to traffic which does not match a class.
The following table shows you the internal layer-2 and layer-3 QoS mapping on the Zyxel Device. On the Zyxel Device, traffic assigned to higher priority queues gets through faster while traffic in lower index queues is dropped if the network is congested.
Internal Layer2 and Layer3 QoS Mapping 
Priority Queue
Layer 2
Layer 3
IEEE 802.1p User Priority (Ethernet Priority)
ToS (IP Precedence)
DSCP
IP Packet Length (Byte)
0
1
0
000000
 
1
2
 
 
 
2
0
0
000000
>1100
3
3
1
001110
001100
001010
001000
250 – 1100
4
4
2
010110
010100
010010
010000
 
5
5
3
011110
011100
011010
011000
<250
6
6
4
100110
100100
100010
100000
 
5
101110
101000
7
7
6
110000
111000
 
7
Token Bucket
The token bucket algorithm uses tokens in a bucket to control when traffic can be transmitted. The bucket stores tokens, each of which represents one byte. The algorithm allows bursts of up to b bytes which is also the bucket size, so the bucket can hold up to b tokens. Tokens are generated and added into the bucket at a constant rate. The following shows how tokens work with packets:
A packet can be transmitted if the number of tokens in the bucket is equal to or greater than the size of the packet (in bytes).
After a packet is transmitted, a number of tokens corresponding to the packet size is removed from the bucket.
If there are no tokens in the bucket, the Zyxel Device stops transmitting until enough tokens are generated.
If not enough tokens are available, the Zyxel Device treats the packet in either one of the following ways:
In traffic shaping:
Holds it in the queue until enough tokens are available in the bucket.
In traffic policing:
Drops it.
Transmits it but adds a DSCP mark. The Zyxel Device may drop these marked packets if the network is overloaded.
Configure the bucket size to be equal to or less than the amount of the bandwidth that the interface can support. It does not help if you set it to a bucket size over the interface’s capability. The smaller the bucket size, the lower the data transmission rate and that may cause outgoing packets to be dropped. A larger transmission rate requires a big bucket size. For example, use a bucket size of 10 kbytes to get the transmission rate up to 10 Mbps.
Single Rate Three Color Marker
The Single Rate Three Color Marker (srTCM, defined in RFC 2697) is a type of traffic policing that identifies packets by comparing them to one user-defined rate, the Committed Information Rate (CIR), and two burst sizes: the Committed Burst Size (CBS) and Excess Burst Size (EBS).
The srTCM evaluates incoming packets and marks them with one of three colors which refer to packet loss priority levels. High packet loss priority level is referred to as red, medium is referred to as yellow and low is referred to as green.
The srTCM is based on the token bucket filter and has two token buckets (CBS and EBS). Tokens are generated and added into the bucket at a constant rate, called Committed Information Rate (CIR). When the first bucket (CBS) is full, new tokens overflow into the second bucket (EBS).
All packets are evaluated against the CBS. If a packet does not exceed the CBS it is marked green. Otherwise it is evaluated against the EBS. If it is below the EBS then it is marked yellow. If it exceeds the EBS then it is marked red.
The following shows how tokens work with incoming packets in srTCM:
A packet arrives. The packet is marked green and can be transmitted if the number of tokens in the CBS bucket is equal to or greater than the size of the packet (in bytes).
After a packet is transmitted, a number of tokens corresponding to the packet size is removed from the CBS bucket.
If there are not enough tokens in the CBS bucket, the Zyxel Device checks the EBS bucket. The packet is marked yellow if there are sufficient tokens in the EBS bucket. Otherwise, the packet is marked red. No tokens are removed if the packet is dropped.
Two Rate Three Color Marker
The Two Rate Three Color Marker (trTCM, defined in RFC 2698) is a type of traffic policing that identifies packets by comparing them to two user-defined rates: the Committed Information Rate (CIR) and the Peak Information Rate (PIR). The CIR specifies the average rate at which packets are admitted to the network. The PIR is greater than or equal to the CIR. CIR and PIR values are based on the guaranteed and maximum bandwidth respectively as negotiated between a service provider and client.
The trTCM evaluates incoming packets and marks them with one of three colors which refer to packet loss priority levels. High packet loss priority level is referred to as red, medium is referred to as yellow and low is referred to as green.
The trTCM is based on the token bucket filter and has two token buckets (Committed Burst Size (CBS) and Peak Burst Size (PBS)). Tokens are generated and added into the two buckets at the CIR and PIR respectively.
All packets are evaluated against the PIR. If a packet exceeds the PIR it is marked red. Otherwise it is evaluated against the CIR. If it exceeds the CIR then it is marked yellow. Finally, if it is below the CIR then it is marked green.
The following shows how tokens work with incoming packets in trTCM:
A packet arrives. If the number of tokens in the PBS bucket is less than the size of the packet (in bytes), the packet is marked red and may be dropped regardless of the CBS bucket. No tokens are removed if the packet is dropped.
If the PBS bucket has enough tokens, the Zyxel Device checks the CBS bucket. The packet is marked green and can be transmitted if the number of tokens in the CBS bucket is equal to or greater than the size of the packet (in bytes). Otherwise, the packet is marked yellow.