设置网络ip,dns,gateway脚本

taianxiaojia 2012-10-22

指定ipbat

netsh interface ipv4 set address name="无线网络连接" source=static address=192.168.17.168 mask=255.255.255.0 gateway=192.168.17.1
netsh interface ipv4 set dnsservers name="无线网络连接" source=static address=211.98.2.4 register=primary
pause

动态ipbat

netsh interface ipv4 set address name="无线网络连接" source=dhcp mask=255.255.255.0 gateway=192.168.1.1
netsh interface ipv4 set dnsservers name="无线网络连接" source=dhcp register=primary
pause

相关推荐