How to Request Additional DHCP Options from a DHCP Server (312468)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows NT Workstation 4.0
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Server, Enterprise Edition 4.0

This article was previously published under Q312468
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

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:
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

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

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:

Modification Type:MajorLast Reviewed:10/25/2003
Keywords:kbhowto kbnetwork kbnofix KB312468