zoukankan      html  css  js  c++  java
  • 更改ip地址

    ip

    @echo off
    
    :start
    
    echo ============请输入数字选择下一步操作:
    
    echo ============1:ip设置为192.168.1.101
    
    echo ============2:ip设置为192.168.1.102
    
    echo ============3:设置为DHCP自动获取ip
    
    set /P var=":"
    
    if %var%==1 goto ip101
    
    if %var%==2 goto ip102
    
    if %var%==3 goto ipdhcp
    :ip101
    
    cls
    netsh interface ip set address "本地连接" static 192.168.1.101 255.255.255.0 192.168.1.1
    netsh interface ip set dns "本地连接" static 114.114.114.114 primary
    netsh interface ip add dns "本地连接" 8.8.8.8
    echo **IP设置为192.168.1.101,设置成功**
    echo ------------------------------------------
    
    goto start
    :ip102
    
    cls
    netsh interface ip set address "本地连接" static 192.168.1.102 255.255.255.0 192.168.1.1
    netsh interface ip set dns "本地连接" static 114.114.114.114 primary
    netsh interface ip add dns "本地连接" 8.8.8.8
    echo **IP设置为192.168.1.102,设置成功**
    echo ------------------------------------------
    
    goto start
    :ipdhcp
    
    cls
    
    netsh interface ip set address name="本地连接" source=dhcp
    
    netsh interface ip delete dns "本地连接" all
    
    ipconfig /flushdns
    
    echo **IP设置为DHCP获取,设置成功**
    echo ------------------------------------------
    
    goto start
    

      参考链接

  • 相关阅读:
    AIX系统/var/adm/wtmp大文件处理
    script & scriptreplay
    Ubuntu/Debianpxe/isopreseed
    Ubuntu12.04安装gimp-2.8
    Ubuntu 3D特效一览
    Unix history图览
    Undelete Files on Linux Systems
    开源界有趣的循环缩写和LOGO
    Ubuntu上的dock
    linux下歌曲、视频、文件等乱码
  • 原文地址:https://www.cnblogs.com/iupoint/p/13493748.html
Copyright © 2011-2022 走看看