Home > QoS Questions

QoS Questions

February 5th, 2021 in ENCOR 350-401 Go to comments

QoS quick summary:

1. Network factors:
+ Bandwidth: the speed of the link (or the capacity available on the link), usually measured in bits per second (bps)
+ Delay (or latency): how long a packet takes to get from the sender to the receiver. The more the delay, the slower the network. Delay is usually measured in milliseconds (ms)
+ Jitter: A measure of the variation in delay between packets. For example, one packet need 50ms to reach B from A while another packet takes 40ms then the jitter is 10ms
+ Loss: When packets travels to the destination, some of them may get lost.

2. QoS Models:
+ Best Effort: No QoS policies applied
+ Integrated Services (IntServ): Resource Reservation Protocol (RSVP) is used to reserve bandwidth
+ Differentiated Services (DiffServ): Packets are classified and marked individually; policy decisions are made independently by each node in a path.

3. QoS Markings:

Marking is a method that you use to modify the QoS fields of the incoming and outgoing packets. The QoS fields that you can mark are CoS in Layer 2 (both access and trunk traffic), and IP precedence and Differentiated Service Code Point (DSCP) in Layer 3.

Layer 2 marking would be of two types:
+ Traffic in trunk link with 802.1Q header. 802.1q tag on layer 2 header adds 4 bytes to the header to provide with a VLAN ID. Out of those 4 bytes, 3 bits are called ‘Priority bits (PRI)’. These bits provide 8 combinations (23) and they are termed as CoS (Class of Service) tags.
+ Traffic in access link without 802.1Q: We need to use 802.1P marking instead. 802.1P tag is similar to 802.1q tag (4 bytes), it will set the PRI value according to CoS marking and leave the VLAN ID as all zeroes.

Layer-3 marking is accomplished using the 8-bit Type of Service (ToS) field, part of the IP header. A mark in this field will remain unchanged as it travels from hop-to-hop, unless a Layer-3 device is explicitly configured to overwrite this field. There are two marking methods that use the ToS field:
+ IP Precedence: uses the first three bits of the ToS field.
+ Differentiated Service Code Point (DSCP): uses the first six bits of the ToS field. When using DSCP, the ToS field is often referred to as the Differentiated Services (DS) field.

TOS.png

4. QoS terms:

+ Classification: This involves categorizing network traffic into different groups based on specific criteria like IP address, protocol, port, or application type.
+ Marking: allows you to mark (set or change) a value (attribute) for the traffic belonging to a specific class
+ Queuing: entails holding packets in a queue and scheduling their transmission based on priority.
+ Policing: is used to control the rate of traffic flowing across an interface. During a bandwidth exceed (crossed the maximum configured rate), the excess traffic is generally dropped or remarked. The result of traffic policing is an output rate that appears as a saw-tooth with crests and troughs. Traffic policing can be applied to inbound and outbound interfaces. Unlike traffic shaping, QoS policing avoids delays due to queuing. Policing is configured in bytes.
+ Congestion: occurs when network bandwidth is insufficient to accommodate all traffic.
+ Shaping: retains excess packets in a queue and then schedules the excess for later transmission over increments of time. When traffic reaches the maximum configured rate, additional packets are queued instead of being dropped to proceed later. Traffic shaping is applicable only on outbound interfaces as buffering and queuing happens only on outbound interfaces. Shaping is configured in bits per second.

The primary reasons you would use traffic shaping are to control access to available bandwidth, to ensure that traffic conforms to the policies established for it, and to regulate the flow of traffic in order to avoid congestion that can occur when the sent traffic exceeds the access speed of its remote, target interface.

traffic_policing_vs_shaping.jpg

+ Tail drop: When the queue is full, the packet is dropped. This is the default behavior.

5. Congestion Management (types of queuing): uses the marking on each packet to determine which queue to place packets in

First-in, first-out (FIFO): FIFO entails no concept of priority or classes of traffic. With FIFO, transmission of packets out the interface occurs in the order the packets arrive, which means no QoS.
Priority Queuing (PQ): This type of queuing places traffic into one of four queues. Each queue has a different level of priority, and higher-priority queues must be emptied before packets are emptied from lower-priority queues. This behavior can “starve out” lower- priority traffic.
Custom Queuing (CQ): provide specific traffic guaranteed bandwidth at a potential congestion point, assuring the traffic a fixed portion of available bandwidth and leaving the remaining bandwidth to other traffic.
Weighted fair queueing (WFQ): allocates bandwidths to flows based on the weight. In addition, to allocate bandwidths fairly to flows, WFQ schedules packets in bits (not bytes). This prevents long packets from preempting bandwidths of short packets and reduces the delay and jitter when both short and long packets wait to be forwarded.

