zoukankan      html  css  js  c++  java
  • bat 设置 IP, 清除IP

    设置本地连接IP:

    1
    2
    3
    4
    5
    6
    7
    8
    @echo off
    @echo IP Address is setting... ...
    netsh interface ip set address "本地连接" static 10.1.53.128 255.255.255.0 10.1.53.253
    @echo 【IP地址、子网掩码、网关】配置完成!
    netsh interface ip set dns "本地连接" static 61.128.114.133
    netsh interface ip add dns "本地连接" 8.8.8.8 index=2
    @echo 【DNS服务器地址】 配置完成!
    pause

    清除本地连接IP:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    echo off
    cls
    title 清除IP设置
    echo 正在清除IP地址,请稍候……
    netsh interface ip set address name="本地连接" source=dhcp
    echo 正在清除DNS设置,请稍候……
    netsh interface ip set dns name="本地连接" source=dhcp
    echo 删除IP设置,设置为自动。
    echo            ***************    恭喜你,命令成功完成!*************
    pause

    设置无线连接IP:

    1
    2
    3
    4
    5
    6
    7
    8
    @echo off
    @echo IP Address is setting... ...
    netsh interface ip set address "无线网络连接" static 192.168.11.119 255.255.255.0 192.168.11.254
    @echo 【IP地址、子网掩码、网关】配置完成!
    netsh interface ip set dns "无线网络连接" static 61.128.114.133
    netsh interface ip add dns "无线网络连接" 8.8.8.8 index=2
    @echo 【DNS服务器地址】 配置完成!
    pause

    清除无线连接IP:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    echo off
    cls
    title 清除IP设置
    echo 正在清除IP地址,请稍候……
    netsh interface ip set address name="无线网络连接" source=dhcp
    echo 正在清除DNS设置,请稍候……
    netsh interface ip set dns name="无线网络连接" source=dhcp
    echo 删除IP设置,设置为自动。
    echo            ***************    恭喜你,命令成功完成!*************
    pause










  • 相关阅读:
    spring和mybatis整合
    mybatis(二)
    Django-model基础
    用户用户组管理:用户配置文件-组信息文件
    第一章:编译程序概论
    软件包管理:脚本安装包
    软件包管理:源码包管理-源码包安装过程
    软件包管理:源码包管理-源码包与RPM包的区别
    软件包管理:yum在线管理-yum命令
    软件包管理:rpm包管理-yum在线管理-IP地址配置和网络yum源
  • 原文地址:https://www.cnblogs.com/tinypeng/p/3407905.html
Copyright © 2011-2022 走看看