Change Windows IP settings using Netsh.exe

November 9th, 2008

တကယ္ေတာ့ Windows IP Configuration ထဲကေန Graphical User Interface ကုိ သံုးျပီး IP configuration လုပ္လုိ႔ရေပမယ့္ Command Prompt (CMD) ထဲကေန လုပ္ခ်င္ရင္ေတာ့ ဒီနည္းကို သံုးလုိ႔ရပါတယ္။ Windows 2000 နဲ႔ အထက္ စက္ေတြမွာ support လုပ္ပါတယ္။ ကၽြန္ေတာ္ စမ္းၾကည့္တာေတာ့ Permission အျပည့္မရတဲ့ စက္မွာေတာင္ ၀င္ေျပာင္းတာ ေျပာင္းလုိ႔ရပါတယ္။

netsh.exe ကုိ သံုးျပီးေတာ့ IP address ကုိ static ေျပာင္းတာ၊ DHCP ေျပာင္းတာနဲ႔ IP Configuration ကုိ export/import လုပ္နိဳင္ပါတယ္။

- How to use Netsh?

  1. Start > Run (or Press Windows Key + R)
  2. Enter CMD and press Enter

View System’s IP configuration using Netsh

The following command will show you the current system’s IP configuration which is similar to “ipconfig” tool.

netsh interface ip show config

Change IP Address using Netsh

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

The above command will change “Local Area Connection” setting as follows -

IP – 192.168.1.2
Submask – 255.255.255.0
Default Gateway – 192.168.1.1

Change the address name according to your requirement. Eg. “Wireless Network Connection” for Wireless. You can refer to ipconfig or netsh interface ip show config for interface name.

Export/Import Configuration

Following command exports the configurations to a text file called “netconfig.txt”.

netsh -c interface dump > C:\netconfig.txt

And this one import it back to network settings

netsh -c exec C:\netconfig.txt

The rest of available commands

netsh ?

Resources

Similar Posts:

  1. MyoThu
    November 12th, 2008 at 17:16 | #1

    You can change it like this.
    start>run>type cmd and press enter>type ipconfig and press enter>type ipconfig/release and press enter>type ipconfig/renew and press enter.
    That will be change ur ip adress.

  2. Rapster88
    November 12th, 2008 at 21:52 | #2

    @ Myo Thu, Yes but doing so would only change IP to a new one which is set as DHCP if I’m not mistaken. Correct me if I’m wrong..

  1. No trackbacks yet.