Before mapping out our per-hat behaviors, we need to look at our DSCP bits.
So our bits are going to be split into.
We've got those first three bits that were originally set aside for IP
precedence, and
then we have the other three bits that were added in for DSCP, and remember, D
SCP gets
all of these.
And yet IP precedence, from a backward compatibility perspective, is only going
to look at the first
set of three.
They have to be able to coexist, even though IP precedence is pretty well dead WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
They have to be able to coexist, even though IP precedence is pretty well dead
at this
point.
If, for example, we have 101, 110, which, by the way, that would actually map
out to
DSCP of 46, which is expedited forwarding, as we've said.
So we run the math there.
Either way, IP precedence, a device that receives it and can only speak IP
precedence, would
view this as a five.
So kind of interesting how this turns out, how we actually have two different WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So kind of interesting how this turns out, how we actually have two different
numbers
here.
But interestingly, we might notice that because this is, we'll do our binary
math here, the
ones, the twos, the fours, this is the eights column here, or the eights number
.
IP precedence is essentially just looking at this value as a number 0 through 7
, and from
a DSCP perspective, it's going to multiply out by 8.
For example, IP precedence says that we have five here, well, five times eight WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
For example, IP precedence says that we have five here, well, five times eight
is 40, and
then we can see the extra six here, 110 is six, and that's how we get to 46.
That math is going to be useful to us here in a moment when we talk about the
class selector.
So we're now diving into our PHBs.
And the first PHB group that we're going to talk about is class selector.
We're going to talk about three different groups, class selector, assured
forwarding,
and expedited forwarding. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and expedited forwarding.
We mentioned the second two in the previous video, but we're going to start
with class
selector.
Class selector defines eight different DSCP values, and it's meant to provide
backward
compatibility with IP precedence.
The idea here is that I can still use DSCP PHBs, specifically these PHBs, and
yet it's
something that IP precedence is going to understand. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
something that IP precedence is going to understand.
As a result, we're essentially saying we're only going to use the first three
bits.
This assures the network that with some device doesn't support DSCP, then we
can still support
it even though we are only looking at the IP precedence bits.
So the range for this is CS0, where CS stands for class selector, through CS7.
And this is going to match the value that shows up here in those first three WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And this is going to match the value that shows up here in those first three
bits.
So for example, CS4 is going to be a binary of 100 because that's binary for
four, and
then 0, 0, 0, we're always going to have zeros here, regardless of what happens
in the first
three bits.
So 0, 0, 0, there we go.
So if we want to do a calculation to convert it to decimal, which is going to
be a big part
of all of these conversations, is what's the actual decimal number in here, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
of all of these conversations, is what's the actual decimal number in here,
well, we're
simply going to take the CS value and we're going to multiply it by eight for
the reason
that we just mentioned up here with the fact that from a six bits perspective,
we're essentially
only changing the eights and up.
So for example, if I've got a CS of four, like we just said, we can say, all
right, well,
four times eight is equal to 32.
And if we look at what we just said here, this is the ones to the zero power, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And if we look at what we just said here, this is the ones to the zero power,
but ones,
two's, four's, eight's, sixteens, and yes, that is the 32's column.
And so it happens to be 32.
So that means that by extension, CS six is simply six times eight, which must
be a decimal
value of 48.
So we can more or less use class selector to align ourselves with COS and IP
precedence.
That is what class selector is for. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That is what class selector is for.
If we just want to use eight different values in our network and always align
with COS and
IP precedence, then class selector is exactly what we're going to use for our
per hot behaviors.
Now next up is assured forwarding.
This is a little bit more involved of a conversation because it's going to use,
I'll say most of
the bits.
It's actually going to use five of the bits, but we're going to see this here
in a moment.
This gives us 12 different classes.
So class selector gave us eight classes assured forwarding gives us 12 and it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So class selector gave us eight classes assured forwarding gives us 12 and it
follows a specific
format of a F for assured forwarding, then X and Y.
And so X can be between one and four.
And this indicates the priority level.
The higher the priority, the higher the number or vice versa, maybe the higher
the number,
the higher the priority of priority of four should take precedence over a value
of one.
For a Y, this is going to be between one and three. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
For a Y, this is going to be between one and three.
And this indicates the drop probability.
And again, the higher the number, the higher the drop priority, which I feel a
little bit
backwards, because that means one actually has the least drop priority.
So in theory, it is treated better than a three.
So keep that in mind that Y sort of is a little bit of reversed of what we
might expect.
So let's look at something like AF31. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's look at something like AF31.
So remember, the first digit can be from one to four.
The second one can be from one to three.
When we're looking at this, we see that three indicates a high priority.
And the one indicates a low drop probability.
That is how we interpret this.
And because of this, because we've got these 12 different classes, like we said
, we can
simply look at a particular value like AF31, and we can compare it to an AF33, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
simply look at a particular value like AF31, and we can compare it to an AF33,
and we can
understand how this traffic should be treated relative to one another.
Specifically, they should have the same priority values, but this AF33 should
get dropped before
AF31 traffic, because it has a higher drop probability.
Likewise, we could look at AF41 and say that, all right, this actually should
out prioritize
both of these other assured forwarding classes.
Again, we're giving names, so to speak, if you want to call this a name, AF31, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Again, we're giving names, so to speak, if you want to call this a name, AF31,
we're
giving names to DSCP values so that we as humans can look at it and understand
how we're
supposed to treat it.
So here's the question, though.
These have to translate to DSCP values and ultimately binary bits.
So what values are used?
Well, when we break it down, let's just draw it out over here again.
So we've got our first three bits.
We've got our second three bits.
What we're going to do is assured forwarding is always going to set zero here WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
What we're going to do is assured forwarding is always going to set zero here
at the end.
We can use this value for any, you know, we can set a one or a zero there
normally if
we're just using raw DSCP values.
But for assured forwarding, we just always set a zero there.
X is therefore going to be these first three bits and Y is simply going to be
the next
two bits.
So how do we calculate out the value?
Well, let's say that we have AF31 like we just said. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Well, let's say that we have AF31 like we just said.
So AF31 would be a three here, 011, and then a one over here, 01.
So then we have to remember that it still ends with a zero.
Now what if we want to work backwards?
What if we have something like 010, 010?
I guess it's the same thing at the end.
But either way, when we work our way backwards, we'd say, okay, this is binary
for two.
So that'd be AF2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So that'd be AF2.
What's the second value?
Well, if we look at this, we might say that the value is two because this is
binary for
two.
However, again, we ignore the fact that that zero is there.
We're only looking here at these first two digits.
So 01 is simply binary for one, and therefore it's AF21.
Now we can do the math on this to figure out what exactly these decimal values
are.
But fortunately, there's a very simple calculation that we can use, and it is 8 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But fortunately, there's a very simple calculation that we can use, and it is 8
X plus 2Y.
In other words, if I take these two numbers and I plug them into here and here,
I can
figure out what the decimal value is.
So AF31 would be 8X3 plus 2X1.
Again the 8 and the 2 are from our formula, the 3 and the 1 are taken from AF31
.
And so that would be 24 plus 2, and this is 26. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so that would be 24 plus 2, and this is 26.
So a DSCP value of 26 is equivalent to AF31.
Same thing with AF21.
We could say it's 8X2 plus 2X1, and so that'd be 16 plus 2, and this is 18.
So a DSCP value of 18 aligns with AF21.
Now from a human perspective, we care more about this up here.
As humans, we want to look at what we're trying to say.
How does AF31 compare to AF21, and how do we execute that in our network? WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
How does AF31 compare to AF21, and how do we execute that in our network?
So that's what we care about is the name and the AFXY part.
But from a computer perspective, at some point, it has to look at the binary
numbers, and
hey, we might be asked something on an exam, let's say, about what decimal
value is equivalent
to specific assured forwarding values, and so we need to make sure we can go
back and forth
between these.
Now last but not least, we have what we already called out a couple of times, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now last but not least, we have what we already called out a couple of times,
which is expedited
forwarding.
Expedited forwarding is a whole lot more simple than assured forwarding and
even class selector,
because expedited forwarding is exactly one class.
And that one class is a DSCP value of 46, which is known as EF or expedited
forwarding.
This is intended for voiceover IP traffic.
That is pretty much the only time wherever we're going to see it and use it, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That is pretty much the only time wherever we're going to see it and use it,
but it's
very intentionally set aside so that we can recognize the highest priority
traffic on
the network, place it into a priority queue and reserve network bandwidth.
So these three different classes of PHBs are going to need to be familiar with
them,
how they're used, what they're used for, and how to ultimately calculate out
the decimal
and binary values behind each one.