用批处理实现本地连接的IP地址在自动和固定之间切换来自(最好固定IP地址有几个,冲突可以自动更换)

亚星管理平台 139 1

以下是自动获取的代码,存为.bat格式即可

netsh interface ip set address name="本地连接" source=dhcp

ipconfig /flushdns

以下是手动指定ip的代码

netsh interface ip delete dns "本地连接" addr=all

netsh i练怎况行北nterface ip 阻满add dns "本地连速油接" addr=202.102.3.141

netsh interface ip add dns "本地连接" addr=202.102.3.144

netsh interface ip add address 算四复宁争育验操"本地连接" 10.0.1.2王草妈浓达众容故阻0 255.255.0.0

netsh interface ip add address "本地连接" gateway=10.0.1.1 gwmetric=2

ipconfig /flu破毫古层其shdns

上面应该看得懂的八

dns和ip和网关 别填错了

标签: 固定 地址 自动 批处理 切换

抱歉,评论功能暂时关闭!