netsh interface ip
set
address name
=
"
本地连接
"
source
=
static addr
=
我的ip mask
=
255.255
.
255.0
netsh interface ip set address name = " 本地连接 " gateway = 网 关 gwmetric = 1
netsh interface ip set address name = " 本地连接 " gateway = 网 关 gwmetric = 1
其中name后面的“本地连接”是根据连接的名字决定的。
写在一个.bat文件中,双击就可以执行。在弄个launchy,执行起来就更加方便了: )