All right, let's go ahead and get going here on the CLI.
We're going to do a config T and we're going to build a policy map.
We'll just call this police or keep things straight and we're going to do all
of our
configuration under the class default.
So the command here is police and when I do police question mark, we're going
to see
the different options.
Now we're going to find as we go through the police or configuration is
probably more than
most any other configuration I can think of.
There's actually a lot of ways of configuring the same thing. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
There's actually a lot of ways of configuring the same thing.
We have a lot of shortcuts given to us by Cisco.
For example, I can type in CIR here and then specify a rate like 80,000 or I
could just
specify 80,000.
I don't have to include CIR for whatever reason.
So Cisco makes a lot of optional configurations in here.
For example, I could also specify then my BC, we see that there, BC.
And I could do that or I could just specify the burst bytes. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And I could do that or I could just specify the burst bytes.
I could say BC 5000 or I could just say 5000.
And then from here, we can see that I can specify my conform action or I can
actually
hit enter here under the police sub configuration prompt and we see that I can
add my conform
action, exceed action and violate action.
So kind of interesting how Cisco gives us a little bit of a Swiss army knife of
configuration
options.
The way we do things is just up to us, I suppose.
But we need to be able to interpret the different configurations that we might WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But we need to be able to interpret the different configurations that we might
be given so that
we understand what exactly is happening.
So let's go ahead and finish this a configuration out.
So what we've done is we've configured a police, sir, that's going to allow for
80 kilobits
per second.
Now, just to drive point the home, I was just saying, I could say police 80,000
.
I could also say police 80 K here.
And we see that I can continue the configuration as is.
And so even just throwing in 80 and then question mark, we see we've got the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so even just throwing in 80 and then question mark, we see we've got the
ability
to do K for killer M for mega, G for giga, we can even use decimal points here.
Lots and lots of flexibility more so than with a lot of other configurations
that require
us to follow a particular format and syntax.
So let's go ahead and again, do this configuration.
I'll just, well, now we could say 80 K and 5000 if we wanted to head enter.
And now we look at the different options.
So we have a couple we want to lock in on, we're looking at conform action here WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we have a couple we want to lock in on, we're looking at conform action here
.
So I want to specify that.
And then we also have our exceed action.
So those are the two actions that we need to take for a basic two color police,
sir.
So if I do conform action question mark, we see our options.
The two most basic ones are going to be transmit and drop.
And so for conform action, probably going to transmit this, no problem.
And then I can specify my exceed action.
And I could say drop here.
And that's usually what we do for these policeors that only have conforming and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And that's usually what we do for these policeors that only have conforming and
exceeding traffic.
However, this whole section right here, this is all of our options for remark
ing traffic.
Notice they all end in the word transmit.
That's because Cisco's trying to tell us that we're still going to transmit the
packet and
all of these descriptions say, and send it and send it and send it.
So we are rewriting the tag and we're going to then transmit the packet.
Now for the most part, we're going to lock in on either setting the CLS and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now for the most part, we're going to lock in on either setting the CLS and
transmitting
or more likely setting the DSCP and transmitting.
Yeah, we can do this with IP set or IP, I P precedence, an MPLS, for example,
we've got
tunnel options in here, but in a typical network for the most part, if we want
to remark the
packet, we're probably going to do set DSCP transmit, at which point we're
given the
option of what tag do we want to use.
And so if I just want to wipe the tag, I could say zero here, or I could use
the keyword
default. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
default.
And that would effectively wipe out the DSCP tag.
Now what I really want to do in this situation is do a drop.
If you exceed my rate that I've configured, I want to drop that traffic.
Now just like with all other policy maps, we're going to need to get onto an
interface
here.
Router one is gig zero one here, I believe, nope, gig zero zero.
There we go.
And then we'll use the service policy command.
Just keep in mind that police are usually inbound. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Just keep in mind that police are usually inbound.
So I'd say input police are here.
Now I can specify this is a little bit of a lab nuance.
Don't worry too much about this if you get it as well.
Just figures it out eventually.
But notice that I can also say output police are so I can police outbound.
It's just usually we want to perform traffic shaping outbound, not policing out
bound.
So I'm going to say no to that say no service policy outbound police are, but WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'm going to say no to that say no service policy outbound police are, but
be aware that
it is an option even though we usually apply it in the inbound direction.
And so in the end show policy map interface gig zero zero.
Again one of our favorite commands here throughout these skills is going to
show us our policing
policy, the CIR, the BC, everything that we talked about there.
And then how many packets fall into the conformed and exceeded category.
So we've got lots of conforming packets at this point.
We haven't exceeded anything.
And so if I were to go to let's say router two and let's ping back to router WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so if I were to go to let's say router two and let's ping back to router
one here
and I'm going to get five packets.
Okay, no problem.
So that's looking good.
What if I just repeat this 50 times?
Okay, well those all went through.
Guess why?
Because pings are very, very small.
What if I really ramp things up here?
What if I said size 1500?
Well now we're sending so much traffic that look at that.
Occasionally we're seeing that traffic is getting dropped. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Occasionally we're seeing that traffic is getting dropped.
It's getting dropped by that police.
Or if I go back to router one, run the same command.
Notice we have four exceeded packets and the action is to drop.
Well how many packets did we drop from router two's perspective?
One, two, three and four.
If we highlight the different decimal points in there that show that we dropped
a packet,
we dropped four from router two's perspective, router one says that we dropped
four packets.
It's exactly what we'd expect.
So that is how we configure a policeor. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So that is how we configure a policeor.
Make sure you take the time to do this configuration yourself again because
there are so many different
ways to do it.
We could configure all of our parameters on one line.
We can do it in multiple lines.
We can use the shortcuts.
We can leave some of the parameters in.
We can take them out lots of ways of doing it.
The best way to be comfortable with that is just to get in there and do it
yourself.
But again, take advantage of this lab environment and the show policy map
interface command
to make sure that we actually do see that packets are getting dropped when they WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to make sure that we actually do see that packets are getting dropped when they
violate
the policeor policy.