10-12-2012 03:41 AM - edited 03-16-2019 01:39 PM
Good Morning All,
First of all appologies if this is in the wrong category, but I couldn't find a QoS category
I am studying QoS for my SWITCH exam and I am having a hardtime understanding the bits used for L3 IP Precedence and DSCP markings
The texts keep referring to left most bits of the ToS Byte but the values they are stating lead me to look at the right most bits to get the values they are referring to!
Book Extract
IP Precedence markings and Differentiated Services Code Point (DSCP) markings are both Layer 3 markings. IP Precedence uses the three leftmost bits in an IPv4 header's Type of Service (ToS) byte. Like CoS, with three bits at its disposal, IP Precedence markings have values in the range of 0[nd]7.
Question 1
Are the three left most bits the red highlight or the blue hightlight? Example, 00101011or 00101011 (So I am asking is it the left most bits in use or just the left most bits of the byte?).
Book Extract Cont..
Again, Cisco cautions us that values of 6 and 7 are reserved, so you should mark voice media with an IP Precedence value of 5. DSCP markings use the six leftmost bits of a ToS byte, giving us 64 potential values (in the range 0[nd]63). Rather than allowing haphazard value assignments, the IETF has identified and named a collection of preselected values, called per-hop behaviors (PHBs).
Question 2
How can the six leftmost bits of a ToS byte give a range of 0 - 63? Looking at a standard byte 00110011 the six left most bits would value 252 if all turned on, and the right most bits would value 64 if all turned on 00110011? Unless as asked above the six leftmost bits begin where the logical ON begins eg 00110011 in which case what would happen if the value was 00001111 as you wouldn't have six bits in play, so would the value be 15 as per the bold?
Question 3
In addition to the above when referring to the Least Significant Bit are we looking at the last binary 1 (on) or the last binary digit to the right side of the byte regardless if it is a 1 (on) or 0 (off)? Example 11011011 - So the bold 1 at the right side is the least significant but, but if the byte read 11011010 would the 0 at the far right be the least significant bit or would this fall back to the next available 1 (on) bit which would be the bit highlighted in red? I suspect the digit in Red!
Thanks in advance, I know someone out there who works with QoS will be able to answer this for me!
David
10-17-2012 04:22 PM
David,
The TOS BYTE
MSB 0 1 2 3 4 5 6 7 LSB
If our QOS is using IP-PREC we only look at
bits 0 1 2
This allows 2 to the power 3 = 8
levels of service.
If we are usinf DSCP we look at
bits 0 1 2 3 4 5
This allows 2 to the power 6 = 64
levels of service.
We use bits 7 & 8 for Conjestion
notification. So you can ignore them for
the PREC & DSCP Values.
So using IP-PREC lets say the first 3 MSB bits
are set to -- 1 0 1
That sets IP-PREC = 5
or 0 1 1 sets IP-PRIC = 3
Using DSCP lets say the first 6 bits
are set to -- 1 0 1 1 1 0 = 46
and 0 1 1 0 0 0 = 24
Hope this helps a wee bit.
Regards,
Alex.
Please rate useful posts.
10-23-2012 08:03 AM
Thanks for the reply Alex, I know this is a tricky topic and not the most exciting to explain......
Unfortunatley I still feel like I am in the same boat with this as your examples have further solidified what it is I have been reading from the books.
acampbell wrote:
So using IP-PREC lets say the first 3 MSB bits
are set to -- 1 0 1
That sets IP-PREC = 5
or 0 1 1 sets IP-PRIC = 3Using DSCP lets say the first 6 bits
are set to -- 1 0 1 1 1 0 = 46
and 0 1 1 0 0 0 = 24
So the first MSBs are 101 but from left to right 101 = 160 and only from right to left does it = 5, but right-to-left would be the 3 LSBs????
I have to get my head around this, what am I missing?
Cheers,
David
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide