您的位置首页百科知识

快速设置与切换IP地址

快速设置与切换IP地址

的有关信息介绍如下:

快速设置与切换IP地址

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

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

先是本地连接的【开启】与【关闭】设置

新建两个TXT文本,输入以下命令,打开本地连接用enabled,关闭用disabled两个二选一,输入后将txt后缀修改为BAT

netsh interface set interface 本地连接 enabled

netsh interface set interface 本地连接 disabled

下面设置动态IP,自动获茄宋注取IP

netsh interface ip set address 本地连接 dhcp

静态IP设置方法

实例:设置IP为192.168.0.62

子网掩码:255.255.255.0

网关:192.168.0.100

DNS:192.168.0.1 备用DNS:192.168.0.2

netsh interface ip set address 本地连接 static 192.168.0.62 255.255.255.0 192.168.0.100

netsh interface ip set dns 本地连接 static 192.168.0.1

netsh interface ip add dns 本地连接 192.168.0.2 index=2

可以多设置几个类似的静态IP批处理文件就可以根据情况自由切换了