-
-
Save ichimarusakura/883c55df10c9ecdffd2fe77a1816b167 to your computer and use it in GitHub Desktop.
批处理脚本-快速改变 IP 地址
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| echo ************************************************************************** | |
| echo * 修改IP地址、DNS * | |
| echo * * | |
| echo ************************************************************************** | |
| echo 正在修改IP地址和DNS服务器地址,请耐心等待………… | |
| echo 正在更改本机IP地址... | |
| netsh interface ipv4 set address name="本地连接" source=static addr=192.168.1.100 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0 >nul | |
| echo 正在添加本机首选DNS服务器... | |
| netsh interface ipv4 set dns name="本地连接" source=static addr=202.96.134.133 register=PRIMARY | |
| echo 正在添加备用DNS服务器... | |
| netsh interface ipv4 add dns name="本地连接" addr=202.96.128.166 | |
| echo 检查当前本机配置... | |
| ipconfig /all | |
| pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment