Solved

Per-user IP configuration on Windows XP

Posted on 2008-09-30
5
944 Views
Last Modified: 2013-11-05
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
0
Comment
Question by:nicolasn
  • 3
5 Comments
 
LVL 14

Expert Comment

by:igor-1965
Comment Utility
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
 
LVL 8

Accepted Solution

by:
Seth_zin earned 125 total points
Comment Utility
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
 
LVL 1

Author Comment

by:nicolasn
Comment Utility
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
 
LVL 1

Author Comment

by:nicolasn
Comment Utility
Sorry to keep you waiting.  I'm still trying to get a chance to experiment properly with the suggested solutions.

Thanks,
Nicolas
0
 
LVL 1

Author Closing Comment

by:nicolasn
Comment Utility
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

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now