1
00:00:00,090 --> 00:00:01,440
At this point, you should be familiar

2
00:00:01,440 --> 00:00:04,230
with the basics of computer networking.

3
00:00:04,230 --> 00:00:05,790
In this demonstration, we're going to walk through

4
00:00:05,790 --> 00:00:07,230
how to configure, monitor,

5
00:00:07,230 --> 00:00:09,660
and manage network connections in Linux.

6
00:00:09,660 --> 00:00:12,371
We'll go over the network manager, utility,

7
00:00:12,371 --> 00:00:15,600
and we want to use commands such as, nmtui,

8
00:00:15,600 --> 00:00:18,180
the text-based user interface.

9
00:00:18,180 --> 00:00:20,409
We're going to go over nmcli,

10
00:00:20,409 --> 00:00:22,290
and also we're just going to use a GUI

11
00:00:22,290 --> 00:00:24,480
to configure some of the network configurations.

12
00:00:24,480 --> 00:00:26,943
So let's start with the nmcli command.

13
00:00:27,900 --> 00:00:30,453
So this command, we can use this general fixture.

14
00:00:31,380 --> 00:00:32,883
We got a host name here.

15
00:00:34,380 --> 00:00:37,113
It's going to tell us what the current host is.

16
00:00:38,730 --> 00:00:40,473
All right, we're going to also use

17
00:00:40,473 --> 00:00:43,560
the infamous hostname command.

18
00:00:43,560 --> 00:00:45,900
So gives the exact same information.

19
00:00:45,900 --> 00:00:47,500
There's a few ways to view that.

20
00:00:48,690 --> 00:00:50,040
Now, if we want to change this host name,

21
00:00:50,040 --> 00:00:54,873
we want to use the sudo hostname control.

22
00:00:56,130 --> 00:00:57,753
We want to set the host name.

23
00:01:01,890 --> 00:01:03,490
And we'll change it to server02.

24
00:01:04,958 --> 00:01:06,033
It was 01 earlier.

25
00:01:07,170 --> 00:01:08,310
Put a password in.

26
00:01:08,310 --> 00:01:10,680
All right, let's make sure that went through.

27
00:01:10,680 --> 00:01:12,633
Okay, see that quickly changed for us.

28
00:01:13,500 --> 00:01:15,300
One thing to know with any of these services,

29
00:01:15,300 --> 00:01:16,680
these changes aren't persistent.

30
00:01:16,680 --> 00:01:18,750
So in order for it to stay, we're going to have

31
00:01:18,750 --> 00:01:19,740
to restart the system.

32
00:01:19,740 --> 00:01:23,433
So let's do a system control.

33
00:01:27,510 --> 00:01:28,710
And we're going to restart.

34
00:01:32,550 --> 00:01:33,483
Systemd.

35
00:01:36,360 --> 00:01:38,163
Remember that from last time?

36
00:01:39,060 --> 00:01:40,953
hostnamed, service.

37
00:01:42,735 --> 00:01:45,720
So now all this means is the system will persist

38
00:01:45,720 --> 00:01:47,580
through any restarts.

39
00:01:47,580 --> 00:01:48,840
So now, instead of reverting back

40
00:01:48,840 --> 00:01:51,693
to server01, it'll stay at server02.

41
00:01:53,700 --> 00:01:54,543
Simple enough.

42
00:01:55,620 --> 00:01:59,670
Now, we're just going to go over really quick ifconfig.

43
00:01:59,670 --> 00:02:01,560
This has been a tried and true command

44
00:02:01,560 --> 00:02:03,060
throughout the Linux history,

45
00:02:03,060 --> 00:02:04,950
but it has been recently replaced.

46
00:02:04,950 --> 00:02:06,750
Now it can still be used, it's deprecated,

47
00:02:06,750 --> 00:02:08,130
so it's still usable,

48
00:02:08,130 --> 00:02:10,830
but it's been replaced with the ipcommand.

49
00:02:10,830 --> 00:02:13,020
So again, it just shows us basic information

50
00:02:13,020 --> 00:02:16,530
about our network, the name of our netdevice.

51
00:02:16,530 --> 00:02:21,123
We have our IP address, sub netmask, broadcast ID,

52
00:02:22,050 --> 00:02:26,250
IPv6 information, MAC address,

53
00:02:26,250 --> 00:02:28,500
pretty much everything you would need.

54
00:02:28,500 --> 00:02:33,090
But again, as times change, we change with them.

55
00:02:33,090 --> 00:02:35,790
And if you look at the manual, you will see,

56
00:02:35,790 --> 00:02:38,430
and this is before anything in the future,

57
00:02:38,430 --> 00:02:40,130
that this program is now obsolete.

58
00:02:41,550 --> 00:02:42,450
So we're going to quit out of there

59
00:02:42,450 --> 00:02:43,290
and we want to take his advice,

60
00:02:43,290 --> 00:02:46,833
we want to check out the IP address command.

61
00:02:50,640 --> 00:02:53,130
And you can see pretty much gives us similar information,

62
00:02:53,130 --> 00:02:54,900
slightly different format,

63
00:02:54,900 --> 00:02:57,420
but this is the new way of doing things.

64
00:02:57,420 --> 00:03:00,210
So for this distribution on Linux, the normal format

65
00:03:00,210 --> 00:03:04,597
for the naming convention of our netdevice is going to be enp.

66
00:03:06,060 --> 00:03:10,080
And then it's going to be whatever we determine zero or one,

67
00:03:10,080 --> 00:03:14,310
and then S, and then another number that we determine.

68
00:03:14,310 --> 00:03:16,410
So that's going to be the typical format.

69
00:03:16,410 --> 00:03:21,410
If you see about halfway down enp0s3,

70
00:03:21,510 --> 00:03:23,223
that's going to be our ethernet NIC.

71
00:03:24,060 --> 00:03:24,960
Next thing we want to do is go get

72
00:03:24,960 --> 00:03:27,390
some more detailed information specifically

73
00:03:27,390 --> 00:03:28,740
about that device.

74
00:03:28,740 --> 00:03:31,443
So enp0s3.

75
00:03:32,340 --> 00:03:34,410
Now, again, all it does is allow us

76
00:03:34,410 --> 00:03:37,920
to hone in directly on that NIC,

77
00:03:37,920 --> 00:03:41,274
so we can see all the information about it that we need

78
00:03:41,274 --> 00:03:43,620
without being cluttered with all the other information such

79
00:03:43,620 --> 00:03:47,290
as the bridges, wireless networks, loopbacks.

80
00:03:47,290 --> 00:03:49,320
Okay, again, we see we have the same type

81
00:03:49,320 --> 00:03:52,740
of basic information, the ethernet address

82
00:03:52,740 --> 00:03:57,723
which is the MAC address, IP address, IPv6 address,

83
00:03:59,040 --> 00:04:03,330
broadcast information gateways, et cetera.

84
00:04:03,330 --> 00:04:04,163
Next can go back

85
00:04:04,163 --> 00:04:07,560
to the network manager command line tool again

86
00:04:07,560 --> 00:04:08,490
and that's how I'm going to get

87
00:04:08,490 --> 00:04:10,803
some general status about it.

88
00:04:15,510 --> 00:04:18,000
It gives us the monitoring feature capability just

89
00:04:18,000 --> 00:04:22,140
to see how our networks are up or down, up or down.

90
00:04:22,140 --> 00:04:24,090
Cuz once you have a big complex network

91
00:04:24,090 --> 00:04:25,530
you're not going to always be

92
00:04:25,530 --> 00:04:28,980
in close proximity to these systems.

93
00:04:28,980 --> 00:04:30,660
So you can't look at the back of a router

94
00:04:30,660 --> 00:04:33,420
or not, to see if a link is down or up.

95
00:04:33,420 --> 00:04:35,250
This is going to be good to see

96
00:04:35,250 --> 00:04:37,263
the general statuses of our servers.

97
00:04:38,130 --> 00:04:39,540
Okay, another command we want to use is

98
00:04:39,540 --> 00:04:42,333
the nmcli connection command.

