Per-user IP configuration on Windows XP

I use a laptop computer to program various network hardware devices.  Each device has it's own default IP address scheme and progamming software.  Each time I need to work with a certain device, I have to reconfigure my TCP/IP settings.

What I would like to set up, is to be able to create seperate Windows logins for each type of device, with the laptop's IP address being automatically set to the correct configuration for that type of device, and with the programming software shortcuts on the desktop.

For a hypothetical example, I should just be able to login as the user "Siemens", and then my IP address is set to 192.168.1.100 or login as "Rockwell" and have my IP address as 10.1.1.1

I know network settings are supposed to be per machine, but I was wondering there was a better way than continuously manually changing settings.  I'd hoped to find something in the local user policies, but no luck.  Perhaps it will have to be a login script?

Thanks in advance

Nicolas
LVL 1
nicolasnAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Seth_zinConnect With a Mentor Commented:
You could setup a bat file on each of the accounts (or all on one account if you prefer and just make folders for the different shortcuts, save you some time) to do it for you. Then all you do is double click a bat file when you log into that account.

You said you are advanced on this subject so I won't waste your time, here is a quick set of what you need to type into the bat file .
--To Set IP/Subnet mask/gateway/metric enter the following command:
netsh interface ip set address "Local Area Connection" static IPADDRESS SUBNET GATEWAY 1

--To set dns/secondarydns enter the following commands:
netsh interface ip set dns "Local Area Connection" source=static DNSADDRESS
netsh interface ip add dns name="Local Area Connection" SECONDARYDNS index=2

For anyone who reads this and wants a little more info and a link to a site with other netsh commands read below:
Use the netsh command and make it look something like this:
To change the IP/Subnet/default gateway use
netsh interface ip set address "Local Area Connection" static IPADDRESS SUBNET GATEWAY 1
(Notice the 1 at the end after gateway. it is the "metric". According to some sites you don't need to add that, but if I didn't, it wouldn't work so I changed it to 1 and it worked fine).

Next you you change your DNS (if needed) to do that add something like:
netsh interface ip set dns "Local Area Connection" source=static DNSADDRESS
netsh interface ip add dns name="Local Area Connection" SECONDARYDNS index=2

Notice again one says source=static, if I didn't include that it didn't work but when adding the secondary (using the add command) it didnt work with it lol. Don't know why but the above way is how I tested it on XP Pro SP3 (I imagine it works on 2000 and vista too but I'm not positive).

If you want more information check out http://windowsitpro.com/article/articleid/41111/cool-things-to-do-with-netsh.html Scroll down to the comment section and you will see a post for "The commands in the article need to be corrected as follows" then he list them all. I tested those and they all seem to work. It also has dhcp setup etc. Hope that helps, I see a lot of people that come to work on the machine at our shop here use a bat file like above.
0
 
igor-1965Commented:
What you need is a network profile switcher (just google that). There are quite a lot of shareware programs. Here is free for non-commercial use: http://www.netsetman.com/index.php?s=nsm
0
 
nicolasnAuthor Commented:
Hi Seth_zin,

I like the sound of your suggestions.  This could possibly even be combined with a login script if desired.

Give me a day or two to test it out.

Thanks,
Nicolas
0
 
nicolasnAuthor Commented:
Sorry to keep you waiting.  I'm still trying to get a chance to experiment properly with the suggested solutions.

Thanks,
Nicolas
0
 
nicolasnAuthor Commented:
Tested and working.  This technique can be used from a batch file with a shortcut on the desktop, or run when I log in.

Thanks for your effort,
Nicolas
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.