WEBVTT

1
00:00.000 --> 00:04.560
Okay friends, big topic coming up. What we're going to talk about now is data

2
00:04.560 --> 00:05.520
modeling.

3
00:05.520 --> 00:09.840
Now this might sound like a peculiar term. How on earth is data going to be

4
00:09.840 --> 00:10.720
walking in the runway

5
00:10.720 --> 00:15.170
on a catwalk? Obviously this is not what we're going to be talking about. Data

6
00:15.170 --> 00:16.560
modeling is actually

7
00:16.560 --> 00:21.450
all over the place. The issue we have though is that we want to introduce it

8
00:21.450 --> 00:22.320
into the network

9
00:22.320 --> 00:26.750
basically for network automation. So I just kind of hinted at the fact that

10
00:26.750 --> 00:27.920
data modeling is all

11
00:27.920 --> 00:32.270
over the place. Let me give you my favorite example to highlight this.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

11
00:27.920 --> 00:32.270
over the place. Let me give you my favorite example to highlight this.

12
00:32.270 --> 00:33.120
Something that really

13
00:33.120 --> 00:37.680
does stick to a very strict model. Now suppose you want to go traveling abroad.

14
00:37.680 --> 00:38.240
What is the one

15
00:38.240 --> 00:42.880
thing you are told never to forget? It's very, very important. You in order to

16
00:42.880 --> 00:44.080
get abroad need to

17
00:44.080 --> 00:48.850
provide a passport. Now this passport is going to be chock full of some very

18
00:48.850 --> 00:50.480
important information.

19
00:50.480 --> 00:55.000
Now this information is not just going to be random. It's going to strictly

20
00:55.000 --> 00:56.080
follow a particular

21
00:56.080 --> 01:00.910
data model. Basically what I'm talking about, that's in order for a passport to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

21
00:56.080 --> 01:00.910
data model. Basically what I'm talking about, that's in order for a passport to

22
01:00.910 --> 01:02.480
be valid to be accepted

23
01:02.480 --> 01:06.610
by customs. Well it's got to have certain characteristics. So the first

24
01:06.610 --> 01:07.920
characteristic would be you're

25
01:07.920 --> 01:12.280
going to have to have some type of photograph on this. After all if you try to

26
01:12.280 --> 01:13.440
get into a country with

27
01:13.440 --> 01:17.130
a passport that has no picture, good luck doing that. You'll be sent on your

28
01:17.130 --> 01:18.400
way and told to turn

29
01:18.400 --> 01:22.530
right by it. Now say for example me, I have a passport in the United Kingdom,

30
01:22.530 --> 01:23.440
the UK. So let me just

31
01:23.440 --> 01:27.810
show you my Bob Ross skills and I'll do a little drawing right here. Okay. Now

32
01:27.810 --> 01:29.200
the passport here

33
01:29.200 --> 01:33.780
is going to have a picture roundabout here. Okay so this is me right here. Now
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

33
01:29.200 --> 01:33.780
is going to have a picture roundabout here. Okay so this is me right here. Now

34
01:33.780 --> 01:34.640
the fact of the matter

35
01:34.640 --> 01:37.650
is that everyone with the UK passport is going to have a similar looking thing.

36
01:37.650 --> 01:38.560
We're going to have a

37
01:38.560 --> 01:42.430
picture on the left hand side and it's going to be the same size. For example

38
01:42.430 --> 01:43.600
if someone in the UK

39
01:43.600 --> 01:46.920
happened to have a passport whereby their picture would just randomly appear.

40
01:46.920 --> 01:47.760
Well that's not going

41
01:47.760 --> 01:52.240
to be a valid passport and you're not going to get where you want to go. Now it

42
01:52.240 --> 01:53.440
's not just that.

43
01:53.440 --> 01:57.040
What I'm also going to see on the passport are things such as my date of birth.

44
01:57.040 --> 01:57.680
This is obviously

45
01:57.680 --> 02:02.100
very very important. Now it's not just important that we have the date of birth
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

45
01:57.680 --> 02:02.100
very very important. Now it's not just important that we have the date of birth

46
02:02.100 --> 02:03.680
in the actual passport.

47
02:03.680 --> 02:07.880
The way the actual data is presented must comply with a particular format. Say