99
00:04:43,680 --> 00:04:45,000
Now that's going to give us more

100
00:04:45,000 --> 00:04:47,760
specific device type of information.

101
00:04:47,760 --> 00:04:52,760
So names, the UUID, the type, and the device name again.

102
00:04:54,150 --> 00:04:56,100
Now we can also disable

103
00:04:56,100 --> 00:05:00,300
and enable the devices by using the same tool.

104
00:05:00,300 --> 00:05:02,310
So we're going to try it out, really quick connection.

105
00:05:02,310 --> 00:05:04,080
We're going to bring it down.

106
00:05:04,080 --> 00:05:07,563
We're going to do the enp0s3.

107
00:05:09,450 --> 00:05:10,283
All right.

108
00:05:10,283 --> 00:05:11,430
We see we have that system message.

109
00:05:11,430 --> 00:05:13,830
Let's us know that was successfully deactivated.

110
00:05:15,600 --> 00:05:17,040
So let's check out this device status just

111
00:05:17,040 --> 00:05:19,733
to make sure it went through just for more information.

112
00:05:22,200 --> 00:05:23,033
All right.

113
00:05:23,970 --> 00:05:25,170
I like how it's highlighted.

114
00:05:25,170 --> 00:05:28,110
So it draws to our attention very quickly

115
00:05:28,110 --> 00:05:29,370
with the red, and let's us know

116
00:05:29,370 --> 00:05:33,390
that that device is now disconnected or in a down state.

117
00:05:33,390 --> 00:05:34,540
Let's bring it back up.

118
00:05:37,290 --> 00:05:38,700
Remember, I always make use of the up arrow

119
00:05:38,700 --> 00:05:39,663
whenever you can.

120
00:05:41,070 --> 00:05:41,903
All right.

121
00:05:41,903 --> 00:05:44,553
See, it's back activated, check the status back to green.

122
00:05:46,380 --> 00:05:47,366
Now, next thing we're going to do,

123
00:05:47,366 --> 00:05:48,390
we're going to configure the system

124
00:05:48,390 --> 00:05:50,010
with that static IP address, meaning

125
00:05:50,010 --> 00:05:52,890
that this is when we select manual version

126
00:05:52,890 --> 00:05:54,150
and we're not going to actually use

127
00:05:54,150 --> 00:05:56,253
the DHCP servers assigned to us.

128
00:05:57,720 --> 00:05:58,590
Okay, so we just want to look

129
00:05:58,590 --> 00:06:01,560
at this IP address right now and see what it is.

130
00:06:01,560 --> 00:06:03,330
Under inet.

131
00:06:03,330 --> 00:06:06,930
So we see it's 10.0.2.15.

132
00:06:06,930 --> 00:06:09,933
We want to change that to 10.0.2.101,

133
00:06:11,700 --> 00:06:13,300
just for demonstration purposes.

134
00:06:16,470 --> 00:06:19,773
So you going to do network manager command line,

135
00:06:21,390 --> 00:06:22,683
connection edit.

136
00:06:24,870 --> 00:06:26,223
We're going to using enp0.

137
00:06:29,036 --> 00:06:30,210
So we'll just type to help really quick just

138
00:06:30,210 --> 00:06:32,610
to see what commands are available.

139
00:06:32,610 --> 00:06:34,980
And we're going to focus on the set command.

140
00:06:34,980 --> 00:06:38,253
Again, just allows us to change the property value of that.

141
00:06:39,356 --> 00:06:41,967
We're going to set the IPv4 addresses.

142
00:06:47,880 --> 00:06:51,563
10.50.1.101.

143
00:06:58,060 --> 00:07:01,533
Okay, going to do a 24 slash slider.

144
00:07:02,370 --> 00:07:04,233
And we're going to click this to yes.

145
00:07:05,220 --> 00:07:06,320
Change this to manual.

146
00:07:07,320 --> 00:07:08,870
Okay, we're going to do save here.

147
00:07:10,240 --> 00:07:13,240
So we have that updated, and we're going to quit out of here

148
00:07:14,160 --> 00:07:17,730
Now again, after we change any configuration,

149
00:07:17,730 --> 00:07:19,650
we have to bring the device up and down.

150
00:07:19,650 --> 00:07:21,633
So I'm just going to do command line.

151
00:07:23,239 --> 00:07:24,489
Going to do connection down.

152
00:07:25,530 --> 00:07:26,363
Enp0s3.

153
00:07:28,950 --> 00:07:30,700
Now let's bring this thing back up.

154
00:07:35,333 --> 00:07:38,670
Okay, now this resets the device.

155
00:07:38,670 --> 00:07:40,403
I'll just make sure that went through.

156
00:07:43,050 --> 00:07:47,580
Now, if you look at the enp0s3, number two,

157
00:07:47,580 --> 00:07:49,860
you'll see that the inet address has

158
00:07:49,860 --> 00:07:53,853
changed to 10.50.1.101/24.

159
00:07:55,680 --> 00:07:57,830
Exactly as we typed it in the last command.

160
00:07:58,710 --> 00:07:59,847
Next thing we want to do, we want to configure

161
00:07:59,847 --> 00:08:04,230
the system to now use a DHCP.

162
00:08:04,230 --> 00:08:07,593
So dynamic host configuration protocol.

163
00:08:08,490 --> 00:08:09,330
And again, it's nothing more

164
00:08:09,330 --> 00:08:11,940
than a network management protocol using IP networks

165
00:08:11,940 --> 00:08:14,550
for automatically assigning IP addresses.

166
00:08:14,550 --> 00:08:15,690
Let's configure that really quick.

167
00:08:15,690 --> 00:08:18,900
And this time we're going to use the text base interface.

168
00:08:18,900 --> 00:08:21,000
So we're going to use network manager,

169
00:08:21,000 --> 00:08:25,083
text space, user interface.

170
00:08:27,900 --> 00:08:30,060
And so we're going to edit the connection really quick.

171
00:08:30,060 --> 00:08:35,059
We're going to go here, edit, and we're just going to tap here.

172
00:08:35,130 --> 00:08:37,679
You see how we change the configuration

173
00:08:37,679 --> 00:08:40,169
to manual when it accessed early on the screen

174
00:08:40,169 --> 00:08:41,003
we're just going to change it back

175
00:08:41,003 --> 00:08:44,433
to automatic again, that enables DHCP.

176
00:08:45,690 --> 00:08:46,990
So that was simple enough.

177
00:08:52,890 --> 00:08:54,273
I'm going to scroll down here.

178
00:08:56,970 --> 00:08:57,803
Click okay.

179
00:08:59,580 --> 00:09:03,633
And go back and quit.

180
00:09:05,100 --> 00:09:05,940
All right, now we should be able

181
00:09:05,940 --> 00:09:07,830
to check this information again,

182
00:09:07,830 --> 00:09:09,690
and you should be able to see

183
00:09:09,690 --> 00:09:12,540
that it's not changed to a new IP address.

184
00:09:12,540 --> 00:09:14,670
So when we go back to the IP address.

185
00:09:14,670 --> 00:09:19,470
We want to show the device, enp0s3.

186
00:09:19,470 --> 00:09:24,060
Now we see the device still has the manual IP address.

187
00:09:24,060 --> 00:09:25,710
Again, everything has to be reset

188
00:09:25,710 --> 00:09:27,660
for it to issue a new IP address.

189
00:09:27,660 --> 00:09:28,617
So we're going to bring the device down

190
00:09:28,617 --> 00:09:30,690
and we're going to bring it back up.

191
00:09:30,690 --> 00:09:33,140
But this time we're going to use the system control.

192
00:09:34,980 --> 00:09:36,580
We're going to restart the network.

193
00:09:39,810 --> 00:09:43,353
Tell the DHCP to reissue out some addresses.

194
00:09:45,780 --> 00:09:46,680
All right.

195
00:09:46,680 --> 00:09:48,300
So now let's go back to this again.

196
00:09:48,300 --> 00:09:50,193
See if this IP address has changed.

197
00:09:52,590 --> 00:09:57,480
And if you see below, it has added a new IP address,

