In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
DHCP (Dynamic Host Configuration Protocol, dynamic Host configuration Protocol) is a local area network protocol. It means that the server controls a range of IP addresses, and when the client logs in to the server, it can automatically obtain the IP address and subnet mask assigned by the server. The construction of DHCP server reduces the workload of administrators, avoids the possibility of IP address input errors, avoids IP address conflicts, provides the utilization of IP addresses, and facilitates the configuration of the client. Let's build a DHCP server on Windows server2016. Preparation environment: open a win10 client and a Windows server2016 server system through a virtual machine It is convenient for us to experiment [(VMware14 virtual machine download link: https://pan.baidu.com/s/1F_DCdgc9l3Qw6ZDNrulh_A extraction code: h6h9) (win10 Enterprise Edition download link: https://pan.baidu.com/s/1EuAQ9RfJ_bThggXwtaG24A extraction code: 2u80) (win10 activation software download link: https://pan.baidu.com/s/19ryTFUxJ162kpjFe3HNkiQ extraction code: zuva) (Windows server 2016 download link: http://www.downcc.com/soft/359376.html)]
First, we first turn on the virtual machine (vmware14), start the win10 client and server system Windows server2016, check all the client and server system network card modes to host-only mode (figure 1), and tick off the "use local DHCP services to assign IP addresses to virtual machines" in the virtual machine network editor (figure 2, 3). If not, the experimental results will be affected. So that the experiment could not be completed.
(figure 1, the virtual machine opens the client win10 system and also chooses host-only mode.)
(figure 2)
(figure 3)
2. Make sure that the IP address in the IPV4 attribute of the win10 client network adapter is automatically acquired, as shown in the figure:
3. Go back to Windows server 2016 server system settings to add DHCP server, add DHCP server method: click the start menu button in the lower left corner of the desktop, click the server manager (figure 1), click the dashboard, select add roles and functions (figure 2), pop up the add roles and functions wizard, you can install functions according to the wizard (figure 3: 12):
(figure 1)
(figure 2)
(figure 3)
(figure 4)
(figure 5)
(figure 6)
(figure 7)
(figure 8)
(figure 9)
(figure 10)
(figure 11)
(figure 12)
4. After installing DHCP, close the server manager, go back to the desktop, click the start menu in the lower left corner of the desktop, find the windows management tool, click to find the recently added DHCP icon, and click Open (figure):
After the DHCP window opens, we can start to set up DHCP. First of all, click our hostname on the left (that is, our server). After clicking open, we can see "IPV4/IPV6" DHCP management, in which we want to set "IPV4", right-click "IPV4", and click "New scope". Let's create an address pool, as shown in the figure:
Sixth, after clicking "New scope", we will jump out of the setup wizard, and we will follow the wizard to set up our DHCP step by step.
1. After jumping out of the setup wizard, click the next step, as shown in the figure:
2. Enter a name for our scope (set it by yourself) at this time, and then click next, as shown in the figure:
3. Next, we need to set the "start address" and "end address" of the IP address. Note that the IP address field should be in the same network segment as the IP address we just set in the "Network and sharing Center". The middle address between the "start address" and "end address" we entered is the address that can be assigned to the client in this scope. The following length and Subnet Mask will automatically pop up, and then click next, as shown in the figure:
4. The following is to set the excluded IP address range. Some IP addresses will be occupied in the workplace. We exclude them so that the occupied addresses will not be assigned, avoiding the occurrence of IP address conflicts. Click add after typing, and then click next, as shown in the figure:
5. Set the lease term below. If there is no special requirement, it will remain the same by default. Click next, as shown in the figure:
6. Then what you want to set is the configuration option of DHCP, which is the IP address (default gateway), DNS server and WINS settings. Select Yes, and click next, as shown in the figure:,
7. The first step is to set the gateway, which we can set by ourselves (within the same network segment, without setting the address that can be assigned). Click add after input, and click next, as shown in the figure:
8. Set up the DNS server below. "parent domain" and "server name" do not need to be filled in, because we have not set up DNS. Enter the static address set by the server for "IP address". It is convenient for us to set up DNS settings. After entering the address, clicking "add" on the right will bring up a verification box. After verification is completed, click "Yes" directly to add the IP address. At this time, we click on the next step. Make the following settings as shown in the figure:
9. Here are the WINS settings, which we don't need to set. Just click next, as shown in the figure:
10, the last is to activate the scope, we set up is to use this scope, the default choice of "Yes", do not need to change, just click on the next step. As shown in the figure:
11. Complete the settings, and click finish, so that we have completed the scope settings, as shown in the figure:
12. After the scope is created, you can view it in the DHCP manager, and our address pool, address lease and other data will be displayed on the manager, as shown in the figure:
13. We can click on the address pool to view the information. The distribution address range we set and the excluded address range are all in it, as shown in the figure:
14. We can view the address lease data below and click, because there is no client connecting to the server, so there is no information, as shown in the figure:
15. We can check the "retention" option, and there is no data in it. This retention option means to specify IP for the specified client (this client must connect to this network segment), because there is no setting and there is no data, as shown in the figure:
16. The "router (default gateway)" and "DNS server" addresses we have set in "scope options" are shown in the figure:
17, strategy, we did not do, also do not have the data, do not care.
18. Let's take a look at "filter items" in DHCP. "filter items" have two options of "allow" and "reject", that is, blacklist and whitelist. "allow" means to allow only those clients to obtain addresses, and "reject" means to deny those clients to obtain addresses. Later, you can add them if you need to use them. (add method, right-click the "reject" option, click enable, then right-click, and click New filter. Just fill in and add it. " Allow "do the same, how to obtain the MCA address, as shown below), as shown below:"
7. At this time, our scope has been established, the server has been enabled, and the common options have also been introduced. Let's go back to the client to verify whether we can obtain the address, open the virtual machine win10 client, click "search web and Windows" in the lower left corner, enter "cmd", and open the command prompt, as shown in the figure:
8. Enter ipconfig / renew at the command prompt (obtain the IP address again). At this time, we will find that the obtained IP address is the address in the assignable address we just set in the DHCP server above the server, including the subnet mask we set, and the default gateway, as shown in the figure:
9. In the above command, we obtained the IP address, default gateway, etc., but did not see the DNS address we set. At this time, we use another command ipconfig / all (view all IP addresses) to check the DNS address and so on. This DNS address is exactly the address we just set on the server, as shown in the figure:
10. After successfully setting up the DHCP server, we go back to the virtual machine server system and open the DHCP management tool. It is time for us to see the access of a client in the "address lease" list, which is the address of our win10 client connection (figure 1). Next, let's take a look at the settings specified client IP address in the DHCP server, click the reserve icon, right-click, then click "New retention", pop-up settings window, enter the reserved name, IP address, MAC address (MAC address acquisition: click on the server start menu bar, right-click, click run, type cmd to open the command prompt, enter the instruction arp-a, enter enter At this time, you can view the client connecting to this server. The physical path is the MAC address of the client. You can find and copy it (figure 2). This method can only check the MAC address of the client connected to this server. Another way to view the MAC address is to enter ipconfig / all at the command prompt on the client, enter, and check that the physical path is the MAC address of this client. ), click add, (see figure 3):
(figure 1)
(figure 2)
(figure 3)
11. Next, let's verify whether the reserved address is added successfully. Open the client command prompt, enter ipconfig / release (release the current IP address), and continue to enter ipconfig / renew to get the address again (as shown in the figure). This is the reserved address we set, so our experiment is successful. I will not give examples of the "allow" and "deny" functions in the filter. Get the MAC address of the other party, create a new one, and type it. You can try it yourself.
This completes setting up the DHCP server in windows server2016, hoping to help you, and then will update the DNS server in windows server2016, if you need it, you can follow it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.