0

I currently switch between three different networks using my laptop. One at home, my office in Sydney and my office in Hong Kong.

All three require different network settings and configurations. I am trying to find the easiest method for switching between these networks and modifying my IP settings. I am currently playing around with netsh using bat scripts but can't seem to get it right.

  • NETWORK 1 (HOME): Requires auto (DHCP) IP settings with auto-detect proxy enabled.
  • NETWORK 2 (SYD): Requires manual (static) IP settings and manual proxy configured.
  • NETWORK 3 (HK): Requires manual (static) IP settings with auto-detect proxy enabled.

I would prefer to have three separate bat files, one for each location, which will give me the desired IP configuration depending on what networking I am connecting to.

Hammo
  • 126
  • 2
  • http://superuser.com/questions/463096/change-dns-with-script/463110#463110 – Logman Aug 20 '13 at 02:31
  • Proxy setting via command line can be found [here](http://superuser.com/questions/419696/in-windows-7-how-to-change-proxy-settings-from-command-line) a couple of solutions given – 50-3 Aug 20 '13 at 02:39

1 Answers1

1

Partial answer to hopefully help with your netsh issues

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

The first part declares you want a static IP on interface Local Area Connection

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

Then the second half in order declares Interface IP, Subnetmask, Default gateway

192.168.0.2 255.255.255.0 192.168.0.1 1

And then to go back to DHCP just run the first part but select DHCP instead of Static

netsh interface ip set address name="Local Area Connection" dhcp

50-3
  • 3,939
  • 4
  • 21
  • 28