Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch/Mass DHCP Reservations Server 2003?

Status
Not open for further replies.

TechCarnivore

Technical User
Apr 13, 2006
249
US
Hi Gang,
I've got a challenge and wondered if you could help?
I'd like to take all of the systems presently issued an IP through our DHCP Server and create a reservation for each IP/System.
The thing is I've got around 60+ workstations and I don't see a way to do this without having to create individual reservations!
Is it possible to do a batch reservation through uploading or importing a certain kind of file into the DHCP Server?
We're running Windows Server 2003.
 
Absolutely. You'll want to build a script using netsh.


Here's what a script might look like:

for /f "tokens=1-4 delims=;" %%a in (reservations.txt) do (
netsh dhcp server DHCPSERVERIP scope SCOPEIP add reservedip %%a %%b %%c %%d dhcp)

The structure of the reservations.txt file might be as follows:

IPADDRESS;MACADDRESS;MACHINENAME;DESCRIPTION

Example:

192.168.67.120;013016462BD0;WORKSTATION1;WORKSTATION1


Dave Shackelford
Shackelford Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top