All right, let's address shaping.
We know that we might have an upstream device maybe managed by our ISP and they
are running
policing.
All the configuration we just looked at is what they have deployed.
And so we've got this 600 megabit per second connection.
We don't want them to drop a single packet because if they drop a packet, they
could
drop a really important one.
They're not paying attention in most cases to different tags.
Meanwhile, we could stay in control and decide what packets to drop, making WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Meanwhile, we could stay in control and decide what packets to drop, making
sure that all
of our voice EF packets go through.
And then maybe we even have control over AF 43 and dropping that before AF 41
traffic
within a queue and we could make sure that we're dropping the SCP zeros.
We have full control over what we're doing if we're the ones who are dropping
it.
But it's not just about dropping it.
I mean, our traffic is looking like this sometimes. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I mean, our traffic is looking like this sometimes.
And so we don't necessarily want to send traffic out that if we chop off the
top part
of this that we're actually are losing packets here, the police are would drop
those packets
when we have a gap coming up right here, where if we were to smooth this chart
out a little
bit and maybe we could actually buffer the packets as well and send them out in
a way
that will make it so that they don't get dropped by the police.
So instead of sending our packets like this, we actually know our threshold. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So instead of sending our packets like this, we actually know our threshold.
So we hold those packets in the buffer and then we send them out over the
course of time,
meaning that yeah, we're delaying them just a little bit, but better to delay
them a little
bit than to end up dropping them as long as we have space in our queues to do
so.
Well, then we might as well do that.
Now the way we're going to do this is by using the shape command.
And specifically, the command is shape average followed by a rate. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And specifically, the command is shape average followed by a rate.
And typically, this is how we end up configuring our shaping.
However, we do have the ability to add sort of the BC type of parameter as well
as be
but they're not called this.
So we'll see what those look like here on the CLI coming up as much as possible
.
We really want to try to match the policing policy.
And so we might need to ask some questions of the ISP of how they're doing
things.
But for the most part, if we understand this is a 600 megabit per second
connection and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
connection and
we can figure that in our rate here on this one gig link, then that's going to
do us a
lot of good.
Now another question from a config perspective we might have is thinking along
the lines
of my class maps inside my policy map.
So I've got a policy map here and I just mentioned all of these tags.
So I've got a bunch of different cues.
Let's say I have one, two, three, four different cues here.
And I know that overall I've got 600 megabits per second.
But how do I shape all of these down?
I mean, do I give 150 to each one? WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I mean, do I give 150 to each one?
Do I try to balance this out?
And the reality is that for the most part, that's not actually what we end up
doing.
The shaping methodology we typically use involves nested policy maps.
Meaning that I'm going to create this policy map and then I'm going to apply it
inside
of a different policy map specifically with class default. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
of a different policy map specifically with class default.
So I get into class default here and I can actually apply this entire cueing
structure
within the class default of this other policy map.
So I apply my policy map and then I enter my shape command here.
And that ensures that all of this traffic abides by the shaping.
So that's probably a little bit beyond the scope of the conversation within
this exam
in this course.
But it's good to know in the real world how this ends up coming together. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But it's good to know in the real world how this ends up coming together.
And it allows me to shape all of these cues down to a single rate rather than
trying to
manage the amount of traffic allowed within each individual cue.
So let's pull this up in the lab.
We're going to create a new policy map called shaper.
I'm going to get onto my class default cue here.
And when I run my shape command here, run a question mark and we see that I've
got that
shape average command. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
shape average command.
I'm going to do my question mark again, I see my ability to add a bit right
here.
So I'll just do the 80,000.
Again, we've got the ability to add K and M and G.
But so I could just do 80 K, I suppose here, it'd be the same thing.
When I hit question mark, we see this concept of bits per interval.
So notice, first of all, this is bits, not bytes.
So if I wanted to match up like a 5,000 byte, you know, type of BC kind of
conversation,
well, 5,000 bytes is actually 40,000 bits. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
well, 5,000 bytes is actually 40,000 bits.
So I could do like 40 K here, question mark.
And again, my excess bits, that would be my be so I could do 40 K again.
And then at that point, we'd hit enter.
Now we mentioned that we can apply a policy map here.
Well, yeah, look at this.
We've got the service policy command.
So if I have another set of cues, I could do service policy here.
And we're going to find I don't actually have to specify input or output WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we're going to find I don't actually have to specify input or output
because it's just
going to match whatever it ends up going to on the interface.
It's just part of this queuing structure.
I'm building my cues inside of the class default queue here.
And so I would say, you know, whatever my policy map name is here, hit enter,
it's going
to say that it's not configured because we don't have it.
But that is how we'd go about applying one policy into a shape or policy, which
shapes
the entirety of that link down to a particular, a particular rate. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the entirety of that link down to a particular, a particular rate.
So now if I get onto an interface interface gig zero zero, I believe we already
have.
Yeah, we've got a policy map applied here.
So I'm going to say, actually, I'm going to say no, no service policy input,
police
her.
And then I'm going to say service policy.
Now check this out.
I'm going to say input, let's say I want to shape inbound.
Well, we said shaping is an outbound concept. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Well, we said shaping is an outbound concept.
But hey, policing was an inbound concept and we could apply it both ways.
Shaping is not like that shaping must be applied outbound.
And so we see here that Cisco doesn't allow us to even do that.
Whereas with police, we can technically police outbound.
We just usually use a shaper instead.
So if we don't want to do shaping and we just want to do policing outbound,
great.
But if we're trying to shape inbound, if we think about the whole nature of
shaping,
there's not a whole lot of value in shaping inbound, we're trying to with what WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
there's not a whole lot of value in shaping inbound, we're trying to with what
we're
trying to accomplish with a shaper.
I mean, Cisco doesn't even support it.
So we're not going to worry about that.
We're just going to say service policy output shaper.
And then as always show policy map interface to see that we have target shape
rate of
8,000 here.
And you'll notice that the BC and the BE actually did get entered in again.
It's with bits.
I don't know why they change it up, but they do it with bits on the shaping WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I don't know why they change it up, but they do it with bits on the shaping
versus bytes
on the policing.