从办公到家庭环境,或者从会议室到办公工位上的IP切换相信已经把你搞的烦死了,win7系统下载那么用下面的2个小脚本吧,呵呵,药到病除。* ]8 C" J h" l# L
1. 切换成自动获取IP' ]7 ]! x. }% f5 |
@echo off
3 T0 Q- M Y5 V) l3 |; ` netsh interface ip set address name=“local” source=dhcp
- M* y8 a P; U9 D8 `" Y! O netsh interface ip set dns name=“local” source=dhcp7 @/ [; t3 w1 W: _
2. 切换成固定IP
; U' T4 m: R+ Z5 x( ^- J( S0 n @echo off* j) O, `0 H; F4 A3 n- X, x1 g
netsh interface ip set address local static 192.168.0.84 255.255.255.0 192.168.0.254+ N" s6 h9 U; G6 t7 {# K
netsh interface ip set dns local 192.168.0.254# i' C& F+ `. f5 H! ~* E
netsh interface ip add dns local 202.106.196.115 index=2
& \8 i3 R# g; x/ e! n: x# j netsh interface ip add dns local 202.106.0.20 index=34 H% ?) d, f# ?
“local” 是你的本地网卡名称,也可能是 “本地连接”,需要自己替换下。xp系统下载如果是2个固定IP间的来回切换,把第2个脚本自己改改吧 :). i/ G* U& ]9 H$ w; R
dns设置中,第一个是set,表示设置,后面两个则是添加,自己替换成当地的dns server。
v1 M$ X3 H/ V# K# I" W1 t x7 ? |