Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a developer. I need to have a static IP adress when I'm at my office, and would like to use my DHCP at home.

Making a reservation on the office's DHCP isn't possible (the router they have doesn't allow that).

I've looked up through Google to see if there is something that could suit my needs but haven't found any (Maybe it's because I don't know the name of the technology I'm looking for).

So my question is: Is there a way to automaticly switch from a static address to a dynamic depending on the network?

share|improve this question
If you're a developer, why don't you write your own command to detect it when Windows logs in? – Dave Aug 27 '13 at 7:48
up vote 3 down vote accepted

You must change IP manually or by a batch script. You can also write a program that changes IP depend on network

netsh interface ip set address name="Local Area Connection" static 1

netsh interface ip set address "Local Area Connection" dhcp
share|improve this answer
All you need to do is have the script ran when at login time, easily achieved via task scheduler. I removed the "No" from your answer. + 1 – Dave Aug 27 '13 at 7:38
A startup script is good but not everyone shuts down/logs off their computer when going home, so maybe sometimes the IP doesn't change correctly, in that case maybe running the script manually is needed. But the best solution is that he writes his own IP changing program – Lưu Vĩnh Phúc Aug 27 '13 at 8:43
But you can fire it at log on (or start up as you point out), even on a workstation un-lock! :) – Dave Aug 27 '13 at 8:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .