Its all about blogging !

Welcome To Bloggy Time--Search The Blog--Explore--Share

4 February 2018

Change or Configure Windows IP address from Command Prompt

Its very easy to change ip address of Windows from Control Panel or by typing ncpa.cpl in run
But you can also change or configure your ip address from command prompt.You are going to need admin privileges to do this.

Go to windows search and type CMD
Right click on CMD and select Run As Administrator --> Yes



Now you are in command prompt mode. Follow below commands to change or configure ip address.

To view you ip configuration :

netsh interface ipv4 show config
To change or configure static ip address :

netsh interface ipv4 set address name="YOUR INTERFACE NAME" static IP_ADDRESS SUBNET_MASK GATEWAY
Example :-
netsh interface ipv4 set address name="Local Area Connection" static 192.168.1.8 255.255.255.0 192.168.3.1



To configure as DHCP :

netsh interface ipv4 set address name=”YOUR INTERFACE NAME” source=dhcp
To change your DNS :

netsh interface ipv4 set dns name="YOUR INTERFACE NAME" static DNS_SERVER
Example :-
netsh interface ipv4 set dns name="Local Area Connection" static 8.8.8.8

To change secondary DNS :

netsh interface ipv4 set dns name="YOUR INTERFACE NAME" static DNS_SERVER index=2
Example :-
netsh interface ipv4 set dns name="Local Area Connection" static 8.8.8.8 index2

To configure automatic DNS :

netsh interface ipv4 set dnsservers name"YOUR INTERFACE NAME" source=dhcp
Interface name is different in Windows 7 & Windows 8/10. You can check interface name from cmd by typing netsh interface ipv4 show config ( Check above image)


Thats all..

Popular Posts