WEBVTT

0:00:03.060000 --> 0:00:08.580000
 Hello and welcome to this video
 titled IP precedence and DSCP.

0:00:08.580000 --> 0:00:13.120000
 In this video we're going to dig a little
 bit deeper into the IP version

0:00:13.120000 --> 0:00:18.480000
 4 toss byte, sometimes called the
 differentiated services field.

0:00:18.480000 --> 0:00:23.560000
 I'm going to define DSCP and show you
 how to understand it and count in

0:00:23.560000 --> 0:00:31.000000
 DSCP and we're going to do that.

0:00:31.000000 --> 0:00:34.380000
 So let's start with the
 IP version 4 toss byte.

0:00:34.380000 --> 0:00:37.680000
 Like I mentioned, depending on some
 newer papers you might read, this

0:00:37.680000 --> 0:00:41.720000
 byte might also be called the
 differentiated services field.

0:00:41.720000 --> 0:00:45.880000
 And let's just refresh ourselves real
 quickly here with where this is.

0:00:45.880000 --> 0:00:48.940000
 So this is what we're talking
 about right now.

0:00:48.940000 --> 0:00:51.880000
 So we are looking at this byte.

0:00:51.880000 --> 0:00:58.060000
 Okay, so we're going to dig into
 the details of that right there.

0:00:58.060000 --> 0:01:06.480000
 Okay, so originally back in RFC 791,
 which first defines the IP packet,

0:01:06.480000 --> 0:01:10.420000
 the header format and what all those fields
 mean, this is what they originally

0:01:10.420000 --> 0:01:12.640000
 defined that byte to mean.

0:01:12.640000 --> 0:01:18.700000
 So they said that, so this is the entire
 byte right there, they said that

0:01:18.700000 --> 0:01:24.400000
 bits 0 through 2, kind of interesting,
 the count starting at 0, but these

0:01:24.400000 --> 0:01:28.540000
 first 3 bits right here were
 the IP precedence bits.

0:01:28.540000 --> 0:01:32.220000
 And this was used to define
 the priority of traffic.

0:01:32.220000 --> 0:01:36.500000
 So routine traffic, or pretty much
 the default traffic is all zeros.

0:01:36.500000 --> 0:01:41.560000
 And that's every packet your laptop
 per PC spits out will by default be

0:01:41.560000 --> 0:01:49.880000
 categorized as routine
 with 0, 0, 0.

0:01:49.880000 --> 0:01:54.220000
 And each one of these had a special
 name or label that you can see from

0:01:54.220000 --> 0:02:00.520000
 that. Now these other bits, for example,
 this here normally was a 0, but

0:02:00.520000 --> 0:02:04.680000
 if you set that bit to 1, that meant
 that this packet was requesting a

0:02:04.680000 --> 0:02:08.960000
 path through the network with
 the lowest delay possible.

0:02:08.960000 --> 0:02:13.000000
 If you set the next bit to a 1, that
 meant you're requesting the highest

0:02:13.000000 --> 0:02:15.020000
 throughput possible.

0:02:15.020000 --> 0:02:18.420000
 The next bit, if you set that bit to
 1, meant you were asking for the

0:02:18.420000 --> 0:02:22.580000
 highest reliability, and then the last
 2 bits did not have any meaning.

0:02:22.580000 --> 0:02:26.000000
 Those were reserved
 for future use.

0:02:26.000000 --> 0:02:29.740000
 Now what's kind of interesting is that
 even though these bit meanings

0:02:29.740000 --> 0:02:35.380000
 were set decades ago and quality of
 service features have been out for

0:02:35.380000 --> 0:02:41.300000
 decades, vast majority of network vendor
 equipment never bothered to look

0:02:41.300000 --> 0:02:46.700000
 at these bits right here.

0:02:46.700000 --> 0:02:51.760000
 So even if you had a host device like
 a server or a PC or laptop that

0:02:51.760000 --> 0:02:56.860000
 was capable of setting the delay, throughput,
 or reliability bits, you

0:02:56.860000 --> 0:02:58.300000
 were wasting your time.

0:02:58.300000 --> 0:03:02.900000
 Because most routers and switches like
 99.99% of them didn't even look

0:03:02.900000 --> 0:03:06.380000
 at those bits, didn't even have the capability
 to look at those bits with

0:03:06.380000 --> 0:03:08.580000
 any QoS features.

0:03:08.580000 --> 0:03:12.920000
 So for the longest time, when we talked
 about doing IP, or when we talked

0:03:12.920000 --> 0:03:17.680000
 about doing quality of service at layer
 3, all it meant was dealing with

0:03:17.680000 --> 0:03:19.380000
 the precedence bits.

0:03:19.380000 --> 0:03:23.640000
 And you could see here you had a choice
 of 8 different levels from 0,

0:03:23.640000 --> 0:03:28.820000
 which is routine, up to the highest,
 which was 7 for network control.

0:03:28.820000 --> 0:03:34.140000
 And technically speaking, the values of
 6 and 7, you weren't really supposed

0:03:34.140000 --> 0:03:37.120000
 to use those. Routing protocols
 could use those.

0:03:37.120000 --> 0:03:41.920000
 For example, OSPF, LSA's, LinkState
 updates go out with an IP precedence

0:03:41.920000 --> 0:03:44.680000
 of 6, inter-network control.

0:03:44.680000 --> 0:03:49.980000
 So really, as an end user with a server
 or laptop per PC, the only values

0:03:49.980000 --> 0:03:55.900000
 you could really set were from
 0 to 5 for IP precedence.

0:03:55.900000 --> 0:04:00.520000
 So if you think about all the different
 kinds of traffic that's flowing

0:04:00.520000 --> 0:04:05.260000
 through a network, there's a lot more
 than five different levels of traffic.

0:04:05.260000 --> 0:04:07.980000
 But with the original way of
 IP precedence, that was it.

0:04:07.980000 --> 0:04:12.140000
 Every traffic, every flow of traffic
 that was going through your network,

0:04:12.140000 --> 0:04:16.120000
 you could only choose from six different
 levels here, 0 through 5, to

0:04:16.120000 --> 0:04:18.800000
 categorize or classify
 that traffic.

0:04:18.800000 --> 0:04:23.020000
 Then a couple of decades ago, some
 people came around, they looked at

0:04:23.020000 --> 0:04:24.400000
 this and they said, you know what?


0:04:24.400000 --> 0:04:27.740000
 This is an 8-bit field here, but we're
 really only using three of those

0:04:27.740000 --> 0:04:31.080000
 bits. The last five bits
 aren't being used.

0:04:31.080000 --> 0:04:35.500000
 And yet, wouldn't it be nice if we could
 have a lot more different classes

0:04:35.500000 --> 0:04:38.620000
 of traffic than just six levels?

0:04:38.620000 --> 0:04:42.200000
 Wouldn't it be nice if we could have
 dozens of levels of traffic using

0:04:42.200000 --> 0:04:45.140000
 this exact same byte?

0:04:45.140000 --> 0:04:46.720000
 And so they said, you know what?

0:04:46.720000 --> 0:04:51.780000
 Let's repurpose that byte and look
 at it a slightly different way.

0:04:51.780000 --> 0:04:55.500000
 In other words, let's interpret the
 bits a little bit differently.

0:04:55.500000 --> 0:05:00.680000
 So now, when you enable QoS on a router
 switch and you want the router

0:05:00.680000 --> 0:05:04.860000
 switch to look at this octet,
 this byte, you have a choice.

0:05:04.860000 --> 0:05:08.680000
 You could have it look at the old way,
 which is IP precedence, which means

0:05:08.680000 --> 0:05:11.080000
 it's only going to look at those three
 bits there on the end and that's

0:05:11.080000 --> 0:05:15.680000
 it. Or you could have it look at the new
 way, which is called differentiated

0:05:15.680000 --> 0:05:19.600000
 services, Codepoint or DSCP.

0:05:19.600000 --> 0:05:25.300000
 DSCP now looks at the first six bits
 of that byte to identify the relative

0:05:25.300000 --> 0:05:27.480000
 priority of the packet.

0:05:27.480000 --> 0:05:30.320000
 And this is both for
 IPv4 and IPv6.

0:05:30.320000 --> 0:05:34.840000
 So for IPv4 and IPv6, they
 both had a one byte field.

0:05:34.840000 --> 0:05:38.320000
 Now IPv6, it's just
 supposed to be DSCP.

0:05:38.320000 --> 0:05:42.180000
 With IPv4, you could do the older
 way of IP precedence or this.

0:05:42.180000 --> 0:05:44.120000
 So how does this work?

0:05:44.120000 --> 0:05:45.560000
 All right. So here was
 the old way, right?

0:05:45.560000 --> 0:05:49.100000
 The legacy way of IP precedence, where
 the first three bits here in yellow,

0:05:49.100000 --> 0:05:51.720000
 the priority bits where all
 you could really look at.

0:05:51.720000 --> 0:05:55.820000
 With DSCP, we now have
 the first six bits.

0:05:55.820000 --> 0:06:02.060000
 But technically speaking,
 it's really five, not six.

0:06:02.060000 --> 0:06:05.400000
 So for this, I'm going to do a little
 bit of whiteboarding right here.

0:06:05.400000 --> 0:06:09.060000
 So I want you to notice that the first
 three bits, which we used to call

0:06:09.060000 --> 0:06:12.220000
 the IP precedence bits, those
 have a different term now.

0:06:12.220000 --> 0:06:15.640000
 We call those the class
 selector bits.

0:06:15.640000 --> 0:06:20.920000
 And the next two bits are called
 the assured forwarding bits.

0:06:20.920000 --> 0:06:23.840000
 All right. So let's break that
 down a little bit here.

0:06:23.840000 --> 0:06:27.700000
 And actually, I'm going to, yeah, I'll
 just go ahead and do that here

0:06:27.700000 --> 0:06:29.820000
 on the whiteboard.

0:06:29.820000 --> 0:06:34.740000
 So when you are in the purpose of this
 whole video course here is not

0:06:34.740000 --> 0:06:39.440000
 to show you how to configure QoS features,
 but just to give you like a

