- [Instructor] Servers Part 3: DHCP and DNS Servers.
The DHCP server is in charge
of handing out IP addresses to clients.
It also gives out additional TCP/IP information.
So here in our illustration
we have a DHCP server
here on the LAN,
and normally this would hand out the IP address
to all the clients automatically.
It would also hand out the subnet mask,
gateway address and the IP address of the DNS server.
So this is very common
and this could be a SOHO router that runs as a DHCP server
or it could be a Windows server that hands out IP addresses.
You could also have DHCP servers on the internet.
And, for example, let's say had a small office
or a home office,
and you had your SOHO router/firewall device.
Well, in order for computers that are connected to this
to get out to the internet and access websites,
this device that SOHO router needs to get an IP address
from the DHCP server at the ISP,
a public IP address that'll allow it
to communicate on the internet.
So two different types there.
Now, let's focus on the DHCP server on the LAN
and we'll show some IP config information on a client,
and then we'll show two examples
of DHCP servers on the local area network.
We'll start here, this is a Windows 7 Virtual Machine.
So we'll run an IP config command
to see the TCP/IP information.
And we need to do that with the /all option
so that we can see all the information here.
We'll press enter.
and here's our local area connection, our ethernet adapter.
And it says here DHCP is enabled, yes.
So we know we're getting this information
from a DHCP server.
In this case, it's a virtual DHCP server.
It actually comes from within VMware.
Here's the IP address that I've been given at this computer.
Here's the subnet mask, triple 255.
Here's the gateway address,
and that is the virtual switch,
the virtual router, actually in VMware,
that's .2
And the DHCP server is actually known as .254,
but that's kind of all built into the virtual system.
And DNS servers .2 over here.
So that's a bunch of information that you get
from the DHCP server.
You get your IP address, the subnet masks,
the default gateway, and the DNS server information.
So let's show two examples of DHCP servers.
First here, we have a basic router
and I've gone to advanced, and I've gone to network,
and DHCP server.
And you can see that the DHCP server is on right now,
it is enabled.
And we have an IP address Pool,
otherwise known as a scope.
And this server will hand out IP addresses
to clients automatically between 10.252.0.2
and 10.252.255.254.
And so this device is considered to be the gateway .101.
We don't have DNS servers placed in here, so by default
this would forward DNS requests out to the internet.
So it would be 101 automatically at the client side.
Now let's take a look at another type of server.
This is server 2012 that I have running.
And I've set this up as a DHCP server
which you have to add as a role to Windows Server.
So I've added that and I'm in the DHCP console.
And then within IPv4 and IPv6 you would create a new scope,
which is a Pool of IP addresses.
And so I've created that here,
and we have 10.1.1.1. through 10.1.200.254
using a 255.255 subnet mask.
This is where you'd go to create this scope of information
and we'd add additional info, like the gateway address
and who the DNS server is.
We do all that here, create that scope, activate the scope
and then authorize the server.
And you wanna see a green arrow pointing up on the server
and on the scope to make sure then verify that you know
that your server is running properly.
So two examples of servers there for DHCP.
Now DHCP uses a four step process
that we discussed in other videos,
and that's called Dora, D-O-R-A, which stands for
Discover, Offer, Request, and Acknowledgement.
And that's generally what happens
between clients and the server.
The client will not have an IP address and you might plug it
into the network or enable the wireless adapter
and it'll look out to the network
if it's set to obtain IP addresses automatically.
It'll look out to the network to find a DHCP server.
And that's part of the discovery phase, that D within Dora.
Once it finds one, the server will have an offering.
It'll do an offering to the client of IP addresses.
The client will request one, quote/unquote,
it'll request an IP address,
which is really one that the DHCP server decides for it.
And if that's available and the client meets the criteria
the DHCP server will acknowledge that
and the client can start using that IP address.
So that's the four step process known as Dora.
And that's a little bit about DHCP servers.
Remember they could be on the LAN
handing out IPS to all the clients,
or they could be out on the internet,
handing out an IP address that's publicly used to say
your router or whatever device that publicly
faces the internet and allows access out to the internet.
Now, the domain name system, or DNS server,
resolves domain names to IP addresses.
DNS is a system that could be run on your LAN
as part of your Windows domain, but it is also
a worldwide system that translates all website
domain names into their corresponding IP addresses.
So DNS servers could be on the LAN.
They could be on the DMZ and they're all over the internet.
There's a whole hierarchy of DNS servers around the world.
Where your organization places a DNS server
will depend on several factors,
namely what kind of other servers you have
and who needs to access them and from where.
So for example, here, we have a DNS server
in our local area network, and that's possible.
You might have this,
especially if you have an authentication server,
if you're running say a Windows domain
which we'll talk about in a following video.
And that would take care of the name resolution
for all the domain information on your LAN.
So that runs in conjunction, in concert,
with the domain server, with that authentication server.
But they can also exist, as say part of the DMZ,
or on the internet.
And they do the same thing.
They're gonna resolve domain names to IP addresses.
So if a client wants to say, a client that's on the internet
wants to go to this web server here,
that client might know the domain name,
but they're probably not gonna know the IP address,
and that's how computers communicate with each other.
So the DNS server is gonna be needed to resolve
that domain name to IP, to allow that connectivity
between the web server and the client,
wherever that client is on the internet.
So you might have these DNS servers just about anywhere.
And again, there's a whole hierarchy of these
around the world.
When you go to the internet and try to connect to a domain
it's gonna go to the initial DNS server.
Let's show another example here.
Okay, this is my Windows 10 system here.
And so here we'll do another ipconfig/all.
We get lots of information here
and let's take a look at this,
the main network ethernet adapter.
This one's not using DHCP.
I've statically configured the IP address.
And when that's the case,
we have to statically configure everything else,
the subnet mask, the gateway we're using
and the DNS server.
Now the DNS server is the gateway,
it's the SOHO router that I'm using.
But that gateway is gonna have to look out to the internet
to another DNS server when I try to connect to domain names.
So for example, if we were to do a ping
to something like example.com, my SOHO router
is not gonna know the IP address of example.com.
It's gonna have to look out to the DNS server.
And the first place it'll go to look for that
is at my ISP, at my internet service provider,
their in-house DNS server or DNS servers.
Hopefully they'll come back with the IP address for that.
And I just did a quick ping to show this.
So example.com is using this IP address right now.
But it could be that they don't know that server
or maybe they know this server
but the DNS servers at my ISP don't know other servers.
So for example, I could do ping davidlprouse.com,
maybe they don't know that domain right now.
They should by now, but let's say they don't.
Then that DNS server at my IP would have to go out
to another higher level DNS server
somewhere else in the country.
And if you want to connect to other countries,
your local DNS server would forward the DNS requests
to those other countries' DNS servers,
and ultimately get the IP address that you need.
And whenever you're connecting with your web browser
that's actually what's happening.
The IP address of your local computer
or your SOHO router will connect out to that IP address
and they communicate directly via IP.
Let's go back to our Server 2012 here
and I'm going to go to the DNS manager.
Now, well, first we'll go to the Server Manager Dashboard.
Now this particular server started
as a basic file and storage services server,
but then I wanted to promote it to a domain controller
to become an authentication server.
So we installed active directory domain services.
And to do that, we have to point to some DNS server
either a separate box, or you could install it
at this same server, which is what I did.
I installed DNS here and it's up and running.
We got the green arrow pointing up.
So that is running and to work with that,
you can work within the DNS manager console.
And you can see here, we have DNS and we have this computer.
This is the fully qualified domain name for this server.
It's dc1, that's the name of the computer.
The domain is dpro 42.com,
which I selected when I installed DNS.
And if we look here, we'll see the forward lookup zones,
and we have dpro42.com, and you can see the resolutions
that can be made from this computer,
dc1 is also known as 10.252.0.103 and .105
'cause it's a multi-homed server.
And then other computers that connect,
like say the Windows 10 laptop 1
that we've connected to before
that name will also resolve to its IP address
and that'll be added to the DNS manager.
So anything that deals with this domain
and all the post names within the domain
will get added to this forward lookup zone.
And DNS can work in reverse as well.
It can resolve from IP address to domain name, right.
So you have both of those functions within DNS.
And this is running within Server 2012.
And this is one example of a DNS server
that does this name resolution.
Okay, so we have the DNS servers here on the LAN
and that's common if you have a domain
and we'll talk more about that with authentication servers.
But more often what you're looking at is the DNS server
out on the internet, or on your DMZ,
which takes care of the resolutions between domain names
and IP addresses, especially for web servers
but just about any other servers out there.
So you wanna know your DHCP and your DNS functionality
and the servers and where they might be
and what they can do, DHCP and DNS servers do things
that happen behind the scenes,
even more so than your typical server.
Nevertheless, they are vital to a network's smooth
and automated operation.