1. 设置动态ip
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dnsservers "本地连接" dhcp2. 设置静态ip
netsh interface ip set address name="本地连接" source=static addr=218.193.xxx.xxx mask=255.255.255.0 gateway=218.193.xxx.254
netsh interface ip set dnsservers "本地连接" static 202.120.x.xxx
保存成.bat文件,用管理员权限运行。
本文提供了一种方法,通过使用命令行工具netsh来设置计算机的网络配置,包括动态IP和静态IP地址。通过创建.bat文件并以管理员权限运行,可以简化网络配置过程。

被折叠的 条评论
为什么被折叠?