0:06:39.440000 --> 0:06:40.820000
 high level overview.

0:06:40.820000 --> 0:06:47.700000
 But part of configuring QoS is you would
 say, when packets come in that

0:06:47.700000 --> 0:06:51.500000
 match this particular criteria, like
 maybe their voice packets or their

0:06:51.500000 --> 0:06:56.680000
 video packets, I want to go into this
 byte and I want to set the DSCP

0:06:56.680000 --> 0:07:00.960000
 bits. Okay. Now, when you're configuring
 it, when you tell you want to

0:07:00.960000 --> 0:07:04.200000
 set the DSCP bits, you're going
 to have some options here.

0:07:04.200000 --> 0:07:08.120000
 One way is you could
 do it like this.

0:07:08.120000 --> 0:07:12.400000
 So here's our toss byte,
 the entire byte.

0:07:12.400000 --> 0:07:18.900000
 All right. Here's
 the entire 8 bits.

0:07:18.900000 --> 0:07:23.540000
 And we know that DSCP is dealing
 with 6 of those bits.

0:07:23.540000 --> 0:07:25.940000
 If I've done my counting right,
 I think I've done it.

0:07:25.940000 --> 0:07:27.660000
 Yes, right there.

0:07:27.660000 --> 0:07:33.480000
 Okay. So with 6 bits, the way you do
 the counting, normally people when

0:07:33.480000 --> 0:07:36.620000
 they're first learning about DSCP, the
 first thing they get wrong is when

0:07:36.620000 --> 0:07:39.400000
 they think about counting and binary,
 they say, okay, that's the one bit,

0:07:39.400000 --> 0:07:42.020000
 that's the two bit,
 four bit, eight bit.

0:07:42.020000 --> 0:07:43.900000
 No, that is wrong.

0:07:43.900000 --> 0:07:51.360000
 So when it comes to DSCP, those last
 two bits, these right here, are not

0:07:51.360000 --> 0:07:54.320000
 used for the prioritization
 of traffic.

0:07:54.320000 --> 0:07:55.820000
 They actually do have a meaning.

0:07:55.820000 --> 0:08:00.780000
 They're called the explicit congestion
 notification bits, but that has

0:08:00.780000 --> 0:08:04.280000
 nothing to do with the relative
 priority of this traffic.

0:08:04.280000 --> 0:08:07.220000
 So because they're not part of the priority,
 the bit counting starts right

0:08:07.220000 --> 0:08:14.460000
 here. One, two, four,
 eight, 16, 32.

0:08:14.460000 --> 0:08:17.920000
 So because the counting starts right there,
 you can see that just providing

0:08:17.920000 --> 0:08:23.400000
 a simple DSCP number, your lowest number
 could be zero, which would be

0:08:23.400000 --> 0:08:25.540000
 all those bits zeroed out.

0:08:25.540000 --> 0:08:30.120000
 Now, if I set all those bits to a
 one, what would that number be?

0:08:30.120000 --> 0:08:36.480000
 The highest number is 63.

0:08:36.480000 --> 0:08:37.680000
 That's the highest number.

0:08:37.680000 --> 0:08:41.520000
 If I set, so if I count these up, 32
 plus 16 plus eight all the way down

0:08:41.520000 --> 0:08:46.200000
 to one, that's your
 highest value of 63.

0:08:46.200000 --> 0:08:51.200000
 So when you do get around to learning
 how to configure QoS, if you identify

0:08:51.200000 --> 0:08:58.220000
 traffic is different, whatever that class
 is, telnet traffic, voice traffic,

0:08:58.220000 --> 0:09:01.800000
 low delay traffic, whatever you want
 the class to be, and then once you

0:09:01.800000 --> 0:09:06.460000
 decide, okay, now that I've identified
 that, I want to mark the DSCP bits.

0:09:06.460000 --> 0:09:07.440000
 You could do this.

0:09:07.440000 --> 0:09:12.540000
 You could say, I want to mark that
 class of traffic as DSCP 42 or DSCP

0:09:12.540000 --> 0:09:18.740000
 12 or DSCP 63. You got any number
 there between 0 and 63.

0:09:18.740000 --> 0:09:23.060000
 And then once you've marked it, now
 other QoS features could be looking

0:09:23.060000 --> 0:09:24.120000
 for that marking.

0:09:24.120000 --> 0:09:27.500000
 You could have other QoS features that
 say, okay, when I see a packet

0:09:27.500000 --> 0:09:32.720000
 that comes in with a DSCP value of 49,
 I'm going to do this special thing

0:09:32.720000 --> 0:09:37.120000
 to it. Versus something else that's
 got a DSCP value of 22, I'm going

0:09:37.120000 --> 0:09:38.920000
 to do something else with that.

0:09:38.920000 --> 0:09:42.360000
 Okay, so that's one way you could mark
 the DSCP bits is just by picking

0:09:42.360000 --> 0:09:45.800000
 a number between 0 and 63.

0:09:45.800000 --> 0:09:49.720000
 Now there is another couple of
 ways you could do this here.

0:09:49.720000 --> 0:09:52.520000
 And I just want to
 show this to you.

0:09:52.520000 --> 0:09:55.720000
 All right, so let's jump
 into a router here.

0:09:55.720000 --> 0:10:00.340000
 Don't worry if you don't understand
 all the commands I'm doing here.

0:10:00.340000 --> 0:10:12.100000
 That's not the intent.

0:10:12.100000 --> 0:10:24.300000
 I'll just say match
 any policy map test.

0:10:24.300000 --> 0:10:28.080000
 Okay, so notice here, don't worry about
 everything I've done up to this

0:10:28.080000 --> 0:10:32.300000
 point. But right now I'm saying, okay,
 if stuff matches a certain criteria,

0:10:32.300000 --> 0:10:35.220000
 I want to change the DSCP bits.

0:10:35.220000 --> 0:10:36.520000
 So notice my options here.

0:10:36.520000 --> 0:10:39.080000
 I could pick a number
 between 0 and 63.

0:10:39.080000 --> 0:10:44.360000
 And hopefully now you understand why
 it has this range from 0 to 63.

0:10:44.360000 --> 0:10:47.540000
 Or I could pick some
 of this stuff.

0:10:47.540000 --> 0:10:50.240000
 Now what the heck is
 that referring to?

0:10:50.240000 --> 0:10:59.340000
 Well, that gets us into our next slide,
 which are DSCP per hop behavior

0:10:59.340000 --> 0:11:04.760000
 classes. Now let me step back here
 for a moment and define this term,

0:11:04.760000 --> 0:11:08.200000
 PHB or per hop behavior.

0:11:08.200000 --> 0:11:15.660000
 So in the sort of broad world of quality
 of service, each networking device,

0:11:15.660000 --> 0:11:22.860000
 whether it be a router, a switch, a
 firewall, even a Wi-Fi access point,

0:11:22.860000 --> 0:11:26.240000
 any networking device that has the
 ability to have quality of service

0:11:26.240000 --> 0:11:32.680000
 turned on and do something special from
 a QS perspective is called a hop.

0:11:32.680000 --> 0:11:34.140000
 That's a hop of QOS.

0:11:34.140000 --> 0:11:37.780000
 So your packet as it's going from source
 to destination could go through

0:11:37.780000 --> 0:11:42.860000
 a dozen different hops of various routers
 and switches and things, all

0:11:42.860000 --> 0:11:46.640000
 of which could act on that packet with
 various different quality of service

0:11:46.640000 --> 0:11:51.440000
 features. So when we talk about per
 hop behaviors, that's just a fancy

0:11:51.440000 --> 0:11:57.760000
 way of saying on every given device,
 once it hits that hop, what behavior

0:11:57.760000 --> 0:12:00.280000
 is that hop going to do?

0:12:00.280000 --> 0:12:04.400000
 Is the behavior of that hop going
 to be set the DSCP bits?

0:12:04.400000 --> 0:12:08.580000
 Is the behavior of that hop going to be
 slowed down or speed up that packet?

0:12:08.580000 --> 0:12:13.480000
 There's a whole bunch of things QOS
 could do at that particular hop in

0:12:13.480000 --> 0:12:17.680000
 the network as a behavior
 for that packet.

0:12:17.680000 --> 0:12:21.440000
 So that's what PHB or per
 hop behavior means.

0:12:21.440000 --> 0:12:25.520000
 It sounds fancy, but it's nothing
 really that complex.

0:12:25.520000 --> 0:12:31.880000
 So as this mentions here, there are four
 high level traffic classes defined

0:12:31.880000 --> 0:12:34.120000
 for DSCP per hop behaviors.

0:12:34.120000 --> 0:12:37.580000
 And this is just terminology by wanting
 to understand what these mean.

0:12:37.580000 --> 0:12:41.580000
 So first of all, there's something
 called default forwarding or DH.

0:12:41.580000 --> 0:12:46.240000
 All that means is that you're not really
 doing anything with the DSCP

0:12:46.240000 --> 0:12:49.200000
 bits. You're just leaving
 them as all zeros.

0:12:49.200000 --> 0:12:54.220000
 So when the packets pop out of your
 laptop for a PC, they're using this

0:12:54.220000 --> 0:12:58.080000
 traffic class called the default forwarding
 traffic class, which means

0:12:58.080000 --> 0:13:00.880000
 your packets are treated the same way
 as everybody else because they're

0:13:00.880000 --> 0:13:06.680000
 all zeros. So that's the default
 forwarding per hop behavior.

0:13:06.680000 --> 0:13:12.200000
 Now, the opposite extreme of
 this is expedited forwarding.

0:13:12.200000 --> 0:13:16.280000
 So for example, any IP phone you've ever
 dealt with, if you've ever worked

0:13:16.280000 --> 0:13:21.060000
 with a Cisco IP phone or an Avaya IP
 phone or whatever, and you pick it

0:13:21.060000 --> 0:13:25.180000
 up and you start talking, one of the
 things that IP phone does is, like

0:13:25.180000 --> 0:13:30.920000
 the name infers, it takes your voice
 and digitizes it into an IP packet.

0:13:30.920000 --> 0:13:34.980000
 Well, part of that process, we know it's
 got an append an IP header, which

0:13:34.980000 --> 0:13:36.800000
 has got a toss byte in there.

0:13:36.800000 --> 0:13:41.980000
 Every IP phone when it deals that toss
 byte, it will set the DSCP bits

0:13:41.980000 --> 0:13:44.560000
 to expedited forwarding.

0:13:44.560000 --> 0:13:50.460000
 So expedited forwarding is kind of the
 well known DSCP value for voice.

0:13:50.460000 --> 0:13:52.760000
 Now, it doesn't mean that
 other things can't use it.

0:13:52.760000 --> 0:13:55.380000
 You could set anything you want to
 expedited forwarding, but just know

0:13:55.380000 --> 0:13:59.520000
 that that's typically what voice is
 assigned to as expedited forwarding.

0:13:59.520000 --> 0:14:03.660000
 And this is how the DSCP bits
 are allocated for that.

0:14:03.660000 --> 0:14:05.260000
 So notice it's the six
 bits on the end.

0:14:05.260000 --> 0:14:07.780000
 Those are our DSCP bits.

0:14:07.780000 --> 0:14:13.840000
 And once again, if you count the binary
 starting with this number right

0:14:13.840000 --> 0:14:15.900000
 there, you're going
 to get screwed up.

0:14:15.900000 --> 0:14:18.520000
 And you're going to wonder
 what the heck is 46?

0:14:18.520000 --> 0:14:23.680000
 This doesn't add up to 46, but if you
 count the binary starting, oops,

0:14:23.680000 --> 0:14:29.820000
 not there, I can line up my pen right
 here with that being the one bit,

0:14:29.820000 --> 0:14:34.980000
 two bit, four bit, and so on and so
 forth, one, two, four, eight, 16,

0:14:34.980000 --> 0:14:40.260000
 32. Well now you can see when you add
 them up, you've got the 32 bit turned

0:14:40.260000 --> 0:14:45.480000
 on plus the eight bit, which
 is 40 plus four plus two.

0:14:45.480000 --> 0:14:51.000000
 So that's the same thing
 as a DSCP of 46.

0:14:51.000000 --> 0:14:57.460000
 So if I go back into my router here,
 you can see, oops, right here, if

0:14:57.460000 --> 0:15:02.740000
 I set the DSCP to the number 46, that
 would be the exact same thing as

0:15:02.740000 --> 0:15:05.120000
 setting it to expedited
 forwarding.

0:15:05.120000 --> 0:15:06.280000
 So I have a choice.

0:15:06.280000 --> 0:15:09.820000
 I can set to EF or the number 46.

0:15:09.820000 --> 0:15:12.880000
 Most people don't normally
 select 46.

0:15:12.880000 --> 0:15:13.820000
 They normally select EF.

0:15:13.820000 --> 0:15:19.980000
 So EF is sort of the well known
 DSCP group for voice.

0:15:19.980000 --> 0:15:24.460000
 And you can see here it's giving you
 what those first six bits are.

0:15:24.460000 --> 0:15:30.200000
 All right, so far we've talked about
 the low end, which is default, all

0:15:30.200000 --> 0:15:34.280000
 zeros. We've talked about sort of the
 upper extreme, which is expedited

0:15:34.280000 --> 0:15:38.040000
 forwarding. Now what are the
 categories in between there?

0:15:38.040000 --> 0:15:40.200000
 Well, there's assured forwarding.

0:15:40.200000 --> 0:15:44.320000
 Assured forwarding AF
-11 through AF-43.

0:15:44.320000 --> 0:15:49.260000
 Let me go back to the whiteboard here
 to explain this a little bit.

0:15:49.260000 --> 0:15:53.520000
 All right, so here
 is my toss byte.

0:15:53.520000 --> 0:16:05.400000
 Okay, and we know that within the toss
 byte, only these six bits here

0:16:05.400000 --> 0:16:09.780000
 are used for the DSCP.

0:16:09.780000 --> 0:16:13.780000
 Remember these are for explicit
 congestion notification.

0:16:13.780000 --> 0:16:16.100000
 Has nothing to do with the
 priority of a packet.

0:16:16.100000 --> 0:16:21.920000
 Okay, so these assured forwarding
 classes, how do they work?

0:16:21.920000 --> 0:16:27.260000
 All right, so first of all, we know
 that with AF, it's going to be AF

0:16:27.260000 --> 0:16:30.700000
-1 through AF-1 something.

0:16:30.700000 --> 0:16:32.260000
 It's always a two digit number.

0:16:32.260000 --> 0:16:36.920000
 AF-1 something through
 AF-4 something.

0:16:36.920000 --> 0:16:38.920000
 Let's talk about this
 first number.

0:16:38.920000 --> 0:16:45.380000
 That first number directly maps
 to your IP precedence bits.

0:16:45.380000 --> 0:16:47.060000
 And remember what those bits were?


0:16:47.060000 --> 0:16:50.280000
 Those bits, or these three
 bits right here.

0:16:50.280000 --> 0:16:52.840000
 Those were your IP
 precedence bits.

0:16:52.840000 --> 0:16:57.660000
 So if I have AF-1 something,
 that means that.

0:16:57.660000 --> 0:16:59.980000
 That's the value of 1.

0:16:59.980000 --> 0:17:06.840000
 If I have AF-3 something,
 it's that.

0:17:06.840000 --> 0:17:11.620000
 And if I have AF-4 something,
 it's that.

0:17:11.620000 --> 0:17:17.740000
 So let's start out
 with the AF-1's.

0:17:17.740000 --> 0:17:22.740000
 Okay, so as far as packets are concerned,
 I'm just going to do a couple

0:17:22.740000 --> 0:17:35.620000
 of them here. So, let's say AF-1 something,
 AF-2 something, and AF-3 something.

0:17:35.620000 --> 0:17:43.480000
 All right, so if, let's say I'm an
 interface on a router, and I have a

0:17:43.480000 --> 0:17:48.100000
 bunch of packets to transmit, so many
 packets of transmit, I can't get

0:17:48.100000 --> 0:17:49.840000
 them out on the wire fast enough.

0:17:49.840000 --> 0:17:54.560000
 So behind me, I've got some memory,
 I have some memory queues.

0:17:54.560000 --> 0:17:57.840000
 And packets are filling
 up in those queues.

0:17:57.840000 --> 0:17:59.960000
 And I need to transmit
 them out on the wire.

0:17:59.960000 --> 0:18:06.560000
 All right, if I am QOS aware, and I'm
 looking at DSCP, and I see this.

0:18:06.560000 --> 0:18:11.380000
 So in my buffer, I see some AF-1 something,
 2 something, and 3 something,

0:18:11.380000 --> 0:18:13.580000
 just like with IP precedence.

0:18:13.580000 --> 0:18:17.200000
 With IP precedence, the higher the
 number, the higher the priority of

0:18:17.200000 --> 0:18:23.320000
 the packet. So if I'm doing QOS correctly,
 I should pull my AF-3's, put

0:18:23.320000 --> 0:18:29.200000
 them on the wire first, before I
 get to my AF-2's, and my AF-1's.

0:18:29.200000 --> 0:18:32.780000
 Okay, because those numbers, 3, 2, 1,
 they map directly to the IP precedence

0:18:32.780000 --> 0:18:35.960000
 bits. Now what about
 the second number?

0:18:35.960000 --> 0:18:38.040000
 What the heck does that stand for?


0:18:38.040000 --> 0:18:46.400000
 All right? So that maps directly
 to these two bits, right here.

0:18:46.400000 --> 0:18:51.720000
 Now, that second number is always going
 to be some value between 1 and

0:18:51.720000 --> 0:18:56.220000
 3. Not 0, it's not going to
 be 0, it'll be 1 and 3.

0:18:56.220000 --> 0:19:03.920000
 So for example, AF-2-2, and this is
 called an Assured Forwarding, that's

0:19:03.920000 --> 0:19:06.940000
 what AF stands for, an Assured
 Forwarding Class.

0:19:06.940000 --> 0:19:12.240000
 AF-2-2 means I've got the value of 2
 encoded there, there's 2, and I've

0:19:12.240000 --> 0:19:14.800000
 got the value of 2 encoded here.

0:19:14.800000 --> 0:19:18.840000
 Because remember, if we take a look at
 each one of these boxes separately,

0:19:18.840000 --> 0:19:24.700000
 you start counting 1, 2 in binary, you
 start counting 1, 2, 4 in binary.

0:19:24.700000 --> 0:19:29.000000
 Each box is looked at independently
 when you're talking about AF.

0:19:29.000000 --> 0:19:31.160000
 So that would be AF-2-2.

0:19:31.160000 --> 0:19:36.120000
 I've got 2 encoded in these 3 bits,
 and I've got a 2 encoded in those

0:19:36.120000 --> 0:19:37.640000
 2 bits right there.

0:19:37.640000 --> 0:19:48.440000
 All right, let's take a
 look at another value.

0:19:48.440000 --> 0:19:54.260000
 Okay, what if I had AF-3-1?

0:19:54.260000 --> 0:20:00.060000
 Well that means we encode the number
 3 right here, those are my class

0:20:00.060000 --> 0:20:07.100000
 selector bits, and these right here
 are my Assured Forwarding bits.

0:20:07.100000 --> 0:20:09.460000
 So I have the number
 1 right there.

0:20:09.460000 --> 0:20:20.320000
 That is AF-3-1. Now you say, well,
 Keith, okay, but if I have 2 bits,

0:20:20.320000 --> 0:20:24.920000
 technically I have 4 possible
 combinations.

0:20:24.920000 --> 0:20:26.460000
 Let's just delete all this stuff.

0:20:26.460000 --> 0:20:30.820000
 If I have 2 bits, I could start with
 that, I could go with that, with

0:20:30.820000 --> 0:20:32.720000
 that, and with that.

0:20:32.720000 --> 0:20:38.900000
 So certainly, this is my values of
 1 through 3, but what about 0?

0:20:38.900000 --> 0:20:44.360000
 You know, isn't there an
 AF-3-0 or an AF-2-0?

0:20:44.360000 --> 0:20:48.460000
 Well let's go back to our router here
 for a second, take a look at him.

