How to Configure DHCP Client and DHCP Server on Same Computer |
ID: Q184331
The information in this article applies to:
-
Microsoft Proxy Server versions 1.0, 2.0
-
Microsoft Windows NT Server version 4.0
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help
topic in Regedt32.exe.
SUMMARY
This article discusses how to set up the simultaneous configuration of
DHCP
client and DHCP server on a multi-homed computer.
The following instructions allow the use of a DHCP server and DHCP client
on the same computer. This is useful in a single-server environment where
a
cable modem or digital subscriber line (DSL) modem receives an IP address
from the Internet service provider using DHCP, and the server also acts as
a DHCP server for the local network.
NOTE: This capability has not been regression-tested by Microsoft. Any of
these modifications may be destabilizing in a production environment.
MORE INFORMATION
This configuration has been tested on a multi-homed server (2 NICs). This
document assumes that the external NIC is connected to the Internet.
- Configure the server normally as a DHCP server by assigning static
IP
addresses to both NICs.
NOTE: The "external" NIC static IP address should be an address
that is not used on your internal network. It should also be on a
different logical
segment. Preferably, you should use an address from one of the reserved
ranges of IP addresses. These addresses are intended for private networks
and are not routable on the Internet. This IP address is only intended as
a
placeholder, it serves no other purpose.
- When the DHCP server is configured and running, you must make a
registry modification to enable the DHCP client on the Internet
NIC.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys and
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it.
If you are running Windows NT or Windows 2000, you should also update your Emergency
Repair Disk (ERD).
To enable DHCP on the Internet NIC, perform the following steps:
NOTE: The DHCP server may need to be set to Manual Startup in
order to
successfully configure the NIC.
- Run the Registry Editor (Regedt32.exe).
- Go to the following key in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NETCARD1\Parameters\TcpIp
NOTE: NETCARD1 is the manufacturers driver name for the NIC.
- Find the entry called "EnableDHCP."
- Edit this entry and change the value from 0 to 1.
- Check for the existence of the "DhcpIPAddress" "DhcpSubnetMask"
values.
If present, set them to 0.0.0.0. If these values are not present, they
may need
to be manually created. To add these manually, choose Add Value from
the edit drop-down menu. Add the following values:
DhcpIPAddress:REG_SZ:0.0.0.0
DhcpSubnetMask:REG_SZ:0.0.0.0
Double-click the IPAddress value and make sure that it is set to 0.0.0.0.
Double-click the SubnetMask value and make sure that it is set to
0.0.0.0.
- Exit the Registry Editor. In Control Panel Services, select the DHCP
Client. Click Startup, and then select the radio button for Automatic,
Click OK, and then click Close.
- When the computer has been restarted, the external NIC will have an
IP address
assigned dynamically by DHCP and the static placeholder IP address that
was
manually configured. The internal NIC will have the static IP address.
These DHCP client configuration settings may need to be repeated any time
the
DHCP server is reconfigured.
Additional query words:
Keywords :
Version : :1.0,2.0,4.0
Platform :
Issue type : kbhowto
Technology :