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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Users moving to new subnet

Status
Not open for further replies.

acl03

MIS
Jun 13, 2005
1,077
US
My company does not use DHCP - all IPs are hardcoded (a problem i have no authority to solve). We have 300 users moving from one location to another, and their IP addresses will need to be changed to one in a different subnet.

I will have a one-to-one mapping of IP addresses (old-->new).

My thought was to write a script that will add the new IP Address to their NIC before-hand, giving them 2 IPs at once. The script works with no problem, yet if I put the "new" IP first in the list, I get no connectivity to anything outside our building. If I put their current IP first, everything works, but that tells me they won't have connectivity when they move without making the new one first (and removing the old one).

Any thoughts/ideas? Thanks.

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
First, I would try to convince management to implement DHCP... makes life SO much easier... barring that, explain to them that you will have to spend a lot of time and money walking around to every machine and it may take a while. Personally, I can't imagine not using DHCP as it's such a simple process to install and use...

Walt
IT Consulting for Robert Half
 
Let me amend my post:

I KNOW dhcp makes this easier, but there is NO way it's going to happen. :)



Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
Just a thought...could you do the following (???):

1) Create a secondary local admin account on each of the PCs to be deleted once the move is complete.
2) Write a script (batch, vb, whatever) that sets the IP details and place it on the desktop.
3) When the computers move, get the customer to log into the secondary admin account and run the script, thus setting their network settings correct
4) Once all the computers are in there new location and working on the network, remotely delete the script and secondary admin account
 
Would a Scheduled Task set to execute your script triggering the day of the move work? Of course you'd have to guard aginst the possiblity of the move being delayed.
 
Well users will be moving on various days.....otherwise a scheduled task could work.

Our users are admins on their PCs, so we wouldn't need the secondary admin account. Maybe just putting the icon on the desktop is the best way. Hate to not have it fully automated...but what can you do...

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
You should find another job or quit them if you're a consultant. That's like living in 1992. I feel really sorry for you. They must be stupid or luddites.

What EXACTLY is wrong that they won't listen to your advice (since theoretically you are their valued consultant or source of knowledge) and think about DHCP?

Then again, if you get paid by the hour..... $$$$$$$
 
I've never known any large organization to use DHCP. Almost every large organization (500+ users) I've worked for uses static addresses
 
>I've never known any large organization to use DHCP

Prepare to have your world changed: my current company is 65,000+ world-wide. We use DHCP extensively. And the company (a bank) I worked at before that was over 700 in the UK, and it also used DHCP extensively.

There, now you'll never be able to say that again ...
 
Umm... Wow. Generally, everyone from home users with a router to SOHO to large companies use DHCP for MOST workstations.

They do however NOT use DHCP (or they use DHCP reservations) for things like servers, printers, routers, switches and some workstations.

I used to do it like this:
Assuming class C subnet

---------------Static addresses--------------------
192.168.X.1 - 10 routers & managed switches
192.168.X.11 - 20 servers
192.168.X.21 - 30 printers
--------------- DHCP ---------------------------
192.168.X.31 - 254 workstations
 
I had a feeling this would spark a debate on DHCP. I work for a small section of my company, and our move will not prompt and enterprise-wide change to DHCP, no matter how much it makes sense.




Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
So is there any way to give a PC two IP addresses, and have the user get a connection on either one?

My original thought was that if at least one of the IPs in the list was valid, the user would connect. I guess I was wrong....is there any way to do it that way, or have it "fail over" to a valid IP?

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
Does the IP Address change or the subnet mask?

MCITP:EA/SA, MCSE, MCSA, MCDBA, MCTS, MCP+I, MCP
 
I do not have to deal with users on this scale, we only have about 40+ workstations and CNC machines so if this is silly, just ignore.

But if I was in your case, I would take something like an Autoit script and have it run on Startup and pause for 1 minute as the network services load, ping in the background with no echo, when the first ping fails, run an attached script to change the IP to whatever you need.

Maybe Im thinking small potatoes here but it is just a thought.

Learning - A never ending quest for knowledge usually attained by being thrown in a situation and told to fix it NOW.
 
You could do it with a HTA, requires user intervention


or look at a running a vbscript that read a text file with the computers names and assigns them an IP address.

OR
for example this script from the scripting guy changes the first two octets, so they keep there same IP in essence but again is the IP changing or the subnet mask.OR both

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colNetAdapters = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled=True")

arrSubnetMask = Array("255.255.255.0")

For Each objNetAdapter in colNetAdapters
For Each strAddress in objNetAdapter.IPAddress
arrOctets = Split(strAddress, ".")
If arrOctets(0) = "10" and arrOctets(1) = "10" Then
strNewAddress = "192.168." & arrOctets(2) & "." & arrOctets(3)
arrIPAddress = Array(strNewAddress)
errEnable = objNetAdapter.EnableStatic(arrIPAddress, arrSubnetMask)
End If
Next
Next




MCITP:EA/SA, MCSE, MCSA, MCDBA, MCTS, MCP+I, MCP
 
I already have a script written that has a hash object in it to do the lookups. it reads their current IP, does the lookup, and adds the second as a secondary IP. I could easily change this script to replace the IP with the new one, not add. I may try to write the script that, each time they run it, it will swap back and forth between old and new IP, that way if they click it before they move (they WILL), they can click again to change it back.

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
Can you have a login script that waits for networking to start, pings a server, and if no connectivity is found, "swaps" IP addresses?
 
We have static IPs here with only around 60 users. When a user with a laptop needs to go to different locations and change their IP address, we use a little program called Winips IP Address Changer. You can add several IPs to a list, give them names, and the user can choose which one they need. We just name the IPs after their location, and it works well for us.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top