快速设置与切换IP地址

软件发布|下载排行|最新软件

当前位置:首页IT学院IT百科

快速设置与切换IP地址

  2022-11-02 我要评论

对于需要经常设置IP与重复切换网卡的用户来说,一步一步到本地连接设置项太过麻烦,用批处理来做是个不错的选择

操作方法

  • 01

    首先查看需要设置的本地连接名称,如果网卡只有一个一般为【本地连接】

  • 02

    先是本地连接的【开启】与【关闭】设置新建两个TXT文本,输入以下命令,打开本地连接用enabled,关闭用disabled两个二选一,输入后将txt后缀修改为BATnetsh interface set interface 本地连接 enablednetsh interface set interface 本地连接 disabled

  • 03

    下面设置动态IP,自动获取IPnetsh interface ip set address 本地连接 dhcp

  • 04

    静态IP设置方法实例:设置IP为192.168.0.62子网掩码:255.255.255.0网关:192.168.0.100DNS:192.168.0.1 备用DNS:192.168.0.2netsh interface ip set address 本地连接 static 192.168.0.62 255.255.255.0 192.168.0.100netsh interface ip set dns 本地连接 static 192.168.0.1netsh interface ip add dns 本地连接 192.168.0.2 index=2可以多设置几个类似的静态IP批处理文件就可以根据情况自由切换了

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们