WEBVTT

1
00:00.000 --> 00:05.360
So now let's briefly change gears and talk about something known as EEM.

2
00:05.360 --> 00:09.680
Now what this stands for is Cisco's Embedded Events Manager.

3
00:09.680 --> 00:13.120
Now in essence EEM can be implemented in two different ways.

4
00:13.120 --> 00:18.480
We can have something known as an applet and we can also have EEM scripts.

5
00:18.480 --> 00:22.000
Now for our purposes the one we have to focus in on is the applets.

6
00:22.000 --> 00:25.920
Now the good news is is that this is the simpler implementation.

7
00:25.920 --> 00:30.240
Now basically what we're talking about here is when some type of event happens
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

7
00:25.920 --> 00:30.240
Now basically what we're talking about here is when some type of event happens

8
00:30.240 --> 00:31.280
on your system.

9
00:31.280 --> 00:35.120
You have this type of F style logic, this programmatic logic.

10
00:35.120 --> 00:39.590
If something happens, if an event happens then we want to perform a particular

11
00:39.590 --> 00:40.720
action in response.

12
00:40.720 --> 00:46.240
Now when we happen to create an EEM applet the actual response we specify is

13
00:46.240 --> 00:47.040
just well

14
00:47.040 --> 00:52.890
specified directly via the CLI whereas if we want to create an EEM script then

15
00:52.890 --> 00:53.280
we create

16
00:53.280 --> 00:57.360
something known as a TCL script. Again we don't have to focus on this so let's

17
00:57.360 --> 00:58.320
just stick with

18
00:58.320 --> 01:02.240
the applet via the CLI. So what type of thing could this be? Well let's maybe
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

18
00:58.320 --> 01:02.240
the applet via the CLI. So what type of thing could this be? Well let's maybe

19
01:02.240 --> 01:03.120
say we have,

20
01:03.120 --> 01:07.760
let's go with a router here and a router here, this can be R1, this can be R2.

21
01:07.760 --> 01:11.840
Let's suppose we happen to have some type of BGP peering across to this device

22
01:11.840 --> 01:12.160
here.

23
01:12.160 --> 01:17.200
So it's going to be BGP neighbour 2.2.2.2 and 1.1.1.1.

24
01:17.200 --> 01:21.760
Now say for example the connection here happens to flap and we get a syslog

25
01:21.760 --> 01:23.120
message on our device

26
01:23.120 --> 01:29.600
denoting and telling us that well our adjacency with 2.2.2.2 has ultimately

27
01:29.600 --> 01:30.320
went down with
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

27
01:29.600 --> 01:30.320
went down with

28
01:30.320 --> 01:34.060
loss that connection then in response perhaps we would like to issue the

29
01:34.060 --> 01:36.960
commands clear IP BGP

30
01:36.960 --> 01:41.410
soft which is simply a command we can use to reconfigure and activate BGP

31
01:41.410 --> 01:42.640
information within

32
01:42.640 --> 01:47.610
our devices. So again think about R1, R2. If we happen to have a problem with

33
01:47.610 --> 01:48.320
this neighbour

34
01:48.320 --> 01:52.490
relationship that happens to go down and respond to this happening before we

35
01:52.490 --> 01:53.680
even have to look at it

36
01:53.680 --> 01:59.360
or notice it or type anything in response to this particular action our EEA app

37
01:59.360 --> 02:00.400
let can be programmed
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

37
01:59.360 --> 02:00.400
let can be programmed

38
02:00.400 --> 02:05.450
to look for it and then respond accordingly by issuing this clear IP BGP soft

39
02:05.450 --> 02:06.160
commands.

40
02:06.160 --> 02:10.320
So we get that in sync kick in similarly let's maybe say someone happens to

41
02:10.320 --> 02:11.600
administratively shut

42
02:11.600 --> 02:15.910
down this link well what we could do is if we notice that link going down we

43
02:15.910 --> 02:17.120
can have an EEA

44
02:17.120 --> 02:21.680
applet to respond accordingly to that particular action and then bounce that

45
02:21.680 --> 02:22.800
interface back into

46
02:22.800 --> 02:26.400
the upstate. This is really all we're talking about here we're noticing events

47
02:26.400 --> 02:27.280
and in response

48
02:27.280 --> 02:31.280
to particular events we're going to be performing particular actions in this
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

48
02:27.280 --> 02:31.280
to particular events we're going to be performing particular actions in this

49
02:31.280 --> 02:32.880
nice automatic form.

50
02:32.880 --> 02:36.320
So let's go and see how this actually does operate there okay so what we'll do

51
02:36.320 --> 02:37.120
is go to the

52
02:37.120 --> 02:42.040
definite sandbox. So what I've done is log into a switch and what I'm going to

53
02:42.040 --> 02:43.200
do is I'm going

54
02:43.200 --> 02:47.680
to make configuration changes which will ultimately generate logs I will then

55
02:47.680 --> 02:48.960
use those logs as a

56
02:48.960 --> 02:54.350
pattern to match in order to invoke my EEA applets let me show you what I mean.

57
02:54.350 --> 02:55.200
Say for example I

