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  //EXAMPLE
πŸ’‘
NOTE: The switch uses CDP to tell the IP Phone which VLAN to tag the frame.

PoE

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}]

Standards

NameStandardMaximum Power (W)Pairs used
Cisco Inline Power (ILP)N/A72
PoE802.1af152
PoE+802.1at302
UPoE802.1bt604
UPoE+802.1bt904

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

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.

0Best Effort
1Background
2Excellent Effort
3Critical Applications
4Video
5Voice
6Internetwork control
7 Network Control
πŸ’‘
NOTE: IP Phones when setting the connection mark the field as PCP3, but when the call actually occurs, it uses PCP5.
πŸ’‘
NOTE: Network Control refers to the messages to manage the network (i.e. OSPF messages).

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.

AFXYAFXY
DSCP=8X+2YDSCP = 8X + 2Y

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

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.

🚨
IMPORTANT: If the queue fills up, any new arriving packet will be dropped. This is what is called as tail drop.

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:

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.

πŸ’‘
NOTE: Since all this methods use round-robin logic, voice/video traffic have to wait for their turn for the scheduler to put their data into transmission, which is not ideal.

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: