This lab challenge is really fun. I think it's really cool to be able to
configure a policy map, apply it to an interface, and then check it. Actually
see the traffic that's showing up on our interfaces. So if you happen to get
stuck, you can follow along in this video or we have the lab script below that
would serve as the solution. But if you haven't yet done so, be sure to take
the
time to fire up the lab and give this a go because some of the best ways to
really drive home configuration is to actually put your hands on the CLI and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
really drive home configuration is to actually put your hands on the CLI and
do that configuration. So we're gonna go through this process here and we're
going to start with, let's see here. So the challenge ultimately is to get us
to
deliver some traffic to router 2 and make sure that it's sliding in. We also
want to do some weighted random early detect configuration. So on router 1 we
're
going to get our priority queue and AF2X queue set up. So I'm gonna get my
class
map and generally speaking with, well if we only have one tag it doesn't really WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
map and generally speaking with, well if we only have one tag it doesn't really
matter but generally speaking we probably want to do a match any here. So
we do class map, match any DSCP, EF, and then match DSCP, EF. I'm gonna do the
same
thing this time matching AF2X and we'll match all of those AF2Xs. So AF2X
AF2X, AF2X, AF2X, AF2X, AF2X. And this is where match any really matters is
with a
queue with multiple tags. So we're gonna keep it simple and just have two WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
queue with multiple tags. So we're gonna keep it simple and just have two
different
queues so we're gonna now create a policy map. I'm gonna call this one red
just because we're double you red I suppose either way that's the focus here.
I'm gonna get on to my one class so I'm gonna do class let's see here which are
we doing. We are going to do just the EF first and get the priority statement.
So
we said we want 100 mag that's 100,000 kilobits per second and then we're gonna
get on to our AF2X and we were told to configure the of the rest of the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
get on to our AF2X and we were told to configure the of the rest of the
bandwidth
we want to give 75% to this queue. Well, so maybe the last 25 would go to class
default.
So I'm gonna use this bandwidth remaining percent command and I'm gonna say
remaining percent 75. Next up we want to configure weighted random early detect
.
So I'm gonna do this random detect DSCP based we have to enable it first and
then I can start to configure my queues. So we're going off of the concept of WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
then I can start to configure my queues. So we're going off of the concept of
the
the queue length being 40 and so I'm going to add on here DSCP AF 23 and we
were
told to create a queue that's based on it being 50% full dropping 20% of the
traffic when it gets to 70% full. So we got to do a little bit of math here
again
if we're at 50% of 40 packets that would be 20 and then we're gonna go all the
way
up to 28 which is 70% and if we're at dropping one out of five packets that's WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
up to 28 which is 70% and if we're at dropping one out of five packets that's
20% the denominator is five. So we're gonna hit enter there and then we'll do
random detect AF 22. Now we're talking about 60 to 80% so 60% is 24, 80% is 32
and we want a one-third so that'd be 1 over 3 which means we need a 3 here and
then random detect a DSCP AF 21 and here we're going to go from 75% which is 30 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
then random detect a DSCP AF 21 and here we're going to go from 75% which is 30
to 100% which is 40 and up to a 50% drop probability at the end which is 1
over 2. So that would be our random detect configuration we're gonna get on
to an interface here and gig 00 and do notice here if we do a show int gig 00
actually let's see here so we've got our queuing strategy is FIFO so by default
in our queue size is 40 here which is what we were expecting so if I add so WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
in our queue size is 40 here which is what we were expecting so if I add so
let's see here so we'll do a service policy and we called that red and we
need to do it in the outbound direction so output red if I do that same command
now that's been applied we'll see a couple of things first of all we're now
running class-based queuing second of all notice on this platform it actually
increases the output queue size to a thousand so that's something they keep
in mind in a real-world scenario we're gonna keep operating under the
assumption that this is a 40 length but because we've applied class-based WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
assumption that this is a 40 length but because we've applied class-based
queuing it has increased the queue size to have a thousand in there so it's
something we absolutely need to pay attention to now from here that's that's
it for our first section if I do a show policy map interface gig 00 we see that
we've got our weighted random early detect configuration here as well as
we're now able to start tracking our packets that are coming in now what we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
we're now able to start tracking our packets that are coming in now what we
want to do is shift gears and we want to make sure that our policy maps are
working along with the queues as we think and so what we're gonna do is we're
gonna send packets over to router 2 that have a DSCP tag and make sure
they're showing up correctly so you do a config T here do a class map DSCP
E F and match that DSCP and then also here class map we've got to do the
match any on this one and then match DSCP AF 21 AF 22 AF 23 okay so now we're WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
match any on this one and then match DSCP AF 21 AF 22 AF 23 okay so now we're
going to apply this to a policy map on an interface I'm gonna say policy map I
'm
just gonna call this monitor because we're gonna monitor traffic using it and
I'm gonna add the classes but we're not gonna have any policy we don't actually
need policy on this because we're just going to use it to track how things are
going so you get onto the interface apply this with service policy input notice
input monitor all right so what are we trying to accomplish here what we're WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
input monitor all right so what are we trying to accomplish here what we're
trying to say is we've got a router router one and this is going through a
switch here in the middle switch one and router two so what I want to do is I
want to send traffic marked with like AF 21 here and by marking the traffic we
have applied a policy map here that has three queues so we've got our EF Q our
AF to X Q and then our class default Q down here so what we're gonna do is WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
AF to X Q and then our class default Q down here so what we're gonna do is
because this is on input we're not gonna apply policy on input we're just going
to monitor this we're gonna run show commands to make sure that packets are
showing up if I send an AF 21 packet from router one I expect it to land in
the middle queue there now quick note a lot of platforms allow me to just say
ping and this is I believe 10 dot 12 dot 0 dot 2 over here and then I could WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
ping and this is I believe 10 dot 12 dot 0 dot 2 over here and then I could
actually specify a tag so I could say something like DSCP AF 21 well in our
lab environment this platform doesn't allow us to do that so we're going to
specify TOS the TOS is a one byte field and so we're going to need to know
what exactly we're going to mark it with and so how do we go about doing this
well let's pay attention to what AF 21 is AF 21 is saying that I've got three WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
well let's pay attention to what AF 21 is AF 21 is saying that I've got three
bytes here and our three bits rather and then another three bits and then two
bits
in the type of service so this first three bits would be the two two is 0 1 0
the second three bits this last one with the shirt forwarding is always a 0 and
so the other digit is a one so I say 0 1 here and then these last two are can
be
anything ultimately but we're just gonna leave it as a 0 set of 0s because of
this we are now going to need to translate this into a decimal value that we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
this we are now going to need to translate this into a decimal value that we
send
so if this is the that's the 8 so that's an 8 and this is the 64's 64 plus 8
this would be 72 so this command is going to send this in the type of service
field which ultimately translates to AF 21 because of the bits being here and
these two bits here so if any of that is a little bit off-putting then we just WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
these two bits here so if any of that is a little bit off-putting then we just
covered this in a great amount of detail just a few skills ago so make sure to
go back and review that if necessary but that is what we're trying to
accomplish here so if I do a show policy map interface gig 1 0 I can see
that I've got my cues here as defined EF 2x and we see we've got zero packets
on the AF 2x so if I come back to router 1 I say ping 10 dot 12 dot 0 dot 2 and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
on the AF 2x so if I come back to router 1 I say ping 10 dot 12 dot 0 dot 2 and
I
can do this a few times I go back to router 2 I run this command again and
still zero packets in these cues well that's what we expect because we're just
pinging normally but we see a lot of packets racking up here in the class
default which is the catch-all and it's going to receive packets with a default
tag of zero well what if now I add that TOS and we said 72 so I'm going to ping
and let's just do two batches of ping so that was 10 packets I just sent go WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and let's just do two batches of ping so that was 10 packets I just sent go
back
to router 2 take a look at it look at that 10 packets have arrived inside of
our
AF 2x that's pretty cool I love that and so we're going to we're just going to
be able to use policy maps to be able to look at traffic and again make sure
using this command that traffic is showing up in the queue where we think
it's supposed to show up so that's why I said this is really fun lab be sure to WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it's supposed to show up so that's why I said this is really fun lab be sure to
go through this if you haven't already done so and if you have just always
remember the power of the show policy map interface command tell us a lot of
what's going on it shows us our weighted red configuration and it also shows us
the packet count that's showing up in a particular queue I hope there's been
informative for you and I'd like to thank you for viewing