• 搜索
  • 夜间模式
    ©2015-2025  Ethan's Blog Theme by OneBlog
    搜索
    标签
    # Amule # Gargoyle # LUCI # VIM # Python # Nginx # 反代 # Ansible # Apache # LNMP
  • 首页>
  • Windows>
  • 正文
  • 脚本快速设置windowsIP地址

    2019年07月18日 24 阅读 0 评论 857 字

    提前修改脚本版

    echo offclstitle 设置IPrncecho 正在设置IP地址,请稍候……
    set "network=172.16.1"
    set /p ip=输入主机地址然后回车:
    
    netsh interface ip set address "Ethernet" static %network%.%ip% 255.255.255.0 %network%.1 1
    
    echo 正在更改DNS设置,请稍候……
    
    netsh interface ip set dns "Ethernet" static 8.8.8.8 primary 
    
    netsh interface ip add dns name = "Ethernet" addr=114.114.114.114
    
    echo ******修改完成!******pause

    手动设置网段及主机版本

    echo offclstitle 设置IPrncecho 正在设置IP地址,请稍候……
    set /p network=输入网络地址然后回车:
    set /p ip=输入主机地址然后回车:
    
    netsh interface ip set address "Ethernet" static %network%.%ip% 255.255.255.0 %network%.1 1
    
    echo 正在更改DNS设置,请稍候……
    
    netsh interface ip set dns "Ethernet" static 8.8.8.8 primary 
    
    netsh interface ip add dns name = "Ethernet" addr=114.114.114.114
    
    echo ******修改完成!******pause

    手动设置网段、网关、主机地址及DNS版本,在第二个版本基础上修改一下即可

    本文著作权归作者 [ Ethan ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。
    — END —
    Copyright©2015-2025  All Rights Reserved.  Load:0.005 s
    Theme by OneBlog V3.6.3
    夜间模式

    开源不易,请尊重作者版权,保留基本的版权信息。