在实验室和寝室上网,要使用不同的ip,每次都改下太麻烦了,写了2个bat文件修改。
@ echo off echo 设置422ip地址 set addr=10.214.25.81 set mask=255.255.255.0 set gway=10.214.25.1 set dns1=10.10.0.21 echo ------------------------------ echo ip=%addr% echo mask=%mask% echo gateway=%gway% echo dns=%dns1% netsh interface ip set address "本地连接" static addr=%addr% mask=%mask% gateway=%gway% 1 netsh interface ip set dns "本地连接" static 10.10.0.21 echo ip设置完成 pause>nul
@ echo off echo 设置190ip地址 set addr=222.205.059.084 set mask=255.255.255.0 set gway=222.205.059.1 set dns1=10.10.0.21 echo ------------------------------ echo ip=%addr% echo mask=%mask% echo gateway=%gway% echo dns=%dns1% netsh interface ip set address "本地连接" static addr=%addr% mask=%mask% gateway=%gway% 1 netsh interface ip set dns "本地连接" static 10.10.0.21 echo ip设置完成 pause>nul