0

I'm having a little crisis every time I have to change the gateway in order to access different sites from my workplace. It's time consuming and I'd be really glad if someone provides me with a script that would change the Default Gateway address as well as DNS address automatically by clicking a .bat file.

  • There are two Default Gateway addresses : 10.10.23.236 & 10.10.23.1 (I need to switch between these two gateways constantly and it's really getting time consuming)
  • DNS Server addresses are : Primary - 10.1.0.40, Alt - 10.1.0.50 Primary - 203.115.0.246, Alt - 203.115.0.247
1
  • What version of Windows? Commented May 20, 2014 at 3:55

1 Answer 1

1

Take a look at the netsh command:

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

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

change the values to what you need.

You must log in to answer this question.

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