QoS

IPP

The IPv4 header defined in RFC 791 contains a 1 byte field called the Type of Service or ToS. The intent was to use this 1 byte field to mark packets for preferential treatment in conjunction with QoS. The ToS field was further divided into a high order 3 bits called IP Precedence or IPP. Over time the IPP standard was improved upon, and today we know it as DSCP.

DSCP

Along comes DSCP which needed more than just 3 bits to mark packets so DiffServ standardized a definition of the ToS byte. The ToS byte itself was renamed Differentiated Service Code Point or DSCP, and IPP was replaced with a 6 bit field high order bits 0 – 5. The 2 low order bits of the DS field are used for Explicit Congestion Notification or ECN. See QoS chart below.

PHB

The original IPP overlaps with the first 3 bits of the DSCP field because the DS field is simply a redefinition of the original ToS byte in the IP Header. Because of this overlap a set of DSCP values and PHB values called Class Selectors or CS. The Per Hop Behavior or PHB were needed to provide backwards compatibility with IPP. See QoS chart below.

AFXY

Assured Forwarding defines four classes for queuing purposes, along with three levels of drop probability inside each queue. To mark packets and distinguish into which of the four queues a packet should be placed along with the three drop priorities inside each queue the AF / PHB defines 12 DSCP values and their meanings. See QoS chart below.

EF

Packets marked with EF should be given queuing preferences so that they experience minimal latency, but packets should be policed to prevent them from taking over the all the bandwidth and preventing any other types of traffic. See QoS chart below.


Policing

  • Change DSCP markings when bandwidth is exceeded
  • Drop packets when bandwidth is exceeded

Class Default – CS0

The default class or default queue is the location where traffic that does not meet or satisfy the classification or criteria within the policy defined in the policy map. This is where you can define  the fair-queue which allows you to specify the number of dynamic queues into which your IP flows are sorted and classified. The Router allocates a default number of queues derived from the bandwidth on the interface itself. Values can range from 16 to 4096 depending on the platform.

QoS Chart

AFXY

  • The X value implies 1 of  the 4 classes selectors
  • The Y implies 1 of 3 drop priorities

Available Queuing Methods

  • First In First Out or FIFO – Default
  • Priority Queuing or PQ
  • Custom Queuing or CQ
  • Weighted Fair Queuing or WFQ – Below 2 Mbps
  • Class Based Weighted Fair Queuing or CBWFQ
  • Low Latency Queuing or LLQ

QoS vs. CoS 

In a nut shell the difference really comes down to Layer 2 Headers vs Layer 3 Headers. CoS is the classification of specific traffic at Layer 2 by manipulating the class of service bits in the Layer 2 header. It effectively marks the traffic so that QoS can use this classification as a means to actually manipulate the traffic according to your policy.

  • 802.1p Layer 2 Tagging CoS is a 3 bit field also referred to as User Priority
  • Type of Service or ToS
  • Differentiated Services or DiffServ

CDP

Cisco Discovery Protocol or CDP is a Cisco proprietary Layer 2 protocol that assist with the discovery of devices at Layer 2. The command switchport voice vlan x command simply tells or assist CDP in assigning the Phone to the Voice VLAN. That’s why it’s so important to make sure that CDP is enable on the Switch when you are dealing with Voice.

802.1q Trunking

As a network Engineer it’s so important to thank about the Trunks between Switches and Routers. Simply put this is where the rubber meets the road so to speak. This is where some of the biggest mistakes are made when building out the foundation of a good network. This is the most important Port or Ports on the entire Switch with regards to Speed, Duplex, DTP, STP, Trust. This is also the point in the overall design where LACP or PAGP bundling becomes a BIG consideration depending on the situation. 

802.1p

Remember that 802.1p bits do not exist outside of an 802.1q header. In other words the Class Of Service or CoS priority bits will not come into play unless the frame encapsulated, and traveling over and 802.1q trunk. This is why it’s so important not to forget the CoS configuration on Trunk ports.! When configuring end to end QoS this is probably the most overlooked or forgotten configurations.

Routing Switching Voice Firewall Wireless