Installing a DHCP server under Windows Server 2003

Source: Internet
Author: User

DHCP (Dynamic Host Configuration Protocol) is aLANof theNetwork Protocol, usingUDPthe work of the agreement, mainly has two uses: to the internal network orNetwork ServicesThe vendor automatically assigns an IP address to the user or to the internal network administrator for allComputeras a means of central management.

DHCP is the acronym for DYNAMICHOSTCONFIGURATIONPROTOCOL, its predecessor is BOOTP. BOOTP was originally used on the network without a disk host connection:

Network hosts use Bootrom instead of disk to start and connect to the Internet,BOOTP automatically set the TCP/IP environment for those hosts. However, BOOTP has one drawback: you must obtain the client's hard address prior to setting it, and the correspondence to the IP is static. In other words, BOOTP is very lack of "dynamic", if in a limited IP resource environment, BOOTP one-to-one correspondence can cause very considerable waste.

DHCP can be said to be an enhanced version of BOOTP, which is divided into two parts: one is the server side and the other is the client. All IP network settings are centrally managed by the DHCP server and are responsible for handling the client's DHCP requirements, while the client uses the IP environment data assigned from the server. Compared with BOOTP,DHCP through the concept of "lease", effective and dynamic allocation of client TCP/IP settings, and, as a compatibility consideration, DHCP also fully take care of the needs of bootpclient.

It appears that the client is logged on for the first time Network the working form of,DHCP will vary.

First time Login the time:

1. Find the server. When the DHCP client logs on to the network for the first time, the client discovers that there is no IP data set on the machine, it sends a DHCPDISCOVER packet to the network. Because the client does not yet know which network it belongs to, the source address of the packet is 0.0.0.0, and the destination address is 255.255.255.255, and then the DHCPDISCOVER information is attached to the network for broadcast.

In Windows presets, DHCPDiscover's wait time is preset to 1 seconds, which means that when the client sends the first DHCPDISCOVER packet out and does not get a response within 1 seconds, a second dhcpdiscover broadcast is performed. If there is no response, the client will have a total of four DHCPDISCOVER broadcasts (including the first one), except for the first time wait 1 seconds, the remaining three times the wait time is 9﹑13﹑16 seconds respectively. If the DHCP server is not responding, the client will display an error message announcing the failure of the dhcpdiscover. After that, based on the user's choice, the system will continue to repeat the DHCPDISCOVER process after 5 minutes.

2. Provide IP lease addresses. When the DHCP server hears the DHCPDISCOVER broadcast from the client, it selects the first vacant IP, along with other TCP/IP settings, from the address range that has not been leased, and responds to the client with a DHCPOFFER packet.

Since the client does not have an IP address at the beginning, it will have its MAC address information in its DHCPDISCOVER packet, and a XID number to identify the packet,DHCP server response DHCPOFFER packets will be passed to the customer requesting the lease. Depending on the server-side settings,dhcpoffer packets will contain information about a lease term.

3. Accept IP leases. If the client receives a response from multiple DHCP servers on the network, it picks only one of the dhcpoffer (usually the one that arrives first) and sends a DHCPREQUEST broadcast packet to the network, Tells all DHCP servers that it will specify which server to accept IP addresses for.

At the same time, the client also sends an ARP packet to the network, queries whether there is any other machine on the network to use the IP address, and if the IP is found to be occupied, the client sends a DHCPDECLINE packet to the DHCP server and refuses to accept its dhcpoffer, and resend the DHCPDISCOVER information.

In fact, not all DHCP clients unconditionally accept DHCP server offer,, especially if these hosts have other TCP/IP-related client software installed. The client can also use DHCPRequest to make DHCP selections to the server, which are filled in Dhcpoptionfield with different numbers:

In other words, the settings above the DHCP server may not be accepted by the client, and the client can retain some of its TCP/IP settings. And the initiative is always on the client side.

4. Lease confirmation. When the DHCP server receives the client's dhcprequest, it sends a DHCPACK response to the client to confirm that the IP lease is in effect and ends a complete DHCP work process.

This article from "Ann mo Away" blog, declined reprint!

Installing a DHCP server under Windows Server 2003

Related Article

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.