DHCP Explanation | Step by step

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the goal of this lecture is to help you understand what DHCP is and how it works before you can understand DHCP you need to understand static IP addresses a static IP address is manually assigned by an administrator and as the name suggests it does not change unless it's manually changed in order to configure a static IP address you must know the basic tcp/ip settings for your network things like available IP addresses what subnet mask to use what gateway to use and optionally what DNS server to point your computer to if you enter an invalid setting your computer will not have network connectivity until you fix the configuration issue dynamic host configuration protocol or DHCP is a networking protocol that allows a particular server to assign tcp/ip configurations automatically to client computers on the same network in the windows world you need to install the DHCP server role on a Windows server in order for that to have this functionality on your network a DHCP server will automatically configure the IP address subnet mask DNS server address and Gateway of a client computer which is any computer on the network that is attempting to use DHCP as its network configuration the configuration that DHCP assigns is not permanently given to the client computer but instead it's leased to the client for a certain amount of time once a DHCP lease has expired the client computer must reach back to the DHCP server and renew its existing lease or it must obtain an entire new configuration and lease before DHCP was used system administrators need to go to each computer and manually configure the tcp/ip settings before was on the network this was bad for several reasons the first was that it takes a long time what if you have thousands of new computers secondly there's large room for user error what if an administrator assigned the same IP address to two different computers it would be the equivalent of someone in your neighborhood having the same home address which is obviously a terrible problem we're going to look at how a hotel operates to help you understand how DHCP works Johnnie is taking a trip and has arrived at his hotel he walks inside the hotel and asked the clerk for a room the desk clerk then looks in his registry to see which rooms are available and fine that all the rooms on the top floor are closed because they're being repainted it's an example of a DHCP exclusion its rooms or IP addresses that cannot be handed out to clients the clerk finds that the first three bottom rooms have been reserved so he can't give those rooms to Johnny either this would be an example of a DHCP reservation the people aren't in the rooms yet that the IP addresses are not taken necessarily but they cannot be handed out because they're reserved for other people or other computers now just because an IP address or room is reserved it does not mean that it's not in use or it is in use all it means is that no one can go into this room or use this IP address because it's reserved for another client now the clerk also notices that room 104 105 and 201 are occupied so he can't give him any of those rooms either and this would be an example of computers just taking IP addresses from DHCP as they're available finally he sees that he can give Johnny room 202 for one week now the one week would be equivalent to the DHCP lease you can specify when you configure DHCP how long client computers can stay in a room or they can keep an IP address okay by default I believe it's eight days that doesn't apply to those who reserved IP addresses reservations and DHCP are indefinite and our DHCP lease does not apply to the reservation now finally our clerk sees that he can give Johnny room 202 for one week or the lease duration whatever we configure in DHCP Johnny accepts the room and goes inside the clerk now updates his registry to note that there is now a person in room 202 so the next person that shows up at the desk is not going to get room 202 okay DCP does the same thing when it hands out a client IP address to a client it remembers that it gave this IP address to this computer and will not hand it out again to another computer at the end of the week if Johnny decides he wants to stay in the hotel he's gonna have to go back to the clerk and ask for another week now the clerk can either give him another week in his existing room or he can assign him a new room for another week DHCP works very similar to this when a client computers DHCP lease expires it comes back to the server and he either gets an extension with his this thing IP address or dhcp hints at a whole new IP address in a whole new lease DHCP works very similar to how our hotel works administrators may specify the range or scope of IP addresses that are to be supplied by DHCP as well as excluding or prohibiting certain IP addresses from being assigned to clients just like our hotel clerk did for repainting the rooms on the top floor you may also set reservations for specific computers you could reserve the IP address 192.168.1.1 only this server would be able to get that IP address from DHCP this is different from manually configuring the IP address because we are going to configure the IP address from the DHCP server and not the client computer if you have a computer that is configured to use DHCP but it has an IP address starting with 169 to 54 this is referred to as a private IP address it means that the computer was unable to find a DHCP server on the network so it assigned itself that IP address now let's take a look at the technical explanation of how DHCP works in this example we are only showing two computers in a switch right now the Windows workstation is not plugged into the switch since it could not find a DHCP server it has assigned itself a private IP address once we plug the network cable into the switch the client computer begins broadcasting a DHCP discovery quest the request is sent to the entire network in hopes that the message will reach a DHCP server a dhcp server will be listening for this request once it receives a DHCP discovery request it will send back a DHCP offer this includes all the tcp/ip settings like IP address subnet mask DNS server and gateway once the client receives the DHCP offer it will send back a DHCP request to the server this message lets the DHCP server know that the client wants to keep the settings that were offered by the DHCP server finally the DHCP server will send back an acknowledgement message stating they understands the client computer is going to keep the settings that it offered the computer will now accept the TCP IP configuration and its work with DHCP is done now let's recap exactly what happened we can memorize this process for Discover offer request and acknowledgement with the acronym Dora the client sends out a DHCP Discover message and the DHCP server responds with a DHCP offer the client requests the offered settings and the server acknowledges the request so you might be asking why we'd ever want to use a static IP address well remember that one of the settings that DHCP can automatically configure is the DNS server this configuration would specify an IP address basically a static IP like 192.168.1 10 what if the DNS server used a DHCP and its IP address changed from week to week or every time its lease expired we would need to update our DHCP settings with the new IP address every time it changed I can't think of a single circumstance where you would want to do this it's much less complicated to simply assign a static IP address to our DNS server so it never changes another example would be printers or scanners you want these devices to use a static IP address so people would be able to consistently print to them and not need to re-enter the IP address every time it's lease expired now earlier we talked about making reservations where DHCP would assign an IP address to a specific MAC address you might be wondering why we would take the time to log on to each client computer and manually configure a static IP address when we can simply create a DHCP reservation from a single server there is one major difference and that is if your DHCP server crashes and you manually log down the computer and set a static IP that computer will not lose network connectivity on the other hand if you create a DHCP reservation that client computer is dependent on the DHCP server if the DHCP server goes offline for any reason whether it's a crash a network connectivity issue maybe a switch goes down or our cable gets cut then that computer will lose its DHCP configured IP address as soon as it's lease expires so basically the server is only up for as long as the DHCP server is up obviously the point of DHCP is to make life easier when connecting new devices to a network and getting them online quickly so generally what happens is that servers printers and other things that offer services to a network use a static IP address a manually configured IP address that it's not reliant on DHCP and workstations are end-users people who are connecting their laptops their desktop computers to utilize these servers are using DHCP as their network configuration so they're the ones getting the IP addresses configured automatically in not servers now we've covered a lot of information so let's recap what we covered so far in this lecture first DHCP is a network protocol and in the windows world it's installed as a server role system administrators can specify a single scope or range of IP addresses for DHCP to assign to clients and this is on per subnet so only one scope per subnet the configurations handed out by DHCP are leased and must be renewed regularly you can exclude a range of IP addresses make IP reservations for individual MAC addresses the technical process of getting client IP addresses is do RA or Dora discover offer request acknowledged static IP addresses are still relevant for things like servers and Printers and if your DHCP server crashes computers relying on DHCP will stay connected until their tcp/ip lease expires finally if a computer is configured to use DHCP but it cannot find a DHCP server it will assign itself a private IP address that starts with one 69.2 54.xx great job getting through all this information you might need to watch this one twice check out the quiz at the end of this section we'll see how you learned and I will see you in the next lecture
Info
Channel: Server Academy
Views: 37,377
Rating: undefined out of 5
Keywords: paul hill, DHCP, Windows Server, What is DHCP?, dhcp tutorial, dynamic host configuration protocol (internet protocol), how does DHCP work, IP address assignment
Id: 1W88oMZ7R9E
Channel Id: undefined
Length: 10min 32sec (632 seconds)
Published: Wed Nov 30 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.