198
00:09:57,480 --> 00:10:01,440
letting us know that it is the 10.0.2.15.

199
00:10:01,440 --> 00:10:03,030
That's what it was earlier.

200
00:10:03,030 --> 00:10:04,290
And if you see towards the end,

201
00:10:04,290 --> 00:10:05,940
you see dynamic, letting us know

202
00:10:05,940 --> 00:10:08,733
that that was generated by our DHCP server.

203
00:10:10,200 --> 00:10:12,480
Now another tool we can use to get more information

204
00:10:12,480 --> 00:10:15,270
about the NIC is going to be the ethtool command.

205
00:10:15,270 --> 00:10:17,310
And so what this is going to do is give us

206
00:10:17,310 --> 00:10:20,193
detailed information about the NIC itself.

207
00:10:21,480 --> 00:10:22,563
So let's see here.

208
00:10:23,700 --> 00:10:27,180
It's going to give us the information about the link modes.

209
00:10:27,180 --> 00:10:29,460
10baseT/Half 10baseT/Full,

210
00:10:29,460 --> 00:10:32,160
meaning that's the ethernet standard, right?

211
00:10:32,160 --> 00:10:34,890
And so that means for the 10baseT/Half,

212
00:10:34,890 --> 00:10:37,620
that means 10 megabits per second, at half duplex,

213
00:10:37,620 --> 00:10:41,070
meaning you going to send information one at a time.

214
00:10:41,070 --> 00:10:45,060
It also supports 10base, meaning 10 megabits per second

215
00:10:45,060 --> 00:10:48,330
at full duplex and a hundred and a thousand.

216
00:10:48,330 --> 00:10:49,710
So we get the picture there.

217
00:10:49,710 --> 00:10:51,240
So it supports multiple modes

218
00:10:51,240 --> 00:10:54,030
and not just stuck at one speed.

219
00:10:54,030 --> 00:10:56,760
Now we also look at, see the duplex,

220
00:10:56,760 --> 00:10:58,710
the current mode is in full.

221
00:10:58,710 --> 00:11:01,140
Right, and the speed is capped out at one gigabyte.

222
00:11:01,140 --> 00:11:05,580
So it gives us more specs about the NIC itself.

223
00:11:05,580 --> 00:11:08,096
So when we're trying to do performance analysis

224
00:11:08,096 --> 00:11:12,270
and increase speeds, we can see what we're working with.

225
00:11:12,270 --> 00:11:14,130
And the next folder that's going to be useful to look at.

226
00:11:14,130 --> 00:11:16,560
It's going to be the networking folder,

227
00:11:16,560 --> 00:11:18,810
and that's going to be under the etc/sys/config.

228
00:11:19,950 --> 00:11:21,483
We'll go to network scripts.

229
00:11:25,410 --> 00:11:29,010
Now this folder is useful because it shows a list

230
00:11:29,010 --> 00:11:32,430
of all of these scripts that will be ran at boot.

231
00:11:32,430 --> 00:11:34,770
These scripts will be ran to do a lot

232
00:11:34,770 --> 00:11:36,630
of the initial configuration settings.

233
00:11:36,630 --> 00:11:37,470
It'll set up things such

234
00:11:37,470 --> 00:11:42,300
as IP address, host names, gateways, et cetera.

235
00:11:42,300 --> 00:11:46,350
Now, to get specific to our particular NIC,

236
00:11:46,350 --> 00:11:47,650
we're going to look at the...

237
00:11:49,739 --> 00:11:53,460
The /etc/ and use this config.

238
00:11:53,460 --> 00:11:56,763
Course, I'm going to do the network scripts.

239
00:12:06,065 --> 00:12:09,510
Enp0s3.

240
00:12:09,510 --> 00:12:12,330
And again, more key device information as well

241
00:12:12,330 --> 00:12:14,700
as IP configuration information.

242
00:12:14,700 --> 00:12:18,330
So we can see that on boot, flag set to yes.

243
00:12:18,330 --> 00:12:22,110
We see the IP address, gateway prefix meaning

