Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change TCP/IP properties remotely??

Status
Not open for further replies.
Jul 13, 2003
25
US
Does anyone know of a utility or a way to change my STATIC TCP/IP settings through DOS? I have an entire network where I have to change my gateway address, but all computers are static (not DHCP). I would prefer not to have to go to each machine if not needed.

Thanks.
 
netsh.exe can do this.

You use the -r switch in the command line and give the workstation name or IP.


You could also put the command in the logon script and not use the -r switch.

netsh int ip set address

Configures an IP address and a default gateway on a specified interface.

Syntax
set address [name=]InterfaceName [source=]{dhcp | static [addr=]IPAddress [mask=]SubnetMask [gateway=]{none | DefaultGateway [[gwmetric=]GatewayMetric]}}

Parameters
[name =] InterfaceName
Required. Specifies the name of the interface for which you want to configure address and gateway information. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").
[source=]{dhcp | static [addr=]IPAddress [mask=]SubnetMask [gateway=]{none | DefaultGateway [[gwmetric=]GatewayMetric]}}
Required. Specifies whether the IP address to configure originates from a Dynamic Host Configuration Protocol (DHCP) server or is static. If the address is static, IPAddress specifies the address to configure, and SubnetMask specifies the subnet mask for the IP address being configured. If the address is static, you must also specify whether you want to leave the current default gateway (if any) in place or configure one for the address. If you configure a default gateway, DefaultGateway specifies the IP address of the default gateway to be configured, and GatewayMetric specifies the metric for the default gateway to be configured.
/?
Displays help at the command prompt.


An example: netsh int ip set address source=static gateway=10.10.1.254
 
Hi

I read your replay and its suit me just fine,
but netsh.exe works only with win2k and higher.
I have a mix network.
do you know of another tool, like netsh.exe,
that does the same thing (change the default gateway)
for windows 95 and windows 98 ?

Thanks
Limor
 
I really do not, in part because the Win9x family does not use the registry the way the latter OS versions do for TCP/IP properties. In fact, there is little in the registry for these setting under Win9x.

You might ask in the Win9x forums.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top