TMBS Posted September 21, 2017 Posted September 21, 2017 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
mikemcsharry Posted September 21, 2017 Posted September 21, 2017 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?
mikemcsharry Posted September 21, 2017 Posted September 21, 2017 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!!
TMBS Posted September 21, 2017 Author Posted September 21, 2017 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!
mavhc Posted September 21, 2017 Posted September 21, 2017 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
MatthewL Posted September 21, 2017 Posted September 21, 2017 Why can you not just leave them on DHCP? Your just creating yourself more work by doing this.
mikemcsharry Posted September 21, 2017 Posted September 21, 2017 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?
AlanD Posted September 21, 2017 Posted September 21, 2017 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.
mavhc Posted September 21, 2017 Posted September 21, 2017 I've seen people used fixed addresses for assigning things per room, but it's easy enough to use AD OUs for that in 99% of cases
TMBS Posted September 22, 2017 Author Posted September 22, 2017 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...
atcoates Posted September 22, 2017 Posted September 22, 2017 You could have the bulk of the machines on DHCP and then just use reservations for office and teachers?
TMBS Posted September 22, 2017 Author Posted September 22, 2017 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
AlanD Posted September 23, 2017 Posted September 23, 2017 ...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).
mavhc Posted September 23, 2017 Posted September 23, 2017 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
QwertyMash Posted October 3, 2017 Posted October 3, 2017 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?
Davit2005 Posted October 4, 2017 Posted October 4, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now