0:20:48.460000 --> 0:20:54.780000
 Notice, there's no
 zeros are there.

0:20:54.780000 --> 0:20:59.660000
 When it comes to Assured Forwarding,
 it's always 1, 2, or 3.

0:20:59.660000 --> 0:21:02.360000
 And here we actually see
 the combination, right?

0:21:02.360000 --> 0:21:05.860000
 Here is AF-1, and there's 1.

0:21:05.860000 --> 0:21:09.200000
 Here's AF-1, and here's 3.

0:21:09.200000 --> 0:21:12.060000
 But there's no AF-1-0 or AF-3-0.

0:21:12.060000 --> 0:21:17.560000
 What is that? So when these 2 bits right
 here, when these Assured Forwarding

0:21:17.560000 --> 0:21:23.200000
 bits, when the Assured Forwarding bits
 are zeroed out, that's known as

0:21:23.200000 --> 0:21:27.660000
 a CS value. A CS value.

0:21:27.660000 --> 0:21:48.500000
 So for example, okay, so if I have
 this, what that would represent is

0:21:48.500000 --> 0:21:58.040000
 my class selector bits are 4, my Assured
 Forwarding bits are 2, so that

0:21:58.040000 --> 0:22:03.280000
 would map right here to AF-42.

0:22:03.280000 --> 0:22:15.020000
 However, if I have this, my class selector
 bits are still 4, but because

0:22:15.020000 --> 0:22:22.500000
 my AF bits are zeroed out, that simply
 matches to CS4, as we see right

0:22:22.500000 --> 0:22:29.360000
 there. So whenever the Assured Forwarding
 bits are zeroed out, this is

0:22:29.360000 --> 0:22:31.320000
 a class selector value.

0:22:31.320000 --> 0:22:34.700000
 And you might say, well, why did
 they call it a different name?

0:22:34.700000 --> 0:22:37.100000
 Why did they just keep
 everything as AF?

0:22:37.100000 --> 0:22:43.720000
 Well, I can only speculate, but my speculation
 is this, is that when you

0:22:43.720000 --> 0:22:50.060000
 have a CS value, you're doing that because
 you want to be backwards compatible

0:22:50.060000 --> 0:22:52.500000
 with IP precedence.

0:22:52.500000 --> 0:22:59.640000
 So for example, if I had Router1 right
 here and Router2 right here, let's

0:22:59.640000 --> 0:23:06.300000
 say Router2 is super, super old and
 his code doesn't even support DSCP.

0:23:06.300000 --> 0:23:09.540000
 All he supports is IP precedence
 and that's it.

0:23:09.540000 --> 0:23:14.180000
 So all he can look at are the three
 first bits in the toss byte.

0:23:14.180000 --> 0:23:16.760000
 The other bits he can't
 even pay attention to.

0:23:16.760000 --> 0:23:24.780000
 This guy here can do both
 DSCP and IP precedence.

0:23:24.780000 --> 0:23:30.000000
 And I decide, well, hey, if I'm on a
 device that can do DSCP, I want to

0:23:30.000000 --> 0:23:34.820000
 do DSCP. I want to stay away from
 IP precedence if at all possible.

0:23:34.820000 --> 0:23:39.720000
 Okay? Well, if this guy does DSCP,
 if I set it to one of these values,

0:23:39.720000 --> 0:23:44.100000
 if some packet comes in that's voice or
 telnet or web browsing or whatever,

0:23:44.100000 --> 0:23:48.260000
 so here comes a packet and I decide,
 okay, I want to go into the toss

0:23:48.260000 --> 0:23:51.360000
 byte and I want to change
 the DSCP bits.

0:23:51.360000 --> 0:23:54.980000
 If I set to one of these values right
 here and then I forward that packet

0:23:54.980000 --> 0:24:01.020000
 on to Router2, Router2 is just
 going to ignore my AF bits.

0:24:01.020000 --> 0:24:04.800000
 Once again, the first three bits were
 called the CS bits, the next two

0:24:04.800000 --> 0:24:09.360000
 bits were called the AF bits and the
 last three bits weren't really used

0:24:09.360000 --> 0:24:13.180000
 in this scheme. Well, he's going to ignore
 the AF bits because he doesn't

0:24:13.180000 --> 0:24:14.400000
 even look at that.

0:24:14.400000 --> 0:24:18.260000
 So in order to be backwards compatible,
 I might as well just mark the

0:24:18.260000 --> 0:24:29.340000
 three bits only on the CS value and
 know if you can go from CS1 all the

0:24:29.340000 --> 0:24:36.500000
 way to CS7. But remember, word of warning
 here, CS6 and CS7, you're really

0:24:36.500000 --> 0:24:41.740000
 not supposed to use that because that's
 the same as IP precedence 6 and

0:24:41.740000 --> 0:24:45.760000
 7 and those were used for like network
 control and internet control for

0:24:45.760000 --> 0:24:50.400000
 like routing protocols.

0:24:50.400000 --> 0:25:01.120000
 So let me, I'm going to give you some bits
 in binary, some binary combinations.

0:25:01.120000 --> 0:25:05.540000
 I'm just going to use this black surface
 here as my whiteboard and I want

