笔记本由于移动原因可能一天要改几次IP设置,或者临时做什么测试也需要来回的改.每次输IP的时候都感觉要发火,早知道可以用批处理解决一下,一直没有时间找,昨天终于被我找到了,再也不用为了输入IP地址抓狂了.
下面是改成静态IP和DNS命令:
netsh interface ip set address "本地连接" static 192.9.101.106 255.255.255.0 192.9.101.1 1
netsh interface ip add dns name = "本地连接" addr = 202.101.172.35
netsh interface ip add dns name = "本地连接" addr = 202.101.172.36
下面是改成IP和DNS为自动获取:
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp
剩下的事情就是做个批处理享用吧. :) 真是太方便了