How to Request Additional DHCP Options from a DHCP Server

Article translations Article translations
Article ID: 312468 - View products that this article applies to.
This article was previously published under Q312468
Expand all | Collapse all

On This Page

SUMMARY

This article describes how to configure the DHCP Client service to request additional DHCP options (for example, option 11 [Resource Server]) and describes some differences between Windows NT 4.0 and Windows 2000.

MORE INFORMATION

All of the Windows DHCP client computers that are referenced in this article support the following DHCP options by default:
Collapse this tableExpand this table
Code Description
003Router
006DNS Server
015DNS Domain Name
044WINS Server
046NetBIOS Node Type
In addition, Windows 2000 supports option 31 (Perform Router Discovery) and option 33 (Static Route).

Windows NT 4.0

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

In Windows NT 4.0, the DHCP options are stored in the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DHCP\Parameters\Options
You can add a new key for the DHCP option that you want to request from the DHCP server. Options that are supported by the DHCP server are defined in Request for Comments (RFC) 1533. For example, if you want to request the Internet protocol (IP) address for a resource server, you must add DHCP option 11. To do so:
  1. Start Registry Editor (Regedt32.exe).
  2. Locate and click the following registry key:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DHCP\Parameters\Options
  3. Click Add Key on the Edit menu, and then add the following registry key:
    Key Name: 11
    Class: (Do not enter a name here)
  4. Click the new key in Registry Editor, click Add Value on the Edit menu, and then add the following registry value:
    Value Name: KeyType
    Data Type: REG_DWORD
    Data: 0x3
    NOTE: The Value for KeyType determines the Data Type for the new Key. The Value 0x3 will create a REG_BINARY Data Type, which is the best for getting the raw data.
  5. Click Add Value on the Edit menu, and then add the following registry value:
    Value Name : RegLocation
    Data Type : REG_SZ
    NOTE: In the Data box, type the registry key where you want to store the option data. For example, you want to store the data in the following registry key:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
    In this case, type the following string in the Data box:
    system\currentcontrolset\services\tcpip\parameters\resourceserver

  6. Quit Registry Editor, and then restart the computer.
NOTE: The client requests the option from the DHCP server and enters it as a hexadecimal value in the registry key that you typed in the Data box. If you want to convert the data, you must create your own logic to do so.

Windows 2000

The DHCP Client service in Windows 2000 has been updated from Windows NT 4.0. Windows 2000 clients must make a DhcpRequestParams API call to request custom parameters. The DHCP client stores data that is obtained from a DHCP server in its local cache. If the DHCP client cache contains all of the data that is requested in the pRecdParams array of a DhcpRequestParams function call, the client returns data from its cache.

If the data that is requested is not available in the client cache, the client processes the DhcpRequestParams function call by submitting a DHCP-INFORM message to the DHCP server. The DhcpRequestParams API call can also be used to request User or Vendor ClassID-based options. For more information, refer to Microsoft Developer Network (MSDN) documentation about the API call. You can find examples of code in the following MSDN documents: For more information, refer to RFC 1533:
RFC 1533 - DHCP Options and BOOTP Vendor Extensions

Properties

Article ID: 312468 - Last Review: September 14, 2007 - Revision: 3.4
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Server 4.0 Enterprise Edition
Keywords: 
kbfaq kbhowto kbnetwork kbnofix KB312468

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com