dhcp与静态ip切换

实验室用的是dhcp,寝室用的是静态ip地址,每次切换起来比较烦人,于是上网搜了一下写了个脚本。

  • Windows

寝室设置[静态ip地址]

netsh interface ip set address “本地连接” static IP 地址 子网 网关 跃点数(一般为1)
netsh interface ip set dns “本地连接”
dns地址

实验室[动态IP地址]

netsh interface ip set address “本地连接”  dhcp
netsh interface ip set address “本地连接”  dhcp

参考:

  1. 如何使用 Netsh.exe 工具和命令行开关 http://support.microsoft.com/kb/242468
  2. 如何使用 NETSH 命令在 Windows 2000 中将静态 IP 地址更改为 DHCP 地址 http://support.microsoft.com/kb/257748
  • Linux
  • 等用了再说

Technorati 标签: , , ,

5 Responses to “dhcp与静态ip切换”

  1. Zn Says:

    请不要在博客上技术文章,谢谢。。。

  2. Ender Says:

    以后基本只写技术文章,谢谢…Blog又不是校内-__-|||

  3. lgylym Says:

    脚本版的Access Connection :|

  4. Ender Says:

    hoho~Thinkpad原来还有这个啊, 原先还不知道呢 :(

  5. Ender Says:

    ERROR: Cannot quote comment ID #271052 as it can’t be found in the database.

    test

Leave a Reply

Powered by WP Hashcash