244
00:12:22,110 --> 00:12:24,840
whether that's going to be our mask or CIDR,

245
00:12:24,840 --> 00:12:27,900
and a lot of good information on this particular screen.

246
00:12:27,900 --> 00:12:30,480
All right, next we're just go ahead, do it another way.

247
00:12:30,480 --> 00:12:33,450
Just going to use the GUI to actually make

248
00:12:33,450 --> 00:12:35,490
the next configuration change so we can go

249
00:12:35,490 --> 00:12:38,043
to system tools here, we go to settings.

250
00:12:45,000 --> 00:12:45,833
Okay.

251
00:12:48,210 --> 00:12:50,253
Scroll down, go to network.

252
00:12:51,120 --> 00:12:51,953
All right.

253
00:12:51,953 --> 00:12:54,000
So we're going to hit the settings button right here.

254
00:12:54,000 --> 00:12:55,380
Now you see it still shows

255
00:12:55,380 --> 00:13:00,030
that we have the static IP address going on right here.

256
00:13:00,030 --> 00:13:02,220
So what we're going to do is we're going to turn

257
00:13:02,220 --> 00:13:03,970
this thing off and turn it back on.

258
00:13:06,405 --> 00:13:07,238
All right.

259
00:13:08,096 --> 00:13:13,096
Now we see we now have the DHCP selected

260
00:13:13,230 --> 00:13:15,183
IP address for us right here.

261
00:13:16,560 --> 00:13:19,980
Okay, we can also see that the method

262
00:13:19,980 --> 00:13:23,970
for IPv4 is automatically set here.

263
00:13:23,970 --> 00:13:26,250
Again, this configuration changes that went through

264
00:13:26,250 --> 00:13:28,263
from our text base interface.

265
00:13:29,310 --> 00:13:32,460
So we reset the network, so we can have the DHCP issue us

266
00:13:32,460 --> 00:13:35,130
new IP addresses, but we also still had to bring

267
00:13:35,130 --> 00:13:39,360
the link down and back up, so it could use it.

268
00:13:39,360 --> 00:13:42,150
Okay, so here we're going to do a little bit more practice.

269
00:13:42,150 --> 00:13:44,790
We're going to make this a manual IP address.

270
00:13:44,790 --> 00:13:47,910
And now I'm going to stay within the same subnet

271
00:13:47,910 --> 00:13:50,070
of the DNS server.

272
00:13:50,070 --> 00:13:51,630
I'm going to change the IP address.

273
00:13:51,630 --> 00:13:53,640
Just one up to what it was before.

274
00:13:53,640 --> 00:13:54,840
Keep the same gateway.

275
00:13:54,840 --> 00:13:56,880
We know that one works for us.

276
00:13:56,880 --> 00:13:58,683
And keep the same net mask.

277
00:13:59,580 --> 00:14:03,873
Have the DNS server as Google server 8.8.8.8.

278
00:14:05,880 --> 00:14:08,700
Going to just see how this works with the manual.

279
00:14:08,700 --> 00:14:09,700
Going to turn this off.

280
00:14:12,660 --> 00:14:13,950
So now we're going to go check and see

281
00:14:13,950 --> 00:14:17,733
if we can hit CompTIA's website from Firefox.

282
00:14:19,430 --> 00:14:23,914
Okay, let's do https.

283
00:14:23,914 --> 00:14:28,914
I'm going to go to comptia.org.

284
00:14:30,780 --> 00:14:31,613
All right.

285
00:14:31,613 --> 00:14:34,713
Looks like our connection is still working for us.

286
00:14:36,570 --> 00:14:38,310
Okay, we went through multiple ways

287
00:14:38,310 --> 00:14:43,310
of how to monitor, manage, and configure IP configurations.

288
00:14:43,650 --> 00:14:45,540
And again, how to view just general statuses

289
00:14:45,540 --> 00:14:49,680
of the system and how to view a few configuration statuses.

290
00:14:49,680 --> 00:14:50,940
Thank you for sticking with this lesson,

291
00:14:50,940 --> 00:14:52,590
and I'll see you in the next one.

