1
00:00:00,150 --> 00:00:01,380
Domain Name System

2
00:00:01,380 --> 00:00:05,613
or commonly referred to as DNS is for human convenience.

3
00:00:06,630 --> 00:00:09,300
A computer doesn't care what the actual name

4
00:00:09,300 --> 00:00:10,680
of Google.com is.

5
00:00:10,680 --> 00:00:12,900
All it is looking for is IP addresses

6
00:00:12,900 --> 00:00:14,940
when it comes to networking.

7
00:00:14,940 --> 00:00:18,180
DNS makes it easier for us as human beings

8
00:00:18,180 --> 00:00:22,110
to look up locations of different website addresses

9
00:00:22,110 --> 00:00:24,810
or maybe even resource locations.

10
00:00:24,810 --> 00:00:27,150
But again, the system does not care.

11
00:00:27,150 --> 00:00:28,890
So in this walkthrough, we're going to go through

12
00:00:28,890 --> 00:00:32,580
how to configure a DNS client by making an entry

13
00:00:32,580 --> 00:00:36,240
to allow us to connect to one of our partner computers

14
00:00:36,240 --> 00:00:38,840
without having to reference the IP address directly.

15
00:00:39,690 --> 00:00:42,000
Okay. First, we're going to look at the host name,

16
00:00:42,000 --> 00:00:44,400
which we know is also at the end of the prop,

17
00:00:44,400 --> 00:00:45,750
server 01, that's who I am.

18
00:00:46,890 --> 00:00:50,520
Now I've set up another VM on this network

19
00:00:50,520 --> 00:00:52,083
and it's going to be server 02.

20
00:00:52,980 --> 00:00:55,533
So let's just look at my current IP address.

21
00:01:01,170 --> 00:01:04,533
Okay. I am currently 10.0.2.15.

22
00:01:05,790 --> 00:01:10,113
And my partner is going to be 10.0.2.16.

23
00:01:11,040 --> 00:01:12,750
Now important file that we're going to need

24
00:01:12,750 --> 00:01:17,013
to reference sometimes is the Etc/resolve.config file.

25
00:01:18,960 --> 00:01:23,040
This file just merely points the system to DNS servers

26
00:01:23,040 --> 00:01:25,080
so that we know where to resolve

27
00:01:25,080 --> 00:01:26,460
all the different DNS things

28
00:01:26,460 --> 00:01:29,400
that we're going to be using throughout our searches

29
00:01:29,400 --> 00:01:32,250
or when we're trying to access certain systems

30
00:01:32,250 --> 00:01:33,093
by their name.

31
00:01:34,470 --> 00:01:37,200
If you see the last one, very common reference

32
00:01:37,200 --> 00:01:39,780
is Google 8.8.8.8.

33
00:01:39,780 --> 00:01:42,060
So again, this file just letting system know,

34
00:01:42,060 --> 00:01:46,560
Hey, whenever you're looking for an IP address

35
00:01:46,560 --> 00:01:49,170
use these IP addresses and they will resolve

36
00:01:49,170 --> 00:01:51,390
the domain name for us.

37
00:01:51,390 --> 00:01:52,223
All right.

38
00:01:53,460 --> 00:01:54,390
Now, next we're going to look at

39
00:01:54,390 --> 00:01:56,820
the Etc host configuration file.

40
00:01:56,820 --> 00:02:00,780
That is our local maintenance of our own DNS server.

41
00:02:00,780 --> 00:02:02,670
So again, this file's going to reference

42
00:02:02,670 --> 00:02:05,730
IP addresses to names, and we're typically going to use this

43
00:02:05,730 --> 00:02:07,560
for our local server

44
00:02:07,560 --> 00:02:10,470
for names that haven't been registered globally

45
00:02:10,470 --> 00:02:14,490
for DNS servers to add them to their databases.

46
00:02:14,490 --> 00:02:16,890
So we're going to modify our local copy

47
00:02:16,890 --> 00:02:20,610
to include the IP address of our partner IP address.

48
00:02:20,610 --> 00:02:22,610
So let's see what this looks like first.

49
00:02:26,490 --> 00:02:30,450
Again, we see it reference our loop back IP address

50
00:02:30,450 --> 00:02:33,390
which is 127.0.0.1.

51
00:02:33,390 --> 00:02:38,280
So anytime the system sees any of those domain names

52
00:02:38,280 --> 00:02:40,230
it's going to reference that to that IP address.

53
00:02:40,230 --> 00:02:43,470
So it's going to know how to actually get to a location.

54
00:02:43,470 --> 00:02:45,810
'Cause remember, the system does not care about a name

55
00:02:45,810 --> 00:02:48,390
when it comes to the packet configuration

56
00:02:48,390 --> 00:02:51,540
when we're sitting out TCP IP packets.