Class-based weighted fair queueing (CBWFQ) extends the standard WFQ functionality to provide support for user-defined traffic classes. For CBWFQ, you define traffic classes based on match criteria including protocols, access control lists (ACLs), and input interfaces. Packets satisfying the match criteria for a class constitute the traffic for that class. A queue is reserved for each class, and traffic belonging to a class is directed to the queue for that class.

Once a class has been defined according to its match criteria, you can assign it characteristics. To characterize a class, you assign it bandwidth, weight, and maximum packet limit. The bandwidth assigned to a class is the guaranteed bandwidth delivered to the class during congestion.

CBWFQ.jpg

Low latency queueing (LLQ) or also known as Priority Queuing (PQ): brings strict priority queuing (PQ) to CBWFQ. Strict PQ allows delay-sensitive packets such as voice to be sent before packets in other queues. LLQ reduces jitter in voice conversations.

This type of queuing places traffic into one of four queues. Each queue has a different level of priority, and higher-priority queues must be emptied before packets are emptied from lower-priority queues. This behavior can “starve out” lower- priority traffic.

Low_Latency_Queuing.jpg

The Resource Reservation Protocol (RSVP) protocol allows applications to reserve bandwidth for their data flows. It is used by a host, on the behalf of an application data flow, to request a specific amount of bandwidth from the network. RSVP is also used by the routers to forward bandwidth reservation requests.

Question 1

Question 2

Explanation

Weighted Random Early Detection (WRED) is just a congestion avoidance mechanism. WRED drops packets selectively based on IP precedence. Edge routers assign IP precedences to packets as they enter the network. When a packet arrives, the following events occur:

1. The average queue size is calculated.
2. If the average is less than the minimum queue threshold, the arriving packet is queued.
3. If the average is between the minimum queue threshold for that type of traffic and the maximum threshold for the interface, the packet is either dropped or queued, depending on the packet drop probability for that type of traffic.
4. If the average queue size is greater than the maximum threshold, the packet is dropped.

WRED reduces the chances of tail drop (when the queue is full, the packet is dropped) by selectively dropping packets when the output interface begins to show signs of congestion (thus it can mitigate congestion by preventing the queue from filling up). By dropping some packets early rather than waiting until the queue is full, WRED avoids dropping large numbers of packets at once and minimizes the chances of global synchronization. Thus, WRED allows the transmission line to be used fully at all times.

WRED generally drops packets selectively based on IP precedence. Packets with a higher IP precedence are less likely to be dropped than packets with a lower precedence. Thus, the higher the priority of a packet, the higher the probability that the packet will be delivered.

Reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conavd/configuration/15-mt/qos-conavd-15-mt-book/qos-conavd-cfg-wred.html

WRED is only useful when the bulk of the traffic is TCP/IP traffic. With TCP, dropped packets indicate congestion, so the packet source will reduce its transmission rate. With other protocols, packet sources may not respond or may resend dropped packets at the same rate. Thus, dropping packets does not decrease congestion.

Reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conavd/configuration/xe-16/qos-conavd-xe-16-book/qos-conavd-oview.html

Note: Global synchronization occurs when multiple TCP hosts reduce their transmission rates in response to congestion. But when congestion is reduced, TCP hosts try to increase their transmission rates again simultaneously (known as slow-start algorithm), which causes another congestion. Global synchronization produces this graph:

TCP_Global_Synchronization.jpg

Question 3

Explanation

QoS Packet Marking refers to changing a field within a packet either at Layer 2 (802.1Q/p CoS, MPLS EXP) or Layer 3 (IP Precedence, DSCP and/or IP ECN).

Reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_mqc/configuration/xe-16/qos-mqc-xe-16-book/qos-mrkg.html

Question 4

Explanation

Cisco routers allow you to mark two internal values (qos-group and discard-class) that travel with the packet within the router but do not modify the packet’s contents.

Reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_mqc/configuration/xe-16-6/qos-mqc-xe-16-6-book/qos-mrkg.html

Question 5

Explanation

Traffic shaping retains excess packets in a queue and then schedules the excess for later transmission over increments of time. The result of traffic shaping is a smoothed packet output rate.

traffic_policing_vs_shaping.jpg

Question 6

Explanation

Traffic policing propagates bursts. When the traffic rate reaches the configured maximum rate (or committed information rate), excess traffic is dropped (or remarked). The result is an output rate that appears as a saw-tooth with crests and troughs.

Unlike traffic shaping, traffic policing does not cause delay.

Classification (which includes traffic policing, traffic shaping and queuing techniques) should take place at the network edge. It is recommended that classification occur as close to the source of the traffic as possible.

Also according to this Cisco link, “policing traffic as close to the source as possible”.

Question 7

Explanation

CoS value 5 is commonly used for VOIP and CoS value 5 should be mapped to DSCP 46. DSCP 46 is defined as being for EF (Expedited Forwarding) traffic flows and is the value usually assigned to all interactive voice and video traffic. This is to keep the uniformity from end-to-end that DSCP EF (mostly for VOICE RTP) is mapped to COS 5.

Note:

+ CoS is a L2 marking contained within an 802.1q tag,. The values for CoS are 0 – 7
+ DSCP is a L3 marking and has values 0 – 63
+ The default DSCP-to-CoS mapping for CoS 5 is DSCP 40

Question 8

Explanation

First-in, first-out (FIFO): FIFO entails no concept of priority or classes of traffic. With FIFO, transmission of packets out the interface occurs in the order the packets arrive, which means no QoS.

Comments
  1. Tosha
    May 24th, 2020

    Question 1

    answer is not C

    The CoS marking allows a Layer 2 Ethernet frame to be marked with eight different levels of priority values, 0 to 7, where 0 is the lowest priority and 7 is the highest. 0 (lowest)-Background, 1 (default)-Best effort.

    so, the answer “D. The Cos value of each tagged packet is modified” ?

  2. Anonymous
    May 26th, 2020

    Anyone get an answer on Question 1? If the default CoS (PCP) port value is 0 then its priority is 1 which is the default value.

    https://en.wikipedia.org/wiki/IEEE_P802.1p

  3. guy
    May 27th, 2020

    Use the Default CoS page to configure the default CoS values for incoming packets through each LAN interface. The possible field values are 0 to 7. The default value is 0.

  4. RON BERSERKER
    June 9th, 2020

    Q1 Here the explanation:

    This is how the switch treats frames by default after the QoS is enabled:

    – A frame enters the switch port and it does not have the frame tagged (it means the port is access port and the frame enters the switch does not have ISL or dot1q encapsulation).
    – The switch encapsulates the frame with the dot1q (ignore ISL because dot1q is the default on all the new switches).
    – Inside the dot1q frame tag, there are three bits called 802.1p priority bits available which are also called CoS. These bits are set to 0.
    – Then, the switch calculates DSCP value based on the CoS-DSCP map table. As per the table, the switch sets the DSCP value to 0. DSCP value is located at the IP header of the packet.

    In summary, the CoS and DSCP values of the frame enter the switch set to 0 by default if the QoS is enabled on the switch. So C is correct.

    Reference: https://www.cisco.com/c/en/us/support/docs/switches/catalyst-3750-series-switches/91862-cat3750-qos-config.html

  5. abie
    January 27th, 2021

    Q1 QoS assigns a CoS value to unclassified frames that are received on a port. The default CoS value is zero.
    To set the default CoS value on the switch, perform this task in privileged mode:

  6. reveal the truth
    February 9th, 2021

    Question 1.

    The Correct answer is: C. The Port Cos value is 0

    QoS assigns a CoS value to unclassified frames that are received on a port. The default CoS value is zero.
    https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4000/8-2glx/configuration/guide/qos.html#:~:text=Configuring%20the%20Default%20CoS%20Value%20for%20the%20Switch,-QoS%20assigns%20a&text=The%20default%20CoS%20value%20is%20zero.

  7. Anonymous
    July 10th, 2023

    Question no. 7 :
    + The default DSCP-to-CoS mapping for CoS 5 is DSCP 40 => it’s should be 46

  8. lllybria
    November 4th, 2024

    please share the dumps

  1. No trackbacks yet.