• 欢迎访问起航教学!
当前位置:起航教学资源网范文写作电脑学习电脑技巧两个Windows下自动切换IP小脚本

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

12-14 18:28:28   分类:电脑技巧   浏览次数: 168
标签:电脑技巧大全,http://www.qihang56.com 两个Windows下自动切换IP小脚本,
脚本, Windows, 自动
  
  从办公到家庭环境,或者从会议室到办公工位上的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。
  
  本文来自 http://www.qihang56.com 谢谢支持!

相关热词搜索:

分享到: 收藏
评论排行