Solved

WIN2008 R2 clients convert from static IP to dhcp

Posted on 2014-01-18
8
349 Views
Last Modified: 2014-01-24
Hello,
on a 800 winxp wks recently migrated to win 2008 R2 domain ( consists of 10 subnets ), is needed to change IP from static to dynamic but it is mandatory to keep the existing ip address.

Are there ways to import onto dhcp scopes ?

Changing from static to dhcp directly from tcp/ip setting will keep the existing IP ? ( if yes a script can be developed and configured in one GPO.

Thanks a lot!
0
Comment
Question by:pablito70
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 39791008
With DHCP there is no guarantee that machines will get the same IP address unless you specify reservations for IPs.
0
 
LVL 10

Expert Comment

by:Korbus
ID: 39791011
I'm not quite sure I understand your question.  I hope I'm not just stating what you already know.

You will need to specify in your DHCP reservations, both the mac address and IP address of each PC.   If you do this first, then yes, when you change the workstation to DHCP it will be assigned the same address.
0
 
LVL 25

Assisted Solution

by:Zephyr ICT
Zephyr ICT earned 50 total points
ID: 39791026
Like the other experts mentioned, you'll have to turn all the fixed IP-addresses into DHCP reservations...

There's some scripts out there on the Internet that could get you started with that if need be:

For example:

http://community.spiceworks.com/how_to/show/9060-import-dhcp-reservations-from-csv-via-powershell
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 2

Author Comment

by:pablito70
ID: 39791034
Hello, thanks for quick reply.
Reservation is the deal, but considering 800 macadresses and related IP, adding manually from DHCP snap-in will takes a long long time ... Is there a way , through netsh for example, to import data ? Of course the lan administrators already have a plain text database with AD machine names, macaddress, ip addres, vlan.

So the input file is ready ( and can be modified as per needs ).

What is missing how to import ...
0
 
LVL 14

Accepted Solution

by:
Don Thomson earned 450 total points
ID: 39791098
You may be able to do this :

(from http://social.technet.microsoft.com/Forums/en-US/0d3e7bf1-632d-46e0-926b-db8b27d041ed/2008-r2-dhcp-importing-reservations


The commandline format for specifying Reservations is as follows:

NetSh Dhcp Server [DHCP_SERVER_IP] Scope [SCOPE] Add reservedip [RESERVED_IP] [MAC] "[RES_NAME]" "[DESCRIPTION]" "[BOOTP/DHCP/BOTH]"

example:

NetSh Dhcp Server 10.1.0.1 Scope 10.1.0.0 Add reservedip 10.1.0.10 00123456789A "PC1" "PC1-2008R2" "BOTH"

 

If you add all reservations in a text file, you can run (make sure you take the NetSh bit off the line if you put it into a file):

NetSh Exec [FOLDER_LOCATION\FILE.NAME]

 

You can also extract a current DHCP configuration by running:

NetSh DHCP Server Dump > [FOLDER_LOCATION\FILE.NAME]

 

On a side note, if you want to create reservations in 2008 / R2, you need to create a scope which covers the entire range you want to use, and then add an exclusion range for addresses you dont want to be issued by DHCP
0
 
LVL 70

Expert Comment

by:KCTS
ID: 39791527
Turning the question around a little - why is necessary for all machines to retain the same IP address ?
0
 
LVL 16

Expert Comment

by:vivigatt
ID: 39792879
I am not certain that the following will work, but I think it should:
Create temporary reservations for each client and use a long enough lease time.
Once a client has received a particular IP address from DHCP, it will usually try to get the same address again and again, especially if its dhcp lease has not expired.
This way, you should be reasonably sure that the client will get the "same" IP address and yet have the flexibility of a true dhcp, without reservations.

Creating reservations can be done with netsh, but I must admit that it would be better if it could be done from the client side (since they "know" their own IP and mac address). Yet, running netsh on a client so that it adds a dhcp reservation on a remote dhcp server is not an easy thing, if even doable. You could use psexec for that, but it may have some drawbacks.
0
 
LVL 14

Expert Comment

by:Don Thomson
ID: 39794123
If you created a batch file to create each reservation it could all be run right on the server - no need to run it at each workstation.   This is assuming that you currently have a file that contains all the current IPs and MAC addresses of all your users.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question