美文网首页
网卡设置

网卡设置

作者: bylinx | 来源:发表于2017-02-14 10:40 被阅读0次

@echo off

echo -----------------------------------------------

echo 网络切换操作

:Step1

echo -----------------------------------------------

echo 请选择:

set /p choice=1、静态IP    2、动态获取    3、退出 :

:Step1_Next

if %choice%==1 goto network1

if %choice%==2 goto network2

if %choice%==3 goto end

else goto end

:network1

netsh interface ip set address name="本地链接" static 192.168.1.55 255.255.255.0 192.168.1.1 >nul

netsh interface ip add dns "本地链接" 202.98.96.68 index=1 >nul

netsh interface ip add dns "本地链接" 61.139.2.69 index=2 >nul

goto setend

:network2

netsh interface ip set address name="本地链接" source=dhcp >nul

netsh interface ip set dns name="本地链接" source=dhcp >nul

goto setend

:setend

echo IP地址已经设定修改完毕,按任意键关闭此窗口

pause >nul

:end

相关文章

网友评论

      本文标题:网卡设置

      本文链接:https://www.haomeiwen.com/subject/qnrxwttx.html