Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-00459// Views: AA-00459// Created: 2009-05-13 05:00:00// Last Updated: 2020-04-16 22:54:27
Third-Party Products
Useful Batch scripts for setting and checking IP address of HOST PC


Question

How can I easily enter ipconfig command from command prompt (cmd.exe)? How can I easily change the IP address of the HOST PC without going into Ethernet configuration settings?

Answer

Use and modify attached batch scripts for your HOST PC and desired IP address:

  IP reset.bat

This is the command that is used to reset the IP address of HOST PC:

netsh int ip set address "local area connection" static 192.168.10.101 255.255.255.0

Change IP address to desired and so that subnet matches that of your Target computer (ex: 192.168.1.xxx).

Change IP address and DNS servers using the command prompt

We will change the IP address and DNS servers using the built-in utility in Windows called “Netsh”? is a nifty utility to change system networking settings, locally or remotely. To run Netsh click on start then RUN and type CMD press ENTER.

When the command prompt comes up type Netsh, now you should be ready to execute commands. Simple huh. Just to warm up type “interface ip show config“? that will show up the TCP/IP network settings.

Now, how you change the IP address and Default Gateway settings? To change the Local Area Connection TCP/IP settings type the following command:

interface ip set address name=”Local Area Connection” static 192.168.10.42 255.255.255.0 192.168.1.1

Netsh IP address change

As you can see, when you use Netsh you need to specify what network properties you need to change, in the example above, we changed the network properties for “Local Area Connection”? then we setup a static IP address, Subnet Mask and at the end the default gateway.

Changing the DNS IP address is almost identical as the procedure above, type the following command on the Netsh prompt:

interface ip set dns “Local Area Connection” static 192.168.1.1

To Setup WINS, type the following command:

interface ip set wins “Local Area Connection” static 192.168.1.1

To set the network properties to obtain the IP address from a DHCP server, type the following command:

interface ip set address “Local Area Connection” dhcp

To set DNS to obtain IP address automatically type the following:

netsh interface ip set dns “Local Area Connection” dhcp

There you have it, a useful tool to help you on your network configuration.

http://helpdeskgeek.com/networking/change-ip-address-and-dns-servers-using-the-command-prompt/

http://samanathon.com/set-your-ip-address-via-batch-file/

IP_AUTO.bat_.txt 86 b 86 b
IP_config.bat_.txt 25 b 25 b
IP_reset.bat_.txt 84 b 84 b