<p/> <A NAME="993"><H1>Appendix C -- Understanding the DHCP Service</H1></A> <p/>The Dynamic Host Configuration Protocol (DHCP) Service in Microsoft Windows 2000 centralizes and manages the allocation of Microsoft Transmission Control Protocol/Internet Protocol (TCP/IP) configuration information by assigning Internet Protocol (IP) addresses automatically to computers that are configured as DHCP clients. Implementing the DHCP Service can eliminate many of the configuration problems associated with configuring TCP/IP manually.<p/>To introduce you to DHCP, the following six topics are covered in this appendix:<p/> <p/>The Bootstrap Protocol (BOOTP)<p/>Manual versus automatic TCP/IP configuration<p/>The requirements for a server running the DHCP Service<p/>The requirements for DHCP clients<p/>The DHCP lease process<p/>IP lease renewal and release<p/> <A NAME="994"><h2>The Bootstrap Protocol</H2></A> <p/>The Bootstrap Protocol, based on the User Datagram Protocol/Internet Protocol (UDP/IP), enables a booting host to configure itself dynamically. DHCP is an extension of BOOTP, which enables diskless clients to start up and automatically configure TCP/IP. Each time that a DHCP client starts, it requests IP addressing information from a DHCP server, including the following:<p/> <p/>An IP address<p/>A subnet mask<p/>Optional values, such as the following:<p/> <p/>A default gateway address<p/>A Domain Name System (DNS) server address<p/>A Windows Internet Name Service (WINS) server address<p/> <p/>When a DHCP server receives a request for an IP address, it selects IP addressing information from a pool of addresses that are defined in its database and offers the IP addressing information to the DHCP client, as shown in Figure C.1. If the client accepts the offer, the DHCP server leases the IP addressing information to the client for a specified period of time.<p/><A HREF="'Factk01x')"> </A> <p/><font class=Quote>Figure C.1</font> A DHCP server provides IP addresses to DHCP clients <p/><A NAME="995"><h2>Manual Versus Automatic TCP/IP Configuration</H2></A> <p/>To understand why the DHCP Service is beneficial for configuring TCP/IP on clients, it is useful to contrast the manual method of configuring TCP/IP with the automatic method using DHCP, as shown in Table C.1.<p/><font class=Quote>Table C.1</font> Configuring TCP/IP Manually Versus Using the DHCP Service<p/><table cellpadding=5 width="95%"><tr><th>Configuring TCP/IP manually</th><th>Configuring TCP/IP using DHCP</th></tr> <tr><td valign="top">Users can pick an IP address randomly rather than obtaining a valid IP address from the network administrator. Using incorrect addresses can lead to network problems that can be difficult to trace to the source.</td> <td valign="top">Users no longer need to acquire IP addressing information from an administrator to configure TCP/IP. The DHCP Service supplies all the necessary configuration information to all the DHCP clients.</td></tr> <tr><td valign="top">Typing the IP address, subnet mask, or default gateway can lead to problems ranging from difficulty communicating, if the default gateway or subnet mask is incorrect, to problems associated with a duplicate IP address.</td> <td valign="top">Correct configuration information ensures correct configuration, which eliminates most difficult-to-trace network problems.</td></tr> <tr><td valign="top">There is administrative overhead for networks if you frequently move computers from one subnet to another. For example, you must change the IP address and default gateway address for a client to communicate from a new location.</td> <td valign="top">Having servers running the DHCP Service on each subnet eliminates the overhead of having to manually reconfigure IP addresses, subnet masks, and default gateways when you move computers from one subnet to another.</td></tr></table><p/>To implement DHCP, you must install and configure the DHCP Service on at least one computer running Windows 2000 Server within the TCP/IP network. The computer can be configured as a domain controller or as a stand-alone server. In addition, for DHCP to function properly, you must configure the server and all of the clients.<p/><A NAME="996"><h2>Requirements for a Server Running the DHCP Service</H2></A> <p/>A DHCP server requires a computer running Windows 2000 Server that is configured with the following:<p/> <p/>The DHCP Service.<p/>A static IP address (it can't be a DHCP client itself), subnet mask, default gateway (if necessary), and other TCP/IP parameters.<p/>A DHCP scope. A scope is a range of IP addresses that are available for lease or assignment to clients.<p/> <A NAME="997"><h2>Requirements for DHCP Clients</H2></A> <p/>A DHCP client requires a computer that is DHCP-enabled and running any of the following supported operating systems:<p/> <p/>Windows 2000, Windows NT Server version 3.51 or later, or Windows NT Workstation version 3.51 or later.<p/>Microsoft Windows 95 or later.<p/>Windows for Workgroups version 3.11 running Microsoft TCP/IP-32, which is included on the Windows 2000 Server CD-ROM.<p/>Microsoft Network Client version 3 for Microsoft MS-DOS with the real-mode TCP/IP driver, which is included on the Windows 2000 Server CD-ROM.<p/>LAN Manager version 2.2c, which is included on the Windows 2000 Server CD-ROM. LAN Manager 2.2c for OS/2 is not supported.<p/> <A NAME="998"><h2>The DHCP Lease Process</H2></A> <p/>To understand the DHCP lease process, you must first understand when the lease process occurs. The DHCP lease process occurs when one of the following events happens:<p/> <p/>TCP/IP is initialized for the first time on a DHCP client.<p/>A client requests a specific IP address and is denied, possibly because the DHCP server dropped the lease.<p/>A client previously leased an IP address but released the IP address and requires a new one.<p/> <p/>DHCP uses a four-phase process to lease IP addressing information to a DHCP client for a specific period of time: DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, and DHCPACK. (See Figure C.2.)<p/><A HREF="'Factk02x')"> </A> <p/><font class=Quote>Figure C.2</font> The DHCP lease process <p/><A NAME="999"><h2>The DHCPDISCOVER Phase</h2></A> <p/>The first phase in the DHCP lease process is DHCPDISCOVER. To begin the DHCP lease process, a client initializes a limited version of TCP/IP and broadcasts a DHCPDISCOVER message requesting the location of a DHCP server and IP addressing information. Because the client doesn't know the IP address of a DHCP server, the client uses 0.0.0.0 as the source address and 255.255.255.255 as the destination address.<p/>The DHCPDISCOVER message contains the client's hardware address and computer name so that the DHCP servers can determine which client sent the request.<p/><A NAME="1000"><h2>The DHCPOFFER Phase</h2></A> <p/>The second phase in the DHCP lease process is DHCPOFFER. All DHCP servers that receive the IP lease request and have a valid client configuration broadcast a DHCPOFFER message that includes the following information:<p/> <p/>The client's hardware address<p/>An offered IP address<p/>A subnet mask<p/>The length of the lease<p/>A server identifier (the IP address of the offering DHCP server)<p/> <p/>The DHCP server sends a broadcast because the client doesn't yet have an IP address. The DHCP client selects the IP address from the first offer that it receives. The DHCP server that is issuing the IP address reserves the address so that it can't be offered to another DHCP client.<p/><A NAME="1001"><h2>The DHCPREQUEST Phase</h2></A> <p/>The third phase in the DHCP lease process occurs after the client receives a DHCPOFFER from at least one DHCP server and selects an IP address. The client broadcasts a DHCPREQUEST message to all DHCP servers, indicating that it has accepted an offer. The DHCPREQUEST message includes the server identifier (IP address) of the server whose offer it accepted. All other DHCP servers then retract their offers and retain their IP addresses for the next IP lease request.<p/><A NAME="1002"><h2>The DHCPACK Phase</h2></A> <p/>The final phase in a successful DHCP lease process occurs when the DHCP server issuing the accepted offer broadcasts a successful acknowledgment to the client in the form of a DHCPACK message. This message contains a valid lease for an IP address and possibly other configuration information.<p/>When the DHCP client receives the acknowledgment, TCP/IP is completely initialized and the client is considered a bound DHCP client. Once bound, the client can use TCP/IP to communicate on the network.<p/><A NAME="1003"><h2>The DHCPNACK Message</h2></A> <p/>If the DHCPREQUEST is not successful, the DHCP server broadcasts a negative acknowledgement (DHCPNACK). A DHCP server broadcasts a DHCPNACK if<p/> <p/>The client is trying to lease its previous IP address, and the IP address is no longer available.<p/>The IP address is invalid because the client physically has been moved to a different subnet.<p/> <p/>When the client receives an unsuccessful acknowledgment, it resumes the DHCP lease process.<p/><font class=Quote>NOTE</font>If a computer has multiple network adapters that are bound to TCP/IP, the DHCP process occurs separately over each adapter. The DHCP Service assigns a unique IP address to each adapter in the computer that is bound to TCP/IP.<p/><A NAME="1004"><h2>IP Lease Renewal and Release</H2></A> <p/>All DHCP clients attempt to renew their lease when 50 percent of the lease time has expired. To renew its lease, a DHCP client sends a DHCPREQUEST message directly to the DHCP server from which it obtained the lease. If the DHCP server is available, it renews the lease and sends the client a DHCPACK message with the new lease time and any updated configuration parameters, as shown in Figure C.3. The client updates its configuration when it receives the acknowledgment.<p/><A HREF="'Factk03x')"> </A> <p/><font class=Quote>Figure C.3</font> Renewing an IP lease <p/><font class=Quote>NOTE</font>Each time a DHCP client restarts, it attempts to lease the same IP address from the original DHCP server. If the lease request is unsuccessful and lease time is still available, the DHCP client continues to use the same IP address until the next attempt to renew the lease.<p/>If a DHCP client can't renew its lease with the original DHCP server at the 50 percent interval, the client broadcasts a DHCPREQUEST to contact any available DHCP server when 87.5 percent of the lease time has expired. Any DHCP server can respond with a DHCPACK message (renewing the lease) or a DHCPNACK message (forcing the DHCP client to reinitialize and obtain a lease for a different IP address).<p/>If the lease expires, or if a DHCPNACK message is received, the DHCP client must immediately discontinue using that IP address. The DHCP client then begins the DHCP lease process to lease a new IP address.<p/><A NAME="1005"><h2>Using Ipconfig to Renew a Lease</h2></A> <p/>Use the ipconfig command with the /renew switch to send a DHCPREQUEST message to the DHCP server to receive updated options and lease time. If the DHCP server is unavailable, the client continues using the current DHCP- supplied configuration options.<p/><A NAME="1006"><h2>Using Ipconfig to Release a Lease</h2></A> <p/>Use the ipconfig command with the /release switch to cause a DHCP client to send a DHCPRELEASE message to the DHCP server and to release its lease. This is useful when you are moving a client to a different network and the client will not need its previous lease. TCP/IP communications with the client will stop after you issue this command.<p/>Microsoft DHCP clients don't initiate DHCPRELEASE messages when shutting down. If a client remains shut down for the length of its lease (and the lease is not renewed), the DHCP server might assign that client's IP address to a different client after the lease expires. A client has a better chance of receiving the same IP address during initialization if it doesn't send a DHCPRELEASE message.<p/> - Microsoft Windows 1002000 Professional [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Microsoft Windows 1002000 Professional [Electronic resources] - نسخه متنی

Rick Wallace

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Appendix C -- Understanding the DHCP Service


The Dynamic Host Configuration Protocol (DHCP) Service in Microsoft Windows 2000 centralizes and manages the allocation of Microsoft Transmission Control Protocol/Internet Protocol (TCP/IP) configuration information by assigning Internet Protocol (IP) addresses automatically to computers that are configured as DHCP clients. Implementing the DHCP Service can eliminate many of the configuration problems associated with configuring TCP/IP manually.

To introduce you to DHCP, the following six topics are covered in this appendix:


The Bootstrap Protocol (BOOTP)

Manual versus automatic TCP/IP configuration

The requirements for a server running the DHCP Service

The requirements for DHCP clients

The DHCP lease process

IP lease renewal and release


The Bootstrap Protocol


The Bootstrap Protocol, based on the User Datagram Protocol/Internet Protocol (UDP/IP), enables a booting host to configure itself dynamically. DHCP is an extension of BOOTP, which enables diskless clients to start up and automatically configure TCP/IP. Each time that a DHCP client starts, it requests IP addressing information from a DHCP server, including the following:


An IP address

A subnet mask

Optional values, such as the following:


A default gateway address

A Domain Name System (DNS) server address

A Windows Internet Name Service (WINS) server address



When a DHCP server receives a request for an IP address, it selects IP addressing information from a pool of addresses that are defined in its database and
offers the IP addressing information to the DHCP client, as shown in Figure C.1. If the client accepts the offer, the DHCP server leases the IP addressing information to the client for a specified period of time.


Figure C.1 A DHCP server provides IP addresses to DHCP clients

Manual Versus Automatic TCP/IP Configuration


To understand why the DHCP Service is beneficial for configuring TCP/IP on clients, it is useful to contrast the manual method of configuring TCP/IP with the automatic method using DHCP, as shown in Table C.1.

Table C.1 Configuring TCP/IP Manually Versus Using the DHCP Service







Configuring TCP/IP manuallyConfiguring TCP/IP using DHCP
Users can pick an IP address randomly rather than obtaining a valid IP address from the network administrator. Using incorrect addresses can lead to network problems that can be difficult to trace to the source.Users no longer need to acquire IP addressing information from an administrator to configure TCP/IP. The DHCP Service supplies all the necessary configuration information to all the DHCP clients.
Typing the IP address, subnet mask, or default gateway can lead to problems ranging from difficulty communicating, if the default gateway or subnet mask is incorrect, to problems associated with a duplicate IP address.Correct configuration information ensures correct configuration, which eliminates most difficult-to-trace network problems.
There is administrative overhead for networks if you frequently move computers from one subnet to another. For example, you must change the IP address and default gateway address for a client to communicate from a new location.Having servers running the DHCP Service on each subnet eliminates the overhead of having to manually reconfigure IP addresses, subnet masks, and default gateways when you move computers from one subnet to another.

To implement DHCP, you must install and configure the DHCP Service on at least one computer running Windows 2000 Server within the TCP/IP network. The computer can be configured as a domain controller or as a stand-alone server. In addition, for DHCP to function properly, you must configure the server and all of the clients.

Requirements for a Server Running the DHCP Service


A DHCP server requires a computer running Windows 2000 Server that is configured with the following:


The DHCP Service.

A static IP address (it can't be a DHCP client itself), subnet mask, default gateway (if necessary), and other TCP/IP parameters.

A DHCP scope. A scope is a range of IP addresses that are available for lease or assignment to clients.


Requirements for DHCP Clients


A DHCP client requires a computer that is DHCP-enabled and running any of the following supported operating systems:


Windows 2000, Windows NT Server version 3.51 or later, or Windows NT Workstation version 3.51 or later.

Microsoft Windows 95 or later.

Windows for Workgroups version 3.11 running Microsoft TCP/IP-32, which is included on the Windows 2000 Server CD-ROM.

Microsoft Network Client version 3 for Microsoft MS-DOS with the real-mode TCP/IP driver, which is included on the Windows 2000 Server CD-ROM.

LAN Manager version 2.2c, which is included on the Windows 2000 Server CD-ROM. LAN Manager 2.2c for OS/2 is not supported.


The DHCP Lease Process


To understand the DHCP lease process, you must first understand when the lease process occurs. The DHCP lease process occurs when one of the following events happens:


TCP/IP is initialized for the first time on a DHCP client.

A client requests a specific IP address and is denied, possibly because the DHCP server dropped the lease.

A client previously leased an IP address but released the IP address and requires a new one.


DHCP uses a four-phase process to lease IP addressing information to a DHCP client for a specific period of time: DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, and DHCPACK. (See Figure C.2.)


Figure C.2 The DHCP lease process

The DHCPDISCOVER Phase


The first phase in the DHCP lease process is DHCPDISCOVER. To begin the DHCP lease process, a client initializes a limited version of TCP/IP and broadcasts a DHCPDISCOVER message requesting the location of a DHCP server and IP addressing information. Because the client doesn't know the IP address of a DHCP server, the client uses 0.0.0.0 as the source address and 255.255.255.255 as the destination address.

The DHCPDISCOVER message contains the client's hardware address and computer name so that the DHCP servers can determine which client sent the request.

The DHCPOFFER Phase


The second phase in the DHCP lease process is DHCPOFFER. All DHCP servers that receive the IP lease request and have a valid client configuration broadcast a DHCPOFFER message that includes the following information:


The client's hardware address

An offered IP address

A subnet mask

The length of the lease

A server identifier (the IP address of the offering DHCP server)


The DHCP server sends a broadcast because the client doesn't yet have an IP
address. The DHCP client selects the IP address from the first offer that it
receives. The DHCP server that is issuing the IP address reserves the address
so that it can't be offered to another DHCP client.

The DHCPREQUEST Phase


The third phase in the DHCP lease process occurs after the client receives a DHCPOFFER from at least one DHCP server and selects an IP address. The
client broadcasts a DHCPREQUEST message to all DHCP servers, indicating that it has accepted an offer. The DHCPREQUEST message includes the server identifier (IP address) of the server whose offer it accepted. All other DHCP servers then retract their offers and retain their IP addresses for the next IP lease request.

The DHCPACK Phase


The final phase in a successful DHCP lease process occurs when the DHCP server issuing the accepted offer broadcasts a successful acknowledgment to the client in the form of a DHCPACK message. This message contains a valid lease for an IP address and possibly other configuration information.

When the DHCP client receives the acknowledgment, TCP/IP is completely initialized and the client is considered a bound DHCP client. Once bound, the client can use TCP/IP to communicate on the network.

The DHCPNACK Message


If the DHCPREQUEST is not successful, the DHCP server broadcasts a negative acknowledgement (DHCPNACK). A DHCP server broadcasts a DHCPNACK if


The client is trying to lease its previous IP address, and the IP address is no longer available.

The IP address is invalid because the client physically has been moved to a different subnet.


When the client receives an unsuccessful acknowledgment, it resumes the DHCP lease process.

NOTEIf a computer has multiple network adapters that are bound to TCP/IP, the DHCP process occurs separately over each adapter. The DHCP Service assigns a unique IP address to each adapter in the computer that is bound to TCP/IP.

IP Lease Renewal and Release


All DHCP clients attempt to renew their lease when 50 percent of the lease time has expired. To renew its lease, a DHCP client sends a DHCPREQUEST message directly to the DHCP server from which it obtained the lease. If the DHCP server is available, it renews the lease and sends the client a DHCPACK message with the new lease time and any updated configuration parameters, as shown in Figure C.3. The client updates its configuration when it receives the acknowledgment.


Figure C.3 Renewing an IP lease

NOTEEach time a DHCP client restarts, it attempts to lease the same IP address from the original DHCP server. If the lease request is unsuccessful and lease time is still available, the DHCP client continues to use the same IP address until the next attempt to renew the lease.

If a DHCP client can't renew its lease with the original DHCP server at the 50 percent interval, the client broadcasts a DHCPREQUEST to contact any available DHCP server when 87.5 percent of the lease time has expired. Any DHCP server can respond with a DHCPACK message (renewing the lease) or a DHCPNACK message (forcing the DHCP client to reinitialize and obtain a lease for a different IP address).

If the lease expires, or if a DHCPNACK message is received, the DHCP client must immediately discontinue using that IP address. The DHCP client then
begins the DHCP lease process to lease a new IP address.

Using Ipconfig to Renew a Lease


Use the ipconfig command with the /renew switch to send a DHCPREQUEST message to the DHCP server to receive updated options and lease time. If the DHCP server is unavailable, the client continues using the current DHCP-
supplied configuration options.

Using Ipconfig to Release a Lease


Use the ipconfig command with the /release switch to cause a DHCP client to send a DHCPRELEASE message to the DHCP server and to release its lease. This is useful when you are moving a client to a different network and the client will not need its previous lease. TCP/IP communications with the client will stop after you issue this command.

Microsoft DHCP clients don't initiate DHCPRELEASE messages when shutting down. If a client remains shut down for the length of its lease (and the lease is not renewed), the DHCP server might assign that client's IP address to a different client after the lease expires. A client has a better chance of receiving the same IP address during initialization if it doesn't send a DHCPRELEASE message.

/ 156