48
02:07.880 --> 02:08.720
for example you were

49
02:08.720 --> 02:14.240
maybe born on the 15th of September 1987. Well that information could be

50
02:14.240 --> 02:16.640
presented like so. 15,

51
02:16.640 --> 02:20.870
7, 87. And the point I'm making here is that this is going to be a consistent

52
02:20.870 --> 02:21.920
format. You're not going

53
02:21.920 --> 02:26.920
to have some passport utilizing this format whereas other passports are doing

54
02:26.920 --> 02:28.320
you know the first of

55
02:28.320 --> 02:35.610
January 1985. Okay completely different. This one here has four digits as well
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

55
02:28.320 --> 02:35.610
January 1985. Okay completely different. This one here has four digits as well

56
02:35.610 --> 02:36.640
as we're utilizing

57
02:36.640 --> 02:41.330
numerical values to denote the month as opposed to saying a shorthand of the

58
02:41.330 --> 02:42.320
month like

59
02:42.320 --> 02:46.600
Jan or Feb that type of thing. So once again if we are not following this very

60
02:46.600 --> 02:47.920
consistent and precise

61
02:47.920 --> 02:51.930
format the passport is going to be deemed invalid. Similarly you're not just

62
02:51.930 --> 02:53.040
going to get random

63
02:53.040 --> 02:57.310
data that is unexpected like a random email address just slapped on someone's

64
02:57.310 --> 02:58.480
passport randomly.

65
02:58.480 --> 03:02.600
We know that this is not part of the specifications within the passport. There
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

65
02:58.480 --> 03:02.600
We know that this is not part of the specifications within the passport. There

66
03:02.600 --> 03:02.800
are for

67
03:02.800 --> 03:06.860
there's no reason to see this particular piece of data on it at all. Now

68
03:06.860 --> 03:08.080
ultimately what this does

69
03:08.080 --> 03:12.660
it brings about consistency and reliability. Okay there is no ambiguity we know

70
03:12.660 --> 03:13.280
exactly the

71
03:13.280 --> 03:17.350
information we're looking for and when we see it we can easily assess it. These

72
03:17.350 --> 03:18.240
are good things

73
03:18.240 --> 03:22.210
and this is the type of thing we want in the network hence why we are now

74
03:22.210 --> 03:23.680
moving towards data

75
03:23.680 --> 03:28.390
modeling. Now in the world of network automation there actually is a particular

76
03:28.390 --> 03:29.840
data modeling language

77
03:29.840 --> 03:34.540
that seems to be the primary way to do this and this is something known as Yang
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

77
03:29.840 --> 03:34.540
that seems to be the primary way to do this and this is something known as Yang

78
03:34.540 --> 03:35.120
. So you know the way

79
03:35.120 --> 03:38.880
we've talked about previously the challenges automating things like the CLI

80
03:38.880 --> 03:39.920
that do not have

81
03:39.920 --> 03:43.660
modern interfaces. Pretty much because our old devices were not designed with

82
03:43.660 --> 03:44.400
automation in

83
03:44.400 --> 03:48.380
mind while the newer iteration of devices the new generation of devices coming

84
03:48.380 --> 03:49.120
out from all of

85
03:49.120 --> 03:54.090
these vendors such as Cisco but they now have more modern interfaces that are

86
03:54.090 --> 03:54.960
used to manage them

87
03:54.960 --> 03:58.830
things like netcon and things like restconned both of which we'll get to look

88
03:58.830 --> 03:59.920
at a little bit later

89
03:59.920 --> 04:03.180
on within this course. But ultimately these two protocols which are used to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

89
03:59.920 --> 04:03.180
on within this course. But ultimately these two protocols which are used to

90
04:03.180 --> 04:04.160
manage your devices

91
04:04.160 --> 04:08.350
in a programmatic manner they both are heavily relied on the Yang data modeling

92
04:08.350 --> 04:09.120
language so

93
04:09.120 --> 04:13.710
pretty much all of our configurations and all of our state data within our

94
04:13.710 --> 04:15.120
devices are modeled

95
04:15.120 --> 04:19.310
utilizing Yang. Now let me just highlight the benefits first by highlighting

96
04:19.310 --> 04:20.560
the shortcomings of

