WEBVTT

1
00:00.000 --> 00:04.320
All right, let's go ahead and get going here on the CLI.

2
00:04.320 --> 00:09.360
We're going to do a config T and we're going to build a policy map.

3
00:09.360 --> 00:13.080
We'll just call this police or keep things straight and we're going to do all

4
00:13.080 --> 00:13.440
of our

5
00:13.440 --> 00:16.720
configuration under the class default.

6
00:16.720 --> 00:20.710
So the command here is police and when I do police question mark, we're going

7
00:20.710 --> 00:21.120
to see

8
00:21.120 --> 00:22.320
the different options.

9
00:22.320 --> 00:26.180
Now we're going to find as we go through the police or configuration is

10
00:26.180 --> 00:27.240
probably more than

11
00:27.240 --> 00:29.680
most any other configuration I can think of.

12
00:29.680 --> 00:32.920
There's actually a lot of ways of configuring the same thing.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

12
00:29.680 --> 00:32.920
There's actually a lot of ways of configuring the same thing.

13
00:32.920 --> 00:35.600
We have a lot of shortcuts given to us by Cisco.

14
00:35.600 --> 00:41.830
For example, I can type in CIR here and then specify a rate like 80,000 or I

15
00:41.830 --> 00:42.680
could just

16
00:42.680 --> 00:45.600
specify 80,000.

17
00:45.600 --> 00:49.600
I don't have to include CIR for whatever reason.

18
00:49.600 --> 00:53.080
So Cisco makes a lot of optional configurations in here.

19
00:53.080 --> 00:58.760
For example, I could also specify then my BC, we see that there, BC.

20
00:58.760 --> 01:01.520
And I could do that or I could just specify the burst bytes.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

20
00:58.760 --> 01:01.520
And I could do that or I could just specify the burst bytes.

21
01:01.520 --> 01:06.560
I could say BC 5000 or I could just say 5000.

22
01:06.560 --> 01:10.990
And then from here, we can see that I can specify my conform action or I can

23
01:10.990 --> 01:11.640
actually

24
01:11.640 --> 01:16.800
hit enter here under the police sub configuration prompt and we see that I can

25
01:16.800 --> 01:17.600
add my conform

26
01:17.600 --> 01:19.880
action, exceed action and violate action.

27
01:19.880 --> 01:23.930
So kind of interesting how Cisco gives us a little bit of a Swiss army knife of

28
01:23.930 --> 01:24.840
configuration

29
01:24.840 --> 01:26.240
options.

30
01:26.240 --> 01:29.680
The way we do things is just up to us, I suppose.

31
01:29.680 --> 01:34.390
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

31
01:29.680 --> 01:34.390
But we need to be able to interpret the different configurations that we might

32
01:34.390 --> 01:35.160
be given so that

33
01:35.160 --> 01:37.960
we understand what exactly is happening.

34
01:37.960 --> 01:40.840
So let's go ahead and finish this a configuration out.

35
01:40.840 --> 01:44.520
So what we've done is we've configured a police, sir, that's going to allow for

36
01:44.520 --> 01:45.600
80 kilobits

37
01:45.600 --> 01:46.960
per second.

38
01:46.960 --> 01:51.970
Now, just to drive point the home, I was just saying, I could say police 80,000

39
01:51.970 --> 01:52.280
.

40
01:52.280 --> 01:54.680
I could also say police 80 K here.

41
01:54.680 --> 01:58.840
And we see that I can continue the configuration as is.

42
01:58.840 --> 02:02.800
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

42
01:58.840 --> 02:02.800
And so even just throwing in 80 and then question mark, we see we've got the

43
02:02.800 --> 02:03.240
ability

44
02:03.240 --> 02:10.680
to do K for killer M for mega, G for giga, we can even use decimal points here.

45
02:10.680 --> 02:14.510
Lots and lots of flexibility more so than with a lot of other configurations

46
02:14.510 --> 02:15.280
that require

47
02:15.280 --> 02:19.060
us to follow a particular format and syntax.

48
02:19.060 --> 02:21.320
So let's go ahead and again, do this configuration.

49
02:21.320 --> 02:26.480
I'll just, well, now we could say 80 K and 5000 if we wanted to head enter.

