Echo off
echo 手动设置IP地址....
Netsh interface IP Set Addr "本地连接" Static 172.16.255.250 255.255.255.192 172.16.255.193
echo 手动设置DNS地址....
Netsh interface IP Set dns "本地连接" static 61.139.2.69 primary
echo 手动设置备份DNS地址....
Netsh interface IP add dns "本地连接" 61.139.2.69
Echo 设置成功 您的IP为61.139.2.69,按任一键后,就可以使用内网了……
Pause
说明:
红色——IP地址 蓝色——网关 绿色——子网掩码 紫色——DNS
2.设置为自动获取IP地址.bat:
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
Pause