Understanding DHCP servers in all aspects

Source: Internet
Author: User

We know that the use of DHCP servers is an effective way to manage IP addresses. Generally, we need to first understand the design and then make some settings and configurations. In a large network, you need to allocate various addresses (IP addresses, subnet masks, gateways, DNS addresses, and WINS server addresses) and their related parameters to each workstation. This work is very heavy and prone to errors. DHCP servers can be used to automatically allocate workstations in the network.

I. DHCP server Overview

Dynamic Host Configuration Protocol (DHCP) is an ICP/IP standard Protocol that simplifies IP Address Allocation and Management. The network administrator can use the DHCP server to dynamically allocate IP addresses and other related environment configurations for the client.

1. Advantages of the DHCP service

Each computer on a TCP/IP network must have a unique IP address. The IP address (and the associated subnet mask) can identify the host and its connected subnet. If you want to move a computer to a different subnet, you must change the IP address. DHCP allows you to dynamically assign IP addresses to clients through the IP address database of the DHCP server on the local network.

As an excellent IP address management tool, DHCP has the following advantages:

(1) improve efficiency. The computer will automatically obtain the IP address information and complete the configuration, replacing the heavy work of manual configuration, and reducing possible errors due to manual configuration, greatly improving work efficiency.

(2) Ease of management. When the IP address segment used by the network changes, you only need to modify the IP address pool of the DHCP server, instead of modifying the addresses of all computers in the network one by one.

(3) Saving IP Address resources. In the DHCP system, the IP address is raised by the DHCP server only when the DHCP client requests it. When the computer is shut down, the IP address is automatically released. Generally, computers on the network are not started at the same time. Therefore, a small number of IP addresses can also meet the needs of many computers.

2. Scope

The scope is the full contact range of available IP addresses on the network, also known as the IP address segment or IP address range. DHCP provides IP Address Allocation services to clients based on the scope management unit. A domain is also called a domain. It is an IP address group that can be managed in the network. It allows you to distribute and assign any configuration parameters for client IP addresses.

3. Super Scope

A super scope is a set of scopes managed as a single entity. That is to say, a super scope can be formed when the DHCP server has multiple scopes. Super scope is used to include multiple logical IP subnets in the same physical subnet. A super scope only contains a list of member scopes or self-scopes that can be activated at the same time. However, super scopes are not the same as setting specific scopes. If you want to configure most attributes used in the super scope, You need to configure the member scope or subscope attributes separately.

4. Exclusion range and address pool

The exclusion scope is the finite IP Address Sequence excluded from the DHCP service in the scope. The excluded IP address. The server is not provided to the DHCP client on the network.

The address pool is a set of available IP addresses in the DHCP scope, that is, the IP addresses remaining after the excluded range are used. The DHCP server dynamically assigns the address in the pool to the DHCP client on the network.

For example, when creating a scope, if the configured address range is 192.168.1.1 ~ 192.168.1.254, and the exclusion range is 192.168.1.50 ~ 192.168.1.100, then the DHCP server will not ~ The IP address within the range of 192.168.1.100 is provided to the client, and the address pool is 192.168.1.1 ~ 192.168.1.49 and 192.168.1.101 ~ 192.168.1.254.

5. Term and Renewal

The lease term refers to the time period (8 days by default) of IP configuration information allocated to the client by the DHCP server ). When a lease is provided to the client, the lease is "active". When the lease term expires or is deleted on the server, the lease becomes "inactive. The term of lease determines when the lease expires and the frequency at which the client updates the lease to the server.
 

6. DHCP lease Process

When the computer used as the DHCP client starts, it will obtain its TCP/IP configuration information from the DHCP server and obtain the IP address lease period, that is, the time of use. The process of obtaining an IP address from a DHCP server on a computer with the IP address set as "automatically obtained" is as follows:

(1) After the DHCP Client is started, if the client finds that there are no IP addresses or other related parameters on the local machine, it will use 0.0.0.0 as its own IP address and 255.255.255.255 as its server address, the broadcast sends DHCP discovery information that includes the MAC address of the nic and the NetBIOS name.

When the first DHCP discovery message is sent, the DHCP Client waits for 1 second. During this period, if the DHCP server does not respond, the DHCP client will repeatedly send DHCP discovery information at 9th seconds, 13th seconds, and 16th seconds. If no DHCP server response is received, the client displays an error message and retains the IP address segment from Microsoft (169.254.0.1 ~ 169.254.255.254) automatically selects an address and sets the subnet mask to 255.255.0.0. Later, the system continues to broadcast the discovery information every five minutes until a response is received.

(2) When any DHCP server in the network (Multiple DHCP servers may exist in the same network) receives the DHCP detection information from the DHCP client, select an unrented IP address from the IP address pool along with other TCP/IP network configurations (including subnet mask, gateway address, lease period, DNS address, WINS server address, and DHCP server that provides response) ), then, it is broadcast to the DHCP client.

(3) When the DHCP client receives the response, the DHCP request information (including the IP address of the selected DHCP server in the DHCP Request Information) will be sent to all DHCP servers in the network in broadcast mode, notifying the selected DHCP server, other DHCP servers are also notified to release their reserved IP addresses.

At the same time, the client will also send an ARP (Address Resolution Protocol) package to the network to query whether other machines on the network use the IP Address. If it is found that the IP Address has been occupied, the client sends a DHCPDISCOVER packet to the DHCP server, rejects the DHCPDISCOVER, and resends the DHCPDISCOVER information.

(4) Once the selected DHCP server receives the DHCP request information from the DHCP client, it marks the reserved IP address as rented, send a DHCP response message to the DHCP Client in broadcast mode to confirm that the IP lease takes effect.

The above process can be summarized as discovery, provision, DHCP request, and DHCP response.

Ii. Install the DHCP server

The DHCP Server must have a Windows 2000 Server or Windows Server 2003 operating system installed with the TCP/IP protocol and fixed IP address information.

Follow these steps to add a DHCP Server to Windows Server 2003:

(1) log in as Administrator.

(2) Select "start" | "Control Panel" | "Add/delete programs" to open the "Add/delete programs" dialog box.

(3) Select "Add/delete Windows Components" to open the "Windows component wizard" dialog box.

"Windows component wizard" dialog box

(4) Select the "Network Service" check box and click the "details" button to open the "Network Service" dialog box.

"Network Service" dialog box

(5) Select the "Dynamic Host Configuration Protocol (DHCP)" check box and click "OK" to return to the "Windows component wizard" dialog box.

(6) Click "Next" to install the installation program and prompt to insert the installation CD for Windows Server 2003. After the installation is complete, return to the "Windows component wizard" dialog box.

(7) Click "finish" to complete the installation of the DHCP server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.