50
02:26.480 --> 02:28.560
And now we look at the different options.

51
02:28.560 --> 02:32.850
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

51
02:28.560 --> 02:32.850
So we have a couple we want to lock in on, we're looking at conform action here

52
02:32.850 --> 02:33.200
.

53
02:33.200 --> 02:34.800
So I want to specify that.

54
02:34.800 --> 02:37.040
And then we also have our exceed action.

55
02:37.040 --> 02:41.780
So those are the two actions that we need to take for a basic two color police,

56
02:41.780 --> 02:42.280
sir.

57
02:42.280 --> 02:45.160
So if I do conform action question mark, we see our options.

58
02:45.160 --> 02:49.720
The two most basic ones are going to be transmit and drop.

59
02:49.720 --> 02:54.800
And so for conform action, probably going to transmit this, no problem.

60
02:54.800 --> 02:58.200
And then I can specify my exceed action.

61
02:58.200 --> 02:59.800
And I could say drop here.

62
02:59.800 --> 03:04.420
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

62
02:59.800 --> 03:04.420
And that's usually what we do for these policeors that only have conforming and

63
03:04.420 --> 03:06.040
exceeding traffic.

64
03:06.040 --> 03:10.840
However, this whole section right here, this is all of our options for remark

65
03:10.840 --> 03:12.000
ing traffic.

66
03:12.000 --> 03:14.120
Notice they all end in the word transmit.

67
03:14.120 --> 03:17.880
That's because Cisco's trying to tell us that we're still going to transmit the

68
03:17.880 --> 03:18.520
packet and

69
03:18.520 --> 03:23.080
all of these descriptions say, and send it and send it and send it.

70
03:23.080 --> 03:28.200
So we are rewriting the tag and we're going to then transmit the packet.

71
03:28.200 --> 03:31.030
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

71
03:28.200 --> 03:31.030
Now for the most part, we're going to lock in on either setting the CLS and

72
03:31.030 --> 03:31.680
transmitting

73
03:31.680 --> 03:34.840
or more likely setting the DSCP and transmitting.

74
03:34.840 --> 03:41.180
Yeah, we can do this with IP set or IP, I P precedence, an MPLS, for example,

75
03:41.180 --> 03:41.920
we've got

76
03:41.920 --> 03:46.510
tunnel options in here, but in a typical network for the most part, if we want

77
03:46.510 --> 03:47.280
to remark the

78
03:47.280 --> 03:50.960
packet, we're probably going to do set DSCP transmit, at which point we're

79
03:50.960 --> 03:51.560
given the

80
03:51.560 --> 03:54.040
option of what tag do we want to use.

81
03:54.040 --> 03:58.240
And so if I just want to wipe the tag, I could say zero here, or I could use

82
03:58.240 --> 03:59.000
the keyword

83
03:59.000 --> 04:00.520
default.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

83
03:59.000 --> 04:00.520
default.

84
04:00.520 --> 04:03.720
And that would effectively wipe out the DSCP tag.

85
04:03.720 --> 04:08.640
Now what I really want to do in this situation is do a drop.

86
04:08.640 --> 04:14.000
If you exceed my rate that I've configured, I want to drop that traffic.

87
04:14.000 --> 04:17.450
Now just like with all other policy maps, we're going to need to get onto an

88
04:17.450 --> 04:18.040
interface

89
04:18.040 --> 04:19.040
here.

90
04:19.040 --> 04:24.320
Router one is gig zero one here, I believe, nope, gig zero zero.

91
04:24.320 --> 04:25.320
There we go.

92
04:25.320 --> 04:27.800
And then we'll use the service policy command.

93
04:27.800 --> 04:31.320
Just keep in mind that police are usually inbound.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

93
04:27.800 --> 04:31.320
Just keep in mind that police are usually inbound.

94
04:31.320 --> 04:34.360
So I'd say input police are here.

95
04:34.360 --> 04:38.480
Now I can specify this is a little bit of a lab nuance.

96
04:38.480 --> 04:41.880
Don't worry too much about this if you get it as well.

97
04:41.880 --> 04:44.680
Just figures it out eventually.

98
04:44.680 --> 04:50.840
But notice that I can also say output police are so I can police outbound.