57
00:02:51,540 --> 00:02:53,970
This source and destination IP addresses

58
00:02:53,970 --> 00:02:55,443
are mandatory requirements.

59
00:02:56,520 --> 00:03:00,060
So our partner server is going to be server 02,

60
00:03:00,060 --> 00:03:02,360
but let's try to ping it and see what happens.

61
00:03:04,980 --> 00:03:07,320
We see that it's letting us know that

62
00:03:07,320 --> 00:03:09,630
it can't resolve the domain name,

63
00:03:09,630 --> 00:03:10,983
but we can ping the IP address.

64
00:03:10,983 --> 00:03:14,283
It's going to be 10.0.2.16.

65
00:03:15,870 --> 00:03:18,120
Okay. So we're getting a solid response back.

66
00:03:20,280 --> 00:03:22,673
Now next we're going to ahead and modify this file.

67
00:03:23,880 --> 00:03:24,713
Use the Vim.

68
00:03:31,650 --> 00:03:33,540
So let's add the IP address.

69
00:03:33,540 --> 00:03:37,593
Go to insert mode 10.0.2.16.

70
00:03:38,880 --> 00:03:41,163
I'm going to call it the server 02.

71
00:03:44,910 --> 00:03:47,310
So again, anytime we type in server 02

72
00:03:47,310 --> 00:03:49,460
the system will know what to resolve there.

73
00:03:50,490 --> 00:03:52,413
Ping server 02.

74
00:03:55,830 --> 00:03:57,780
And now we have a server response back.

75
00:03:58,980 --> 00:04:01,410
Again, DNS is very simple.

76
00:04:01,410 --> 00:04:04,293
It's just a mapping of a name to an IP address.

77
00:04:05,370 --> 00:04:07,350
And we can see in the responses,

78
00:04:07,350 --> 00:04:11,700
if you look at the ping output, after server 02,

79
00:04:11,700 --> 00:04:16,680
it has 10.0.2.16, just for our reference as well.

80
00:04:16,680 --> 00:04:19,079
Okay. So now we're going to test the host function.

81
00:04:20,130 --> 00:04:22,440
And again, this is going to give some key information

82
00:04:22,440 --> 00:04:25,113
about a website and we'll use Google, favorite site.

83
00:04:26,760 --> 00:04:30,660
So this host command, it resolves the domain name

84
00:04:30,660 --> 00:04:33,090
and it gives us the IP address for it.

85
00:04:33,090 --> 00:04:35,280
It's going to give us the IPV4 version

86
00:04:35,280 --> 00:04:37,203
as well as the IPV6 version.

87
00:04:38,340 --> 00:04:39,390
That's simple enough.

88
00:04:40,230 --> 00:04:42,540
Now last I'm going to do is use the NS lookup command.

89
00:04:42,540 --> 00:04:44,040
And again, that's going to give us information

90
00:04:44,040 --> 00:04:47,283
specifically about domain name servers.

91
00:04:48,300 --> 00:04:50,283
So Google is a popular one.

92
00:04:54,270 --> 00:04:57,300
And again, Google has mini alias IP addresses.

93
00:04:57,300 --> 00:04:59,640
So there'll be multiple different IP addresses

94
00:04:59,640 --> 00:05:03,300
to reference Google 'cause Google has so many servers,

95
00:05:03,300 --> 00:05:05,670
they're distributed across the internet

96
00:05:05,670 --> 00:05:08,340
for load balance purposes.

97
00:05:08,340 --> 00:05:10,170
Okay. We went through how to configure

98
00:05:10,170 --> 00:05:12,390
and DNS configuration file,

99
00:05:12,390 --> 00:05:15,480
which for the host file under the Etc folder.

100
00:05:15,480 --> 00:05:18,390
We went through the process of understanding how

101
00:05:18,390 --> 00:05:20,550
when you have the configuration file set correctly

102
00:05:20,550 --> 00:05:23,940
we can use the DNS name and we don't,

103
00:05:23,940 --> 00:05:25,710
you have to use the IP address.

104
00:05:25,710 --> 00:05:27,000
When a DNS server goes down,

105
00:05:27,000 --> 00:05:30,450
a lot of times connectivity could be a huge issue

106
00:05:30,450 --> 00:05:32,310
because a lot of the systems that we set up

107
00:05:32,310 --> 00:05:37,170
we set them up to use domain names and not IP addresses.

108
00:05:37,170 --> 00:05:39,150
So if connectivity becomes the issue,

109
00:05:39,150 --> 00:05:40,770
one of the things you definitely need to look at

110
00:05:40,770 --> 00:05:42,510
is your DNS.

111
00:05:42,510 --> 00:05:44,110
I'll see you in the next lesson.

