Windows通过CMD设置ip

设置指定的ip

转载请注明出处:http://blog.csdn.net/xiaowu_zhu/article/details/78315332

  • 设置ip

    netsh interface ip set address name ="本地连接" source= static 192.168.0.5 255.255.255.0 192.168.0.1
    
  • 设置dns

    netsh interface ip set dnsservers name ="本地连接" source= static  addr = 8.8.8.8
    

设置自动获取ip

  • 设置ip

    netsh interface ip set address name="本地连接" source= dhcp
    
  • 设置dns

    netsh interface ip set dnsservers name="本地连接" source=dhcp
    

你可能感兴趣的:(windows)