99
04:50.840 --> 04:55.730
It's just usually we want to perform traffic shaping outbound, not policing out

100
04:55.730 --> 04:56.400
bound.

101
04:56.400 --> 05:00.450
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

101
04:56.400 --> 05:00.450
So I'm going to say no to that say no service policy outbound police are, but

102
05:00.450 --> 05:01.160
be aware that

103
05:01.160 --> 05:05.280
it is an option even though we usually apply it in the inbound direction.

104
05:05.280 --> 05:10.680
And so in the end show policy map interface gig zero zero.

105
05:10.680 --> 05:14.300
Again one of our favorite commands here throughout these skills is going to

106
05:14.300 --> 05:15.400
show us our policing

107
05:15.400 --> 05:20.400
policy, the CIR, the BC, everything that we talked about there.

108
05:20.400 --> 05:25.600
And then how many packets fall into the conformed and exceeded category.

109
05:25.600 --> 05:27.800
So we've got lots of conforming packets at this point.

110
05:27.800 --> 05:29.920
We haven't exceeded anything.

111
05:29.920 --> 05:35.460
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

111
05:29.920 --> 05:35.460
And so if I were to go to let's say router two and let's ping back to router

112
05:35.460 --> 05:36.200
one here

113
05:36.200 --> 05:38.120
and I'm going to get five packets.

114
05:38.120 --> 05:39.440
Okay, no problem.

115
05:39.440 --> 05:40.440
So that's looking good.

116
05:40.440 --> 05:43.080
What if I just repeat this 50 times?

117
05:43.080 --> 05:45.160
Okay, well those all went through.

118
05:45.160 --> 05:46.160
Guess why?

119
05:46.160 --> 05:48.320
Because pings are very, very small.

120
05:48.320 --> 05:49.920
What if I really ramp things up here?

121
05:49.920 --> 05:52.400
What if I said size 1500?

122
05:52.400 --> 05:56.880
Well now we're sending so much traffic that look at that.

123
05:56.880 --> 06:00.400
Occasionally we're seeing that traffic is getting dropped.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

123
05:56.880 --> 06:00.400
Occasionally we're seeing that traffic is getting dropped.

124
06:00.400 --> 06:01.720
It's getting dropped by that police.

125
06:01.720 --> 06:05.760
Or if I go back to router one, run the same command.

126
06:05.760 --> 06:10.520
Notice we have four exceeded packets and the action is to drop.

127
06:10.520 --> 06:14.000
Well how many packets did we drop from router two's perspective?

128
06:14.000 --> 06:16.040
One, two, three and four.

129
06:16.040 --> 06:21.730
If we highlight the different decimal points in there that show that we dropped

130
06:21.730 --> 06:22.480
a packet,

131
06:22.480 --> 06:26.810
we dropped four from router two's perspective, router one says that we dropped

132
06:26.810 --> 06:27.600
four packets.

133
06:27.600 --> 06:29.440
It's exactly what we'd expect.

134
06:29.440 --> 06:32.360
So that is how we configure a policeor.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

134
06:29.440 --> 06:32.360
So that is how we configure a policeor.

135
06:32.360 --> 06:36.550
Make sure you take the time to do this configuration yourself again because

136
06:36.550 --> 06:37.760
there are so many different

137
06:37.760 --> 06:38.760
ways to do it.

138
06:38.760 --> 06:42.200
We could configure all of our parameters on one line.

139
06:42.200 --> 06:44.000
We can do it in multiple lines.

140
06:44.000 --> 06:45.920
We can use the shortcuts.

141
06:45.920 --> 06:47.560
We can leave some of the parameters in.

142
06:47.560 --> 06:49.880
We can take them out lots of ways of doing it.

143
06:49.880 --> 06:53.060
The best way to be comfortable with that is just to get in there and do it

144
06:53.060 --> 06:53.760
yourself.

145
06:53.760 --> 06:58.200
But again, take advantage of this lab environment and the show policy map

146
06:58.200 --> 06:59.440
interface command

147
06:59.440 --> 07:03.450
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

147
06:59.440 --> 07:03.450
to make sure that we actually do see that packets are getting dropped when they

148
07:03.450 --> 07:03.960
violate

149
07:03.960 --> 07:05.200
the policeor policy.
