next we have D N S D. N s is what allows us to resolve fully qualified domain names toe I P addresses or I p addresses to fully qualified domain names. So what does that mean? Well,
humans work with words better than they do with memorizing numbers. And computers
work with electrical impulses, which are extremely hard for humans to memorize. So computers do us the favor of taking those electrical impulses and translating them into binary, which is still hard for humans to memorize. So computers
translate that binary into numbers, which is still hard for humans to memorize. So our computers sigh and electronics I and they translate that by translate those i p addresses those numbers into words and humans rejoice because words are so much easier for us to remember,
google dot com is a lot easier for us to remember than having to type in
the I p address string for one of Google's servers every time we wantto navigate through the Internet.
D. N s allows us to perform those look ups because our computers
they used to keep all our computers have a file on them called the hosts file
and ah, hosts file in back in the early days of the Internet used to contain all of the D. N s entries of every single, fully qualified domain name to its I p address. So if
today we still did that, that would mean that every single website in the world would have its hope would have its entry in your hosts file on your computer.
That would be very difficult to maintain. You would constantly beginning updates every second that you were connected to the Internet changing and modifying your host file. That's also a bit insecure because if we relied simply on that hosts file, then
all it would take is someone going in and wiping out that hosts file are changing all the entries in our host that host file in order to redirect this other places.
Now, our computers still have this hosts file, and our computer still refers to this host file before anything else.
it's still a place where our computer uses to resolve names. But now, instead of having every single website in the world in our hosts file, we used the N S
D. N s allows us to transmit a query out to a particular server and essentially asked,
I don't know where this I don't know what the I p address of this name is. I don't know the i p address of google dot com. Can you help me with that?
And that server will either say, Yeah, I got you or it'll say Mmm. I don't know. Wait one sec. Let me ask somebody else.
And then it'll go to somebody else and say, Hey, do you know where google dot com is? And that will either say,
I don't know, Let me ask somebody else, and it'll either Let us know orto go on. These are different types of queries, depending on how we're initiating the queries between our different D. N s servers. But we'll talk more about D. N s in a different module. But all we need to know for this particular section is that D N s is
where we go to what type of protocol we use when we're asking. Okay.
Www dot google dot com Where is that
BMS query over Port 53.
I'm gonna look up this fully qualified domain name www dot google dot com.
The d n A server gets that request.
And because people go to Google
quite often that Dean s server is going to say, Oh, yeah, I have a cash. I have a cache location for www dot google dot com. This is its I. P address. Here you go. Here's the I P address. Our computer can now use that I p address in order to send a packet to the router and say, Hey,
to send this packet to this I p address When our computer is sending a packet to a router, our computer isn't sending a packet to www dot google dot com. Our computer is sending a packet to an I. P address that corresponds with www dot google dot com.
it. We need to keep our Dina server's secure, and there's a lot more involved with the N S than where I'm making it out to be right now. But this is all we really need to know. To understand what this protocol does and how it does it by essentially transmitting data from databases and letting us know
What the i p addresses.
But D n s also provides what called reverse lookups, which will let us know the other way around if we wanted to know what one particular I p addresses. Name is if we get a packet from a certain i p address and we say, Hey, what's the fully qualified domain name over this I p Address D. N s also provides reverse lookups, which let us know.
over Port 53 TCP or UDP
The next we have D h c P
B A C p stands for dynamic host Configuration Protocol D A C P is what our computers are going to use in order to automatically get I p address information. If we don't want to statically go to every single computer in our environment and set an I P address, we're gonna have to have a device which performs D H C P. We have to have a device which
leases out I p addresses for state for a period of time
and says, Okay, here's your I P address. Here's your sub net mask and here's all your other I p address information You need to know to survival in this network. And you need to know, in order to transmit packets on this network,
the A C P runs a report 67 on the server
and port 68 for the client and D A C P runs over UDP
So we sent on a D h cp request and we got it back 1 92.1 68.1 dot 13 D h cp gives us a sub net mask to 55 to 55 to 55.0 D. H. Cp gives us our d. N s server,
which in this case is gonna be 8.8 dot 8.8
venous gives us our default gateway, which in this case will be 1 92.1 68.1 dot one.
And if we statically set our I P address, our computer will not attempt to use D h c P.
When we statically said our i p address information when we connect her computer to a network, it won't request any D. H cp information it will attempt to use ecstatically assigned the HCP information.
So d A C p. Allows our computer to automatically configure I p address information.
It does this by when it's initially connected to a network. It sends out a it sends out a d h cp Discover request. It says, Hey, anybody. Is there anybody out there that can give me I p address information? Because I have Mike's computer settings to automatically obtain this information,
so I need to obtain it through D A. C P.
Then our D H C P device will say, Yeah, I have this address available. Are you good with that?
And then our computer will say, Yeah, I'm good with this address. Is it still available? I'm just checking one last time. And then finally, if the address is still available, the device will say Okay. Yep. You're good to go. That address is still available. You can keep it. I'm gonna jot down in my notes that you are leasing this address for this period of time
and after this period of time is up,
then you're either gonna have to renew that address where I can give it to somebody else. So another quality that we don't have written up here, that the HCP also lets us know is it lets us know the length of the lease. We if we are running d h c p
as long as we're running d A c p. We're renting our I P address when we statically assign it. We were buying it, but as long as we're running d A c p d h c P
if we don't have an I P reservation if we're automatically obtaining an I P address that isn't reserved for us, our d. A. C P device is leasing us that I p address. It only gives it to us for a period of time. That's why. Why, if you connect your laptop to your home network and you have automatic de HCP set up,
but you don't have reservations set up, you connect your laptop to that network.
Then you turn it off for a couple days, and the next time you plug it back in, you may have completely different I p address because your lease expired. The your router or your device, which runs T H C P gave that address to somebody else. And the next time you came back online, your DCP device gave you a different address.
So that's our D A. C P.
Port 67 for the server, and the client will be pulling information over Port 68. The server is the device that gives out the D H CP information, and the client is the device which receives the HCP information.