97
04:20.560 --> 04:26.070
the CLI. Well think about the CLI as it stands right now the CLI has a lot of

98
04:26.070 --> 04:27.200
variation between

99
04:27.200 --> 04:31.920
different vendors. Say for example Cisco syntax is completely different to Jun
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

99
04:27.200 --> 04:31.920
different vendors. Say for example Cisco syntax is completely different to Jun

100
04:31.920 --> 04:33.200
iper syntax and even

101
04:33.200 --> 04:38.020
within vendors themselves. Cisco's iOS XR configurations are very very

102
04:38.020 --> 04:40.000
different from the regular old

103
04:40.000 --> 04:44.910
Cisco iOS legacy CLI configurations. The Y is actually a problem while when it

104
04:44.910 --> 04:46.480
comes to automation

105
04:46.480 --> 04:50.900
we want things to be as repeatable as possible as well as predictable as

106
04:50.900 --> 04:52.400
possible otherwise

107
04:52.400 --> 04:56.200
we're going to have a hard time maintaining consistency and we're going to also

108
04:56.200 --> 04:56.720
have to build

109
04:56.720 --> 05:01.190
out more complex logic to handle all of these subtle variations between vendors
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

109
04:56.720 --> 05:01.190
out more complex logic to handle all of these subtle variations between vendors

110
05:01.190 --> 05:02.240
and between models

111
05:02.240 --> 05:06.400
that type of thing whereas if we can have a nice repeatable and predictable way

112
05:06.400 --> 05:07.760
to model our data

113
05:07.760 --> 05:11.680
then what we can do is we can easily build programmability into your

114
05:11.680 --> 05:13.120
configurations. Well what do I

115
05:13.120 --> 05:16.850
mean when I say this well let's just say we wanted to model the data for our

116
05:16.850 --> 05:18.080
general configurations

117
05:18.080 --> 05:21.740
let's maybe say we're going to well I don't know let's maybe imagine a VLAN

118
05:21.740 --> 05:22.560
okay but what we could

119
05:22.560 --> 05:27.870
specify is that when someone goes through a sign a VLAN number such as you know

120
05:27.870 --> 05:29.680
VLAN 15 within our

121
05:29.680 --> 05:34.420
data model what we can do is have particular constraints to say hey this number
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

121
05:29.680 --> 05:34.420
data model what we can do is have particular constraints to say hey this number

122
05:34.420 --> 05:35.440
it must actually be

123
05:35.440 --> 05:40.020
between a particular value such as one and you know 4,095 I believe it is so

124
05:40.020 --> 05:41.760
this is the valid range

125
05:41.760 --> 05:45.740
similarly let's say imagine we go and create a switched virtual interface for

126
05:45.740 --> 05:46.320
that VLAN

127
05:46.320 --> 05:51.130
while the actual IP address if it's going to be say for example IPv4 it's got

128
05:51.130 --> 05:52.000
to follow a very

129
05:52.000 --> 05:58.660
particular format it's going to have a number between 0 and 255 then a dot then

130
05:58.660 --> 06:00.800
again 0 to 255 then
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

130
05:58.660 --> 06:00.800
again 0 to 255 then

131
06:00.800 --> 06:05.220
a dot then again all the way until we have 4 octets with each value between

132
06:05.220 --> 06:06.720
this particular range

133
06:06.720 --> 06:10.230
so if someone tries to go and configure an IP address on the switch virtual

134
06:10.230 --> 06:12.480
interface for 111

135
06:12.480 --> 06:19.190
432 10.1 then clearly we know as per the constraints specified in our data

136
06:19.190 --> 06:19.680
model

137
06:19.680 --> 06:23.840
that this is not going to be allowed now in a similar way we do have these kind

138
06:23.840 --> 06:24.800
of constraints

139
06:24.800 --> 06:29.040
on the actual CLI itself but here is a little bit of a problem if we go let me

140
06:29.040 --> 06:30.080
just do this here
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

140
06:29.040 --> 06:30.080
just do this here

141
06:30.080 --> 06:34.000
if I log into a Cisco device and I say configure terminal okay and that's maybe

142
06:34.000 --> 06:34.800
say I try to create

143
06:34.800 --> 06:40.160
a look back interface also interface look back let's just go with 1234 if I say

