Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Changing Static IP Address of Client Computers to DHCP and Vice-Versa.


Author: Nirmal Sharma MVP

View products that this article applies to.

SUMMARY

This article explains about changing Static IP address of client computers over the network.

↑ Back to the top


MORE INFORMATION

Microsoft has already published an article to change Static IP address of client computers to DHCP (make DHCP Enable) over the network.
 
The following article can be used to change all static clients to DHCP-aware
 

 
In deed, the above article is useful but it requires a lot of manual effort. You need to connect every computer through "Remote Registry API" and then change the required detail in registry for all computers.
 
This is lengthy task when you need to do the manual work on more than 100 computers. I have pointed out a solution for this situation.
 
Please follow the steps outlined here:
 
  1. You need have the following tools handy before you can accomplish this:
                WininstLE
                PSEXEC
 
  1. Using WININSTLE you need to find out the registry keys for DHCP Client machine when they obtain IP Address automatically from DHCP Server.
  2. Using PSEXEC (if your network is in Workgroup Security Model) or Group Policy (If you are in Domain Security Model) to deploy DHCP Client settings remotely with a text file pre-configured which can be used to differentiate between IP addresses used by client machines.
  3. You need to install and run WinInstLE on one of your client computer.
  4. Go to a client machine.
  5. Install WININSTLE. This utility is located at Windows 2000 CD.
  6. Run WININSTLE. Perform *Before Snapshot* operation.
  7. Give a path to save MSI file and registry informations.
  8. Restart client computer.
  9. Configure client machine to obtain IP address automatically from DHCP Server.
  10. After restarting client computer, run *After Snapshot*. This will record any changes made during the operation DHCP Client contacted and received IP Address information from DHCP Server.
  11. Edit the *.REG file and delete the IP Address DHCP Client received from DHCP Server. This will make sure that all the client computers use unique IP Address on network. Save this file.
  12. Now you have two files to deploy either using PSEXEC or Group Policy.
  13.        MSI file
  14.        REG file
  15. You can deploy MSI file (that is the configuration of DHCP Client) using Group Policy Software Installation snap-in. OR
  16. You can deploy MSI file or REG file using PSEXEC remotely on all client computers.
 
By using PSEXEC you can specify a text file which keeps information about the IP Address and Client computer name.
 
Now you need to put everything together to get things working. This is how you do it:
 
Note: The only unique filed required in DHCP Configuration is IP Address.
 
  1. You have got a REG file with you from WININSTLE. Edit this REG file and remove the IP Address value. I think you have already done in above steps.
  2. Save this REG file.
  3. Copy the full MSI folder to server from where you want to deploy DHCP settings.
  4. Deploy MSI file using Software Installation snap-in.
  5. After deploying MSI file all configuration settings will be saved in all client computers except IP Address.
  6. Next client computers will restart they will obtain IP Address from DHCP Server.
 
Note: If you want to enable DHCP for other connection specify the name of connection in netsh command.
 
         netsh interface ip set address "Local Area Connection" dhcp
 
This should work well.
 
SUMMARY: -
 
The following is required for client to be a DHCP Client when configuring manually:
 
DHCP Client service should be started.
 
Client LAN connection should be set to *Obtain IP from DHCP Server*.
 
netsh interface ip set address "Local Area Connection" dhcp
 
DHCP Client must have a unique IP Address on network.
 
Some registry entries as described in the above article must be set.
 
HKLM\SYSTEM\CurrentControlSet\Services\XXXXXX\Parameters\TCPIP, where XXXXXX is the value of ServiceName found in the step 3 in the above article.
EnableDHCP = 1
IPAddress = 0.0.0.0
SubnetMask = 0.0.0.0
DHCPDefaultGateway = 192.168.0.1 -- If you are using some other gateway then you need to put it in script or manually in registry.
DHCPIPAddress = 192.168.0.5 --- IP got from DHCP server.
DHCPServer = 192.168.0.1 -- IP Address of DHCP server.
 
You don not need to restart workstation. Simply restart DHCP Client service on destination computer using a script.
 
 

↑ Back to the top


Community solutions content disclaimer

Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.

↑ Back to the top


Keywords: kbpubmvp, kbpubtypecca, kbhowto, KB555992

↑ Back to the top

Article Info
Article ID : 555992
Revision : 3
Created on : 4/17/2018
Published on : 4/17/2018
Exists online : False
Views : 294