通过批处理文件设置IP

//指定IP
netsh interface ip set address "本地连接" static 10.4.127.160 255.255.248.0 10.4.120.1

netsh interface IP set dns "本地连接" static addr=210.83.210.155
netsh interface IP add dns "本地连接" addr=202.107.117.11

//自动获取IP
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp

猜你喜欢

转载自huiwolf007.iteye.com/blog/891329