144
06:40.160 --> 06:41.280
IP address

145
06:41.280 --> 06:48.230
111 432 10.1 or whatever it was and give it a subnet mask over slash 32 if I

146
06:48.230 --> 06:49.280
hit enter here

147
06:49.280 --> 06:53.410
but we do actually see we have some type of validation going on we're seeing

148
06:53.410 --> 06:54.480
here that the box is

149
06:54.480 --> 06:58.640
spitting out some type of error this is an invalid input now the problem here

150
06:58.640 --> 06:59.600
though is that we are

151
06:59.600 --> 07:04.050
relying on the software on the box to detect that particular problem once we
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

151
06:59.600 --> 07:04.050
relying on the software on the box to detect that particular problem once we

152
07:04.050 --> 07:05.360
actually attempt to

153
07:05.360 --> 07:09.140
push the configurations to the device whereas if we actually have just some

154
07:09.140 --> 07:10.320
type of general data

155
07:10.320 --> 07:13.520
model that we can reference as opposed to attempted to validate our

156
07:13.520 --> 07:15.120
configurations directly on the

157
07:15.120 --> 07:18.830
machine that we're trying to configure what we can do is something called

158
07:18.830 --> 07:20.160
client side validation

159
07:20.160 --> 07:25.290
meaning that here on my machine before I even attempt to push the changes to a

160
07:25.290 --> 07:26.480
remote device

161
07:26.480 --> 07:30.020
on my local machine I can look at the configurations that I have generated and
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

161
07:26.480 --> 07:30.020
on my local machine I can look at the configurations that I have generated and

162
07:30.020 --> 07:31.280
just use some specialized

163
07:31.280 --> 07:36.470
tools to compare them versus what is expected within the acceptable data model

164
07:36.470 --> 07:37.040
and if there happens

165
07:37.040 --> 07:41.170
to be any type of errors say for example my VLAN number is like negative 5

166
07:41.170 --> 07:42.160
which is not in the

167
07:42.160 --> 07:46.980
valid range before I even attempt to push the configurations right here on my

168
07:46.980 --> 07:47.760
box I can just

169
07:47.760 --> 07:52.480
compare my automated configs against what is actually acceptable and I can

170
07:52.480 --> 07:53.920
already be told before

171
07:53.920 --> 07:57.580
I attempt to disturb the network that my configurations are indeed invalid

172
07:57.580 --> 07:58.720
because what I don't want

173
07:58.720 --> 08:02.030
to do as I don't want to have the power of automation generate all these
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

173
07:58.720 --> 08:02.030
to do as I don't want to have the power of automation generate all these

174
08:02.030 --> 08:03.280
configurations for let's

175
08:03.280 --> 08:07.700
maybe say 500 devices push those configurations to the network and maybe say

176
08:07.700 --> 08:09.040
you know 50 of them

177
08:09.040 --> 08:15.160
have some bad invalid configs and now 50 get rejected okay that's fine but the

178
08:15.160 --> 08:16.800
remaining 450

179
08:16.800 --> 08:21.210
have now been updated which means we might have a network and in consistent

180
08:21.210 --> 08:22.560
state maybe we don't

181
08:22.560 --> 08:26.540
actually want to change the configurations of the entire network unless all of

182
08:26.540 --> 08:27.600
the devices are

183
08:27.600 --> 08:31.400
in sync with the latest configurations and updates so like you say once again
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

183
08:27.600 --> 08:31.400
in sync with the latest configurations and updates so like you say once again

184
08:31.400 --> 08:32.480
when we have a data

185
08:32.480 --> 08:36.960
model we have a very strict way in which we can specify what our data is

186
08:36.960 --> 08:38.560
allowed to be this is done

187
08:38.560 --> 08:42.900
by specifying particular constraints and ultimately just makes for a much more

188
08:42.900 --> 08:44.720
robust way to automate

189
08:44.720 --> 08:49.460
networks so now we know some of the motives and driving forces behind the

190
08:49.460 --> 08:50.800
adoption of data models

191
08:50.800 --> 08:54.610
with the network automation let's talk a little bit about how they actually are

192
08:54.610 --> 08:55.680
implemented and the

193
08:55.680 --> 08:57.520
different variations that we have
