Ip Precedence DSCP ToS Lookup Table
Picture was taken from :http://www.netcontractor.pl/blog/wp-content/uploads/2011/11/QoS-Values-Calculator-v3.jpg can’t beat that qos table !!!!
Ok so this post is going to be a mess at 1st and then i will clean it out , since am not understanding everything 100% and lets be honest not even 50% .
Lets begin by some basic stuff :
There is a difference between the TOS Bytes and the TOS bits !
The 8 bits 0-1-2-3-4-5-6-7 = TOS Bytes
The bit 0-1-2 are the Precedence
The bit 3-4-5-6-7 are the TOS Bits
Just learn that the TOS Bytes isn’t called TOS Bytes anymore ! and now it is called the DS Field for Differentiated Services.
The 1st 6 Bits are used to set a codepoint for the PHB ( per hop behavior ) The codepoint is the DSCP value.
DS for Differentiated Services and CP for Codepoint.
0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | DSCP | CU | +---+---+---+---+---+---+---+---+ DSCP: differentiated services codepoint CU: currently unused
There is 3 different overall Models for QOS :
Best Effort
IntServ – (Integrated Services)
DiffServ – (Differentiated Services)
Best Effort is when no QoS is apply to packets , FIFO for high speed interfaces ans scalable with no Overhead.
IntServ (Integrated Services) is where devices/applications exchanges reservations information to enforce Qos ( not scalable )
the main process is Resource Reservation Protocol ( RSVP ) it use PATH and RESV messages.
Some called this Hard QoS.
Resource Reservation – Device reserve appropriate bandwidth for their needed flow.
Admission Control – Device decide when reservation request should be rejected.
RSVP Messages :
Path Messages are sent through along the unicast and multicast route by the routing protocol.
They use to store path state in each node and path state is used to route reservation request message in reverse direction.
RESV – Reservation-request Messages are sent by receiver hosts toward the senders.
Error and confirmation messages
Teardown messages.
DiffServ (Differentiated Services) is where devices don’t have to exchange any reservation information but you have to configure them separately.
Network recognize different classes and provide different levels of QoS and it is known for its global scalability. It use :
Classification ( CS# )
Marking ( COS , DSCP )
Congestion Management ( all Queuing application )
Congestion Avoidance ( Avoid Packet )
Shaping/Policing ( configuration )
Link Efficiency ( Compression and Link Fragmentation and Interleaving )
What is PHB ?
Packet gets marked with codepoint to get process by Qos queuing policing or shaping.
Default PHB is mark with a DSCP value of 0
Class-Selector “CS” PHB is to make compatible network that use ip precedence and Differentiated Services together.
We only use the first three bits, just like we did with IP precedence. Here is a list of the possible class-selector codepoints that we can use:
Class selector name | DSCP value | IP Precedence value | IP Precedence name |
Default / CS0 | 000000 | 000 | Routine |
CS1 | 001000 | 001 | Priority |
CS2 | 010000 | 010 | Immediate |
CS3 | 011000 | 011 | Flash |
CS4 | 100000 | 100 | Flash Override |
CS5 | 101000 | 101 | Critic/Critical |
CS6 | 110000 | 110 | Internetwork Control |
CS7 | 111000 | 111 | Network Control |
Assured Forwarding PHB “AF” as 2 fonctions : Queuing and Congestion Avoidance.
Queuing : http://www.cisco.com/c/en/us/products/collateral/ios-nx-os-software/quality-of-service-qos/sol_ov_c22-708224.html
Congestion avoidance techniques monitor network traffic loads in an effort to anticipate and avoid congestion at common network bottlenecks.
There are 4 different classes and each class will be placed in a different queue,
Each class there is also a drop probability. When the queue is full, packets
with a “high drop” probability will be deleted from the queue before the other packets.
In total there are 3 levels for drop precedence. Low Medium High
The DS Field is 8 Bits 1-2-3-4-5-6-7-8
The 1st 3 bits is for the Class 1-2-3
The next 3 bits 4-5-6 or for the dp “Drop Probability”
00 = Low
10 = Medium
11 = High
The last 2 bits “CU” Currently unused
0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | CS | DP | CU | +---+---+---+---+---+---+---+---+ CS: Class DP: Drop Probability
The first 3 bits are used to define the class and the second 3 bits for the Drop Probability .
Drop | Class 1 | Class 2 | Class 3 | Class 4 |
Low | 001010AF11 | 010010AF21 | 011010AF31 | 100010AF41 |
Medium | 001100AF12 | 010100AF22 | 011100AF32 | 100100AF42 |
High | 001110AF13 | 010110AF23 | 011110AF33 | 100110AF43 |
High the Class better it is .
To Find the decimal value of an AF= XY you do 8x + 2y = example AF32 equal 8×3 + 2×2 = 28
Expedited Forwarding PHB “EF” also has two functions: Queuing and Policing
The goal of expedited forwarding is to put packets in a queue where they experience minimum delay and packet loss.
To enforce this we use priority queue. When there are packets in the priority queue, they will be sent before all other queues.
This is also a risk, there’s a chance that the other queues won’t get a chance to send their packets so we need to set a “rate limit” for this queue,so you need
Policing.
Concept of Software and Hardware Queues ( input and output )
For input queues there is one queue per interface always FIFO ( First in First Out ) 75 Packets by default.
For Output queues there is Hardware and Software Queue, The software can be FIFO or Fancy Queuing.
Software Queue take effect when the Hardware Queue is full.
MQC ( Cisco Modular Quality of Service Command Line Interface )
It is define by 3 concepts :
CLASS-MAP they classify traffic as Interesting.
POLICY-MAP They decide what we want to PLAN with the Interesting Traffic.
SERVICE-POLICY Is where we apply the action for the PLAN