Jump to content

Recommended Posts

Posted

Hi

 

Is it possible to bulk change the IP addresses of 150+ computers? We've just changed 150 computers and prior to the change they had a reserved IP address in a set range. Obviously since rebuilding they've picked up a random IP.

 

I don't fancy changing them manually. Is there a script I can use to do this? Or any other way?

 

Thanks

Tracey

Posted

Hi Tracey

How were the reservations managed previously? In a lot of cases IP reservations are based on the MAC address of the device, which is burnt in to the network card. Have you changed out your PCs or rebuilt them?

If you have changed them out then you have 150 new MAC addresses so if your previous reservations were on MAC then the answer (if there is one!!) will be different from a rebuild with existing network cards.

What devices do you have / did you have?

Posted

The info that follows may help for windows

At a command prompt getmac will return the mac address of your card

Are all your devices named?

if so then using wmac with something like this

 

echo %USERNAME%>%USERPROFILE%\desktop\%COMPUTERNAME%.txtwmic bios get serialnumber>>%USERPROFILE%\desktop\%COMPUTERNAME%.txt

 

might generate the type of info tht you'll need to build up a new distribution

 

Herding cats is also supposed to be good fun!!

Posted

Hi Mike

 

The reservations were managed in DHCP and linked to their MAC address. We have changed out our PCs and so they have different MAC addresses and some have been renamed too.

 

We used to have HP ProDesk 400 G3 and have replaced with a mixture of HP Prodesk 400 G4 and Lenovo ThinkCentre M700.

 

Thanks

 

P.S. I think you used to teach my son football!

Posted

Assuming this is Windows, next question: do you have a list of which MAC addresses want what IPs? I try to record them as they're removed from the boxes, hopefully they're listed as a bar code on the box/case so I can just scan them into my spreadsheet as they're being installed and asset tagged.

 

Scripting out DHCP reservations in Windows Server 2008 with Netsh - TechRepublic

 

https://blogs.technet.microsoft.com/teamdhcp/2012/11/20/bulk-load-dhcp-reservations-using-dhcp-powershell/

 

https://gallery.technet.microsoft.com/scriptcenter/Import-DHCP-reservations-65cf523a

Posted

I think you need to explain how and why the IP addresses are what they are and why you want to change them.

 

We used to use fixed IP addresses assigned in geographic locations through the school - I thought it was useful to know where a PC was from its IP address. But then I decided to go for DHCP leased addresses and so IP addresses are seen to change after a period of inactivity over the summer. Once when we went through a server change we built a new network using different leased addresses because we wanted to change the scope.

 

I still use fixed IP addresses for switches - just in case they can't see the DHCP server for some reason....and for servers.

 

And I assign IP addresses to MAC addresses via DHCP for Access points (because of Radius configurations), printers and projectors.

Posted
We use it so that all the classroom PCs have a certain range, the offices a different one, as you said it was useful to know where a PC was from. I think it's going to be a bit of a nightmare to get it back to what it was though...
Posted
Hi Tracy

Football .. that'd be Barney methinks.

me - teach?? Most of that lot knew more than me :), I just organised.

Did any of the ideas here help you?

 

Yes the lovely Barney, who has luckily calmed down a tad!

 

I need to read some of the links but I don't think there will be a quick method!

 

Thanks for the advice though :D

Posted
...well...you could set them to DHCP (is that what they are set to now...and just coming up with some random 169. address because they are not connected to network)....let them connect to DHCP....then use the DHCP management to switch their addresses to "fixed"/reserved ones. Then go through that list looking at the name of the computer (assuming you have a naming convention that tells you where it is) and change the reservation IP (it would save visiting each computer...albeit perhaps via remote desktop).
Posted
Connect them all, open the MMC, export the list into a spreadsheet, use that to generate a list of commands for the server to assign them static IPs, as you'll have the MAC and the DNS name
  • 2 weeks later...
Posted
We use it so that all the classroom PCs have a certain range, the offices a different one, as you said it was useful to know where a PC was from. I think it's going to be a bit of a nightmare to get it back to what it was though...

 

Could you not just use VLANs with different DHCP scopes?

Posted

Set Reservations on the DHCP server. Trying to manage even a small number of Static addresses is a nightmare as you have realized.

 

At least with reservations you have a central record of what IP address is allocated.

 

Also gives you the possibility of doing other things in future like WoL etc. as you have a record of the MAC addresses of the PC's you want to start up.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...