QoS
| Done |
|---|
IP Phones
Traditional phones use POTS (Plain Old Telephone Service). However, modern enterprise phones are IP Phones which use VoIP (Voice over IP).
In order to reduce the amount of switch ports being used, IP Phones have an internal 3-port switch:
- 1x to connect to the Switch
- 1x to connect to the PC
- 1x (internal) to connect to itself
For this to work, IP Phones use Voice VLANs. In the switch the mode remains as static access, but the voice traffic is tagged.
configure terminal
interface g0/0
switchport mode access
switchport access vlan 10 //EXAMPLE
switchport voice vlan 99 //EXAMPLEPoE
PoE (Power over Ethernet) is an industry standard to power devices like IP Phones, IP Cameras, Wireless Access Points, lights and etc. However, it is different from using an power adapter because the same cable that transfers data also powers the device.
The device that power the PoE capable devices is called PSE (Power Sourcing Equipment) and the device being fed is called PD (Powered Device).
PSE will convert the AC voltage of the outlet into DC voltage and power the devices in its PoE capable ports.
In order to prevent a device to use more power than necessary is called Power Policing, which is a feature that takes a certain action in case the PD draws too much power.
configure terminal
power inline police [action {err-disable | log}]- err-disable β Puts the interface in a err-disable state and logs the event
- log β Only restarts the interface and generate a log
Standards
| Name | Standard | Maximum Power (W) | Pairs used |
|---|---|---|---|
| Cisco Inline Power (ILP) | N/A | 7 | 2 |
| PoE | 802.1af | 15 | 2 |
| PoE+ | 802.1at | 30 | 2 |
| UPoE | 802.1bt | 60 | 4 |
| UPoE+ | 802.1bt | 90 | 4 |
QoS
QoS (Quality of Service) is a set of tools that allows different treatments to different packets, by giving Higher and Lower priorities to certain packets.
Terms
- Bandwidth β Overall capacity of a link.
- Delay β The amount of time that it takes to a packet arrive to a destination (one-way delay) or to go and return (two-way delay).
- Jitter β It is the variation of the delay.
- Loss β Amount in % of dropped packets.
Voice Standard
Delay β€ 150ms
Jitter β€ 30ms
Loss β€ 1%
Classification
It is the actual classes (categories) where the packets will be bonded to.
You can classify packets via:
- ACL
- NBAR
- Layer 2 and Layer 3 fields
The term mark is important, which is the act of setting a value in a field that tells the class of the packet. Those fields can be PCP or DSCP (previous IPP).
PCP (Priority Code Point) is 3 bits in length, therefore it has 8 classes.
| 0 | Best Effort |
| 1 | Background |
| 2 | Excellent Effort |
| 3 | Critical Applications |
| 4 | Video |
| 5 | Voice |
| 6 | Internetwork control |
| 7 | Network Control |
DSCP Classification
DSCP (Differentiated Services Code Point) is a 6 bit length field, which indicates the possibility of 64 classes. However, an standardization occurred to give better performance of QoS among different locations.
DF (Default Forwarding)
It is the value for regular traffic.
Value: 0
EF (Expedited Forwarding)
It is the class for Low Latency/Low Jitter/Low Loss packets
Value: 46
AF (Assured Forwarding)
It is a class of four classes, which by itself are divided into 3 minor classes called drop precedence.
Packets within the same class have the same priority, but the one with the higher drop precedence will be dropped.


CS (Class Selector)
These classes are meant to be backwards compatible with IPP (IP Precedence, the old QoS field in IPv4).
It sets the added bits of DSCP all to 0, and uses only the first 3. Therefore there are 8 CS classes:
CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7.
Equivalents in DSCP:
DSCP0, DSCP8, DSCP16, DSCP24, DSCP32, DSCP40, DSCP48, DSCP56.

RFC 4594 Standards
It is an standard for setting the classification accordingly to some applications
- Video β EF
- Interactive Video β AF4x
- Streaming Video β AF3x
- High Priority Data β AF2x
- Best Effort β DF
Trust Boundaries
Is is a logical separation of QoS capable devices, that when trespassing it will make the QoS fields change value. Device inside the Trust Boundary are trusted devices, while devices away from the Trust Boundary are untrusted devices.


Queueing
It is a feature used when the device receives packets faster than it can forward it. Therefore, it will store they in a buffer with a FIFO (First in First Out) logic by default. It is a buffer.
However, this tail drop also brings another problem than only dropping packets, it causes TCP Global synchronization.
This happens when due to tail drop, devices will decrease the TCP sliding windows, which leads to an underutilization of the network, but after that they will gradually increase the data rate, causing in the end another tail drop. This will stay in a loop, in other words, waves of tail drop.
In order to avoid these, two solutions were invented:
- RED (Random Early Detection) β Randomly drops packets after meeting a minimum threshold
- WRED (Weighted Random Early Detection) β Drops lower-priority packets after meeting a minimum threshold.
QoS also allows the existence of multiple queues, each one with a different size for certain classifications. Also, and scheduler is needed to decide from which queue to draw data and how much.

Scheduling methods
A scheduler is basically a traffic guard, telling whose turn is and how much data to be drawn from each queue.
- round-robin β each queue has a turn, and also has the same data being drawn
- weighted round-robin β each queue has a turn, but a queue, a higher-priority one, can have more data being transmitted than other
- CBWFQ (Class-Based Weighted Fair Queuing) it uses weighted roud-robin but in times of congestion it reserves a minimum bandwidth for each queue
- LLQ (Low Latency Queuing) designated one or more queues as strict priority queues. This means, that the scheduler will give the most priority to this queues, emptying them whenever they are available, even if not their turn. Essentially, they have a βFast Passβ, they don`t have to wait. This however, can lead to starvation of the other queues if there is always something in those queues.
Shaping and Policing
They control the rate of traffic. This is a useful feature for Service Providers limit the bandwidth to how much the customer has paid.
Basically they will do the following with the data rate exceeds the maximum limit:
- Shaping β Will buffer the data
- Policing β Will drop the data
