下面是将当前的IP地址设置成192.168.3.2 网关IP是192.168.3.1
来回切换IP比较方便
Echo off
echo settting IP
Netsh interface IP Set Addr "connect" Static 192.168.3.2 255.255.255.0 192.168.3.1 1
Echo setting DNS
Netsh interface IP Set dns "connect" Static 192.168.3.1
echo setting add DNS
Netsh interface IP add dns "connect" Static none
Echo setting DNS
Pause