Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love this site! It's so nice to know that there are so many people out there who are willing to share their knowledge..."

Geography

Where in the world do Tek-Tips members come from?
acl03 (MIS)
29 May 12 15:27
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!

NESWalt (Programmer)
29 May 12 15:53
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
http://roberthalftechnology.com

acl03 (MIS)
29 May 12 15:57
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!

tootiredtocare (TechnicalUser)
29 May 12 19:37
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
Freestone (MIS)
31 May 12 11:32
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.
acl03 (MIS)
1 Jun 12 8:20
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!

goombawaho (MIS)
1 Jun 12 8:53
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..... $$$$$$$
xwb (Programmer)
3 Jun 12 13:32
I've never known any large organization to use DHCP. Almost every large organization (500+ users) I've worked for uses static addresses
strongm (MIS)
3 Jun 12 20:02
>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 ...
goombawaho (MIS)
4 Jun 12 7:54
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
acl03 (MIS)
4 Jun 12 9:21
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!

acl03 (MIS)
4 Jun 12 10:12
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!

GrimR (IS/IT--Management)
4 Jun 12 10:24
Does the IP Address change or the subnet mask?

MCITP:EA/SA, MCSE, MCSA, MCDBA, MCTS, MCP+I, MCP

DrB0b (IS/IT--Management)
4 Jun 12 10:32
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.

GrimR (IS/IT--Management)
4 Jun 12 10:48
You could do it with a HTA, requires user intervention

http://blogs.technet.com/b/deploymentguys/archive/2009/03/26/sharing-some-simple-htas.aspx
https://skydrive.live.com/?cid=8167344592f7bd22&sc=documents&id=8167344592F7BD22!619

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

acl03 (MIS)
4 Jun 12 14:36
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!

guitarzan (Programmer)
4 Jun 12 15:06
Can you have a login script that waits for networking to start, pings a server, and if no connectivity is found, "swaps" IP addresses?
ponoodle (IS/IT--Management)
5 Jun 12 15:36
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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close