• 网站地图|收藏本站|数学学习|学习方法|电脑学习|教学大全|生活常识|句子大全|管理资料下载|范文大全
  • xp下设置本地连接IP地址属性的方法

    时间:10-14 10:27:50来源:http://www.laixuea.com 操作系统阅读:8305

    概要: 用批处理文件实现设置本地连接的IP地址属性,希望可以对大家有所帮助。 1. 切换成自动获取IP @echo off netsh interface ip set address name="local" source=dhcp netsh interface ip set dns name="local" source=dhcp 2. 切换成固定IP @echo off netsh interface ip set address 本地连接 static 192.168.0.84 255.255.255.0 192.168.0.254 netsh interface ip set dns 本地连接 192.168.0.254 netsh interface ip add dns 本地连接 202.106.196.115 index=2 netsh interface ip add dns 本地连接 2

    xp下设置本地连接IP地址属性的方法,标签:操作系统有哪些,电脑操作系统,http://www.laixuea.com

        用批处理文件实现设置本地连接的IP地址属性,希望可以对大家有所帮助。

        1. 切换成自动获取IP

        @echo off
        netsh interface ip set address name="local" source=dhcp
        netsh interface ip set dns name="local" source=dhcp

        2. 切换成固定IP

        @echo off
        netsh interface ip set address 本地连接 static 192.168.0.84 255.255.255.0 192.168.0.254
        netsh interface ip set dns 本地连接 192.168.0.254
        netsh interface ip add dns 本地连接 202.106.196.115 index=2
        netsh interface ip add dns 本地连接 202.106.0.20 index=3

        "local" 是你的本地网卡名称,也可能是 "本地连接",需要自己替换下。如果是2个固定IP间的来回切换,就把第2个脚本自己改改吧。

        dns设置中,第一个是set,表示设置,后面两个则是添加,自己替换成当地的dns server。


    Tag:操作系统操作系统有哪些,电脑操作系统电脑学习 - 操作系统