Sep 9, 2015

Changing IP Config By Signle CMD


Here i will show u how to use CMD(command line prompt) to change your device network configuration
(ip, Subnet mask, Default gateway, primary and secondary DNS servers, Wins )
 





From Dynamic [DHCP Configuration] to static ips and vice versa using[NTSH] built in windows utility





I - Changing from dynamic to static IPS

====================================

1- first thing is to check the current network configuration either static or dynamic using cmd


>netsh interface ip show config




2- changing (ip, subnetmask and default gateway) using cmd


>netsh interface ip set address name="" static

ex:
netsh interface ip set address name="Local Area Connection" static 192.168.1.200 255.255.255.0 192.168.1.1




3- changing (primary DNS Server) using cmd


>netsh interface ip set dns name="" static  

ex:
>netsh interface ip set dns name="Local Area Connection" static 192.168.1.1




4- changing (secondary DNS Server) using cmd


>netsh interface ip add dns name="" index=2

ex:
>netsh interface ip add dns name="Local Area Connection" 192.168.1.1 index=2




5- changing (WINS) using cmd


>netsh interface ip set wins name="" static  

ex:
netsh interface ip set address name="Local Area Connection" static 192.168.1.200 255.255.255.0 192.168.1.1



**********************************************************************


II - Changing from Static To dynamic
============================


1- changing (ip, subnetmask and default gateway) using cmd


>netsh interface ip set address name="" dhcp
ex:
>netsh interface ip set address name="Local Area Connection" dhcp




2- changing (DNS Server) using cmd


>netsh interface ip set dns name="" dhcp

ex:
>netsh interface ip set dns name="Local Area Connection" dhcp







No comments:

Post a Comment