您现在的位置 :八百米考试网范文常识知识电脑知识学习电脑技巧在两个Windows下自动切换IP小脚本

在两个Windows下自动切换IP小脚本

日期:11-01 21:55:12|八百米考试网| http://www.babaimi.com |电脑技巧

在两个Windows下自动切换IP小脚本,本站还有更多关于电脑技巧,电脑技巧大全的文章。
正文:

  从办公到家庭环境,或者从会议室到办公工位上的ip切换相信已经把你搞的烦死了,那么用下面的2个小脚本吧,呵呵,药到病除。

  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 local static 192.168.0.84 255.255.255.0 192.168.0.254
  netsh interface ip set dns local 192.168.0.254
  netsh interface ip add dns local 202.106.196.115 index=2
  netsh interface ip add dns local 202.106.0.20 index=3

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

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


如果觉得在两个Windows下自动切换IP小脚本不错,可以推荐给好友哦。
本文Tags:Windows   电脑技巧电脑技巧大全电脑知识学习 - 电脑技巧
联系我们 | 热门专题 | 建筑工程 | 会计财务 | 职业资格 | 医学考试 | 外语学历 | 下载中心 | 范文中心 | 作文大全 | 中小学教育


Copyright www.babaimi.com
共享资料考试资料共享公务员考试试题会计从业资格考试试题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17