0:25:05.540000 --> 0:25:09.500000
 you to pause the video for just a couple
 seconds and identify what CS

0:25:09.500000 --> 0:25:14.640000
 or AF value those bits
 correspond to.

0:25:14.640000 --> 0:25:20.160000
 So here we go, 1, 2,
 3, 4, 5, 6, 7, 8.

0:25:20.160000 --> 0:25:24.360000
 And by the way, I might throw some intentional
 errors at you as a gotcha

0:25:24.360000 --> 0:25:26.780000
 that doesn't really
 map to anything.

0:25:26.780000 --> 0:25:29.580000
 And I want you to tell me that
 if it doesn't map to anything.

0:25:29.580000 --> 0:25:34.320000
 So here we go. Let's do
 this first one here.

0:25:34.320000 --> 0:25:40.440000
 All right, what CS or DSCP
 value does that map to?

0:25:40.440000 --> 0:25:42.620000
 Go ahead and pause the video and then
 press play when you think you've

0:25:42.620000 --> 0:25:55.040000
 got the answer. All right, so hopefully
 you said that maps to AF3, 3 because

0:25:55.040000 --> 0:26:01.240000
 your class selector bits, in this case,
 are equaling 3 and your assured

0:26:01.240000 --> 0:26:05.200000
 forwarding bits are
 also equaling 3.

0:26:05.200000 --> 0:26:07.040000
 Good job if you got that.

0:26:07.040000 --> 0:26:08.320000
 Let's do another one.

0:26:08.320000 --> 0:26:11.740000
 Oops, make that a
 little bit bigger.

0:26:11.740000 --> 0:26:24.740000
 Okay, so here's your next one.

0:26:24.740000 --> 0:26:32.500000
 Press play once you think
 you have the answer.

0:26:32.500000 --> 0:26:38.900000
 Hopefully for that you said that
 is assured forwarding 41.

0:26:38.900000 --> 0:26:43.280000
 Class selector is set to a 4.

0:26:43.280000 --> 0:26:47.040000
 Assured forwarding bits
 are set to a 1.

0:26:47.040000 --> 0:26:57.080000
 That's AF41. Let's do another one.


0:26:57.080000 --> 0:27:03.700000
 All right, what about this?

0:27:03.700000 --> 0:27:09.300000
 Press play when you think
 you have the answer.

0:27:09.300000 --> 0:27:15.640000
 Okay, so this was
 a trick question.

0:27:15.640000 --> 0:27:21.860000
 You may have said, oh,
 that must be AF51.

0:27:21.860000 --> 0:27:28.640000
 Well, it's not because remember your
 AF values don't go that high.

0:27:28.640000 --> 0:27:33.880000
 Remember, your AF only
 goes up to 43.

0:27:33.880000 --> 0:27:40.140000
 Anything above that and you're out
 of scope when it comes to AF.

0:27:40.140000 --> 0:27:46.400000
 So, if I actually gave you that
 number, let's go back to that.

0:27:46.400000 --> 0:27:50.120000
 Actually, let's go back
 to my whiteboard here.

0:27:50.120000 --> 0:28:01.060000
 So if I said 101, 01, 000, okay,
 and you said that was AF51.

0:28:01.060000 --> 0:28:03.520000
 Well, we know now that
 AF51 doesn't exist.

0:28:03.520000 --> 0:28:08.840000
 So if I actually wanted to set that
 number in my packet, so if a packet

0:28:08.840000 --> 0:28:11.760000
 came in, I said, oh, that is telnet,
 that's voice and I want to give it

0:28:11.760000 --> 0:28:13.760000
 that binary pattern right there.

0:28:13.760000 --> 0:28:19.300000
 Since I can't choose AF51,
 what would I choose?

0:28:19.300000 --> 0:28:23.860000
 I'd have to choose a
 plain old DSCP value.

0:28:23.860000 --> 0:28:26.860000
 And I'd have to say, okay, well, these
 here are my ECN bits, those don't

0:28:26.860000 --> 0:28:28.620000
 count. And I'd have to
 start adding it up.

0:28:28.620000 --> 0:28:34.960000
 That's the one bit, the two bit,
 four bit, eight bit, 16, 32.

0:28:34.960000 --> 0:28:39.280000
 Okay, so the 32 bit is turned on, the
 eight bits turned on, and the two

0:28:39.280000 --> 0:28:41.720000
 bits turned on. So that's 42.

0:28:41.720000 --> 0:28:46.000000
 So I would simply say
 that is DSCP 42.

0:28:46.000000 --> 0:28:52.220000
 That's how I would get that number put
 into the packet, is just by typing

0:28:52.220000 --> 0:28:59.320000
 in DSCP 42. That's what
 we saw up here.

0:28:59.320000 --> 0:29:04.500000
 I would do set IP DSCP and instead of
 saying AF or CF, I would just put

0:29:04.500000 --> 0:29:08.340000
 in a number 42, and that
 would give me that value.

0:29:08.340000 --> 0:29:18.740000
 All right, so that concludes this video
 on how IP presence and DSCP bits

0:29:18.740000 --> 0:29:21.900000
 work. Thank you for watching.

