Domain Name System
or commonly referred to as DNS is for human convenience.
A computer doesn't care what the actual name
of Google.com is.
All it is looking for is IP addresses
when it comes to networking.
DNS makes it easier for us as human beings
to look up locations of different website addresses
or maybe even resource locations.
But again, the system does not care.
So in this walkthrough, we're going to go through
how to configure a DNS client by making an entry
to allow us to connect to one of our partner computers
without having to reference the IP address directly.
Okay. First, we're going to look at the host name,
which we know is also at the end of the prop,
server 01, that's who I am.
Now I've set up another VM on this network
and it's going to be server 02.
So let's just look at my current IP address.
Okay. I am currently 10.0.2.15.
And my partner is going to be 10.0.2.16.
Now important file that we're going to need
to reference sometimes is the Etc/resolve.config file.
This file just merely points the system to DNS servers
so that we know where to resolve
all the different DNS things
that we're going to be using throughout our searches
or when we're trying to access certain systems
by their name.
If you see the last one, very common reference
is Google 8.8.8.8.
So again, this file just letting system know,
Hey, whenever you're looking for an IP address
use these IP addresses and they will resolve
the domain name for us.
All right.
Now, next we're going to look at
the Etc host configuration file.
That is our local maintenance of our own DNS server.
So again, this file's going to reference
IP addresses to names, and we're typically going to use this
for our local server
for names that haven't been registered globally
for DNS servers to add them to their databases.
So we're going to modify our local copy
to include the IP address of our partner IP address.
So let's see what this looks like first.
Again, we see it reference our loop back IP address
which is 127.0.0.1.
So anytime the system sees any of those domain names
it's going to reference that to that IP address.
So it's going to know how to actually get to a location.
'Cause remember, the system does not care about a name
when it comes to the packet configuration
when we're sitting out TCP IP packets.
This source and destination IP addresses
are mandatory requirements.
So our partner server is going to be server 02,
but let's try to ping it and see what happens.
We see that it's letting us know that
it can't resolve the domain name,
but we can ping the IP address.
It's going to be 10.0.2.16.
Okay. So we're getting a solid response back.
Now next we're going to ahead and modify this file.
Use the Vim.
So let's add the IP address.
Go to insert mode 10.0.2.16.
I'm going to call it the server 02.
So again, anytime we type in server 02
the system will know what to resolve there.
Ping server 02.
And now we have a server response back.
Again, DNS is very simple.
It's just a mapping of a name to an IP address.
And we can see in the responses,
if you look at the ping output, after server 02,
it has 10.0.2.16, just for our reference as well.
Okay. So now we're going to test the host function.
And again, this is going to give some key information
about a website and we'll use Google, favorite site.
So this host command, it resolves the domain name
and it gives us the IP address for it.
It's going to give us the IPV4 version
as well as the IPV6 version.
That's simple enough.
Now last I'm going to do is use the NS lookup command.
And again, that's going to give us information
specifically about domain name servers.
So Google is a popular one.
And again, Google has mini alias IP addresses.
So there'll be multiple different IP addresses
to reference Google 'cause Google has so many servers,
they're distributed across the internet
for load balance purposes.
Okay. We went through how to configure
and DNS configuration file,
which for the host file under the Etc folder.
We went through the process of understanding how
when you have the configuration file set correctly
we can use the DNS name and we don't,
you have to use the IP address.
When a DNS server goes down,
a lot of times connectivity could be a huge issue
because a lot of the systems that we set up
we set them up to use domain names and not IP addresses.
So if connectivity becomes the issue,
one of the things you definitely need to look at
is your DNS.
I'll see you in the next lesson.