« Linux版面从来就不缺少争论 | Main | 把微软windows live提供的邮局服务(custom domains)的邮箱增大了 »
January 12, 2006
[备份] 2002-10-21 写的通过netsh指定ip的bat脚本
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2006/01/12/000884.html 刚才在新软版看到问"如何快速切换ip" 就搀和了一把 发信人: windtear (追求完美), 信区: NewSoftware 标 题: Re: 请问如何快速切换ip 发信站: 水木社区 (Thu Jan 12 23:27:08 2006), 站内 支持 用netsh 记得我还写过一个setip.bat 在原来THUNet骗文章数 【 在 xuanqing (玄清@毕业/字典/找工作)(静若处子动如光) 的大作中提到: 】 : bat -- http://windtear.net/ 我的 blog (网络技术、Linux): windtear 追求完美 http://ipcn.org/ ipcn network service: proxy domain search norton ... *.ipchina.org domain service, 域名服务 提供 *.ipchina.org 域名 ※ 来源:·水木社区 newsmth.net·[FROM: 220.207.81.*] 当时似乎也是临时写出来回复THUNet当时版面文章的 仔细看其实改进余地很大 呵呵 不过当备案就全文贴出来好了 里面的dns估计可以见证一下历史 -----> setip.bat @ECHO OFF REM REM windtear(ipcn)org REM change the following lines -- ip, mask and gateway set IP=166.111.154.100 set MASK=255.255.255.0 set GW=166.111.154.1 set NIC=本地连接 REM change the above lines -- ip, mask and gateway REM if you also use local ip, change the following line set LOCALIP=10.35.61.32 set LOCALMASK=255.255.0.0 set LOCALIP=169.254.61.32 set LOCALMASK=255.255.0.0 set LOCALIP=172.16.61.32 set LOCALMASK=255.255.0.0 set LOCALIP=192.168.61.32 set LOCALMASK=255.255.255.0 ECHO Set Static IP by windtear(ipcn)org ECHO ...... netsh interface ip set address name = "%NIC%" source = static addr = %IP% mask = %MASK% REM netsh interface ip add address name = "%NIC%" addr = %LOCALIP% mask = %LOCALMASK% netsh interface ip set address name = "%NIC%" gateway = %GW% gwmetric = 1 netsh interface ip set dns name = "%NIC%" source = static addr = 166.111.8.28 netsh interface ip add dns name = "%NIC%" addr = 166.111.8.29 netsh interface ip add dns name = "%NIC%" addr = 166.111.4.5 netsh interface ip add dns name = "%NIC%" addr = 166.111.68.2 netsh interface ip add dns name = "%NIC%" addr = 166.111.8.7 netsh interface ip add dns name = "%NIC%" addr = 202.106.196.115 rem netsh interface ip add dns name = "%NIC%" addr = 202.112.0.35 rem netsh interface ip add dns name = "%NIC%" addr = 202.96.0.133 netsh interface ip add dns name = "%NIC%" addr = 203.196.0.6 netsh interface ip add dns name = "%NIC%" addr = 203.196.1.6 netsh interface ip add dns name = "%NIC%" addr = 216.116.128.3 netsh interface ip add dns name = "%NIC%" addr = 202.106.0.20 rem netsh interface ip add dns name = "%NIC%" addr = 209.10.217.83 netsh interface ip add dns name = "%NIC%" addr = 202.204.59.204 ECHO Mission Completed . |
Posted by windtear at January 12, 2006 11:48 PM