Solved

WIN2008 R2 clients convert from static IP to dhcp

Posted on 2014-01-18
8
343 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
8 Comments
 
LVL 70

Expert Comment

by:KCTS
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 2

Author Comment

by:pablito70
Comment Utility
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
Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

 
LVL 14

Accepted Solution

by:
Don Thomson earned 450 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now