58
02:55.200 --> 02:59.880
created a look back interface of look back let's go with 132 okay does it

59
02:59.880 --> 03:01.680
actually matter the name
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

59
02:59.880 --> 03:01.680
actually matter the name

60
03:01.680 --> 03:04.960
what we can actually see here straight away is the creation of that look back

61
03:04.960 --> 03:06.000
generated this

62
03:06.000 --> 03:10.410
message now if I happen to shut this down look at what we actually see here see

63
03:10.410 --> 03:11.680
this interface look

64
03:11.680 --> 03:16.070
back 132 is down say for example I just copy this right here okay now here's

65
03:16.070 --> 03:17.520
what I'm going to do

66
03:17.520 --> 03:21.260
for the moment let me just say no shut so it's back up in the upstate what I

67
03:21.260 --> 03:22.480
will do in fact what I

68
03:22.480 --> 03:26.610
will do is I will say interface look back 132 and let me just put an IP address

69
03:26.610 --> 03:28.160
of 192.168

70
03:28.160 --> 03:39.610
132.132 and give it a slash 32 mask okay and just say look back for IBGP pe
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

70
03:28.160 --> 03:39.610
132.132 and give it a slash 32 mask okay and just say look back for IBGP pe

71
03:39.610 --> 03:40.320
ering okay let's say

72
03:40.320 --> 03:44.170
this is the purpose of this particular look back okay so here's what I'm going

73
03:44.170 --> 03:45.840
to do as we can see

74
03:45.840 --> 03:51.060
if I go to show IP interface brief right now the protocol is in the upstate and

75
03:51.060 --> 03:52.000
as such what that

76
03:52.000 --> 03:57.930
means is that it can ultimately ping this address I can say do ping 192.168 132

77
03:57.930 --> 03:59.440
.132 as we can see

78
03:59.440 --> 04:04.700
right here now I will configure my EEM applets I'll say event manager applets
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

78
03:59.440 --> 04:04.700
right here now I will configure my EEM applets I'll say event manager applets

79
04:04.700 --> 04:05.760
that is the type

80
04:05.760 --> 04:10.100
we're going to be using and now I just give this applet a name let's just call

81
04:10.100 --> 04:11.920
this look back up okay

82
04:11.920 --> 04:16.760
now I'm inside the configuration what I will do is I will say event syslog

83
04:16.760 --> 04:18.320
pattern and then

84
04:18.320 --> 04:22.440
with think rotation marks I'm going to tell the system which pattern to look

85
04:22.440 --> 04:23.120
for so what I will

86
04:23.120 --> 04:26.560
do is I'll tell the system if you happen to see this particular pattern that

87
04:26.560 --> 04:28.240
look back 132 is down

88
04:28.240 --> 04:31.620
what I want to do is to perform a particular action so I'll say action and I'll
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

88
04:28.240 --> 04:31.620
what I want to do is to perform a particular action so I'll say action and I'll

89
04:31.620 --> 04:32.080
give this

90
04:32.080 --> 04:36.280
in the medical value this can be action 1.0 and I'll say it's a CLI command I

91
04:36.280 --> 04:37.360
want to be doing

92
04:37.360 --> 04:40.990
so now specify the command will be enable I'll then say the next command this

93
04:40.990 --> 04:41.600
will be

94
04:41.600 --> 04:45.810
command 1.2 this will be configure terminal it will be to go into that

95
04:45.810 --> 04:47.920
interface so I'll say interface

96
04:47.920 --> 04:53.680
look back 132 and then the next command will be action at 1.3 and that command

97
04:53.680 --> 04:54.640
will simply be

98
04:54.640 --> 04:59.840
to type no shutdown so if I just do end that is now configured that applet so

99
04:59.840 --> 05:00.160
here's what's going
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

99
04:59.840 --> 05:00.160
here's what's going

100
05:00.160 --> 05:04.440
to happen like I say right now if I do show IP interface brief we can see we

101
05:04.440 --> 05:05.600
are in the upstate

102
05:05.600 --> 05:10.240
for interface look back 132 now if I go into that look back right here and I

103
05:10.240 --> 05:11.200
happen to shut it down

104
05:11.200 --> 05:15.200
we're going to generate that logging message which is ultimately going to kick

105
05:15.200 --> 05:16.240
off these particular

106
05:16.240 --> 05:20.290
commands see how the interface is suddenly straight back up that is because

107
05:20.290 --> 05:22.000
this particular pattern

108
05:22.000 --> 05:26.030
set off the applet to go and kick off all of those commands I specified see the

109
05:26.030 --> 05:27.120
ones above enable

110
05:27.120 --> 05:31.440
configure terminal interface look back 1.3 and then the no shutdown command so
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

110
05:27.120 --> 05:31.440
configure terminal interface look back 1.3 and then the no shutdown command so

111
05:31.440 --> 05:32.240
if something happens to

112
05:32.240 --> 05:37.490
go in and you know erroneously pull down or look back that we're using for bgp

113
05:37.490 --> 05:38.720
then automatically

114
05:38.720 --> 05:44.560
pre-configured we're going to have EEM in order to save us
