@echo off echo This is the begin.. echo Set IP Address.. netsh interface ip set address name="本地连接" source=static addr=192.168.0.2 mask=255.255.255.0 rem 设置本地连接的ip地址为:192.168.0.22,子网掩码为:255.255.255.0 echo set Mask and Gateway.. netsh interface ip set address name="本地连接" gateway=192.168.0.1 gwmetric=0 rem 设置网关 netsh interface ip set dns name="本地连接" source=static addr=202.102.154.33 register=PRIMARY echo set First DNS rem 设置主dns netsh interface ip add dns name="本地连接" addr=202.102.134.68 echo set Second DNS rem 设置备份dns netsh interface ip set wins name="本地连接" source=static addr=none rem 设置wins echo This is the ending..