Command IV…..Configure your IP.

start configuring your computer IP from command…….Its really fun to do something manually rather then we do with using GUI.

 netsh interface ip show config

With Netsh.exe, you can easily configure your computer’s IP address and other TCP/IP related settings. For example:

The following command configures the interface named Local Area Connection with the static IP address 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:

netsh interface ip set address name=”Local Area Connection” static 192.168.0.100 255.255.255.0 192.168.0.1 1

Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.

First, connect your portable computer to location #1, and then manually configure the required settings (such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses).

Now, you need to export your current IP settings to a text file. Use the following command:

When you reach location #2, do the same thing, only keep the new settings to a different file:

You can go on with any other location you may need, but we’ll keep it simple and only use 2 examples.

Now, whenever you need to quickly import your IP settings and change them between location #1 and location #2, just enter the following command in a Command Prompt window (CMD.EXE):

or

and so on.

You can also use the global EXEC switch instead of -F:

Netsh.exe can also be used to configure your NIC to automatically obtain an IP address from a DHCP server:

Would you like to configure DNS and WINS addresses from the Command Prompt? You can. See this example for DNS:

and this one for WINS:

Or, if you want, you can configure your NIC to dynamically obtain it’s DNS settings:

BTW, if you want to set a primary and secondary DNS address, add index=1 and index=2 respectively to the lines of Netsh command.

As you now see, Netsh.exe has many features you might find useful, and that goes beyond saying even without looking into the other valuable options that exist in the command.

Enjoy playing with ur Command.

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.