操作方法
在其它电脑上,开始->所有程序->附件->命令提示符,在cmd窗口内输入采用netsh -f interface dump > c:\ip.txt 命令。
打开C:\ip.txt文件,如下格式(Windows 7下): #======================== # IPv4 配置 #======================== pushd interface ipv4 reset set global defaultcurhoplimit=64 icmpredirects=enabled add route prefix=0.0.0.0/0 interface="本地连接" nexthop=10.100.18.254 publish=是 add address name="本地连接" address=10.100.18.100 mask=255.255.255.0 popd # IPv4 配置结束 # ---------------------------------- # IPv6 配置 # ---------------------------------- pushd interface ipv6 reset set interface interface="Teredo Tunneling Pseudo-Interface" forwarding=disabled advertise=disabled mtu=1280 metric=0 siteprefixlength=0 nud=disabled routerdiscovery=disabled managedaddress=disabled otherstateful=disabled weakhostsend=disabled weakhostreceive=disabled ignoredefaultroutes=disabled advertisedrouterlifetime=0 advertisedefaultroute=disabled currenthoplimit=0 forcearpndwolpattern=disabled enabledirectedmacwolpattern=disabled popd # IPv6 配置的结尾 # ---------------------------------- # ISATAP 配置 # ---------------------------------- pushd interface isatap popd # ISATAP 配置结束 # ---------------------------------- # 6to4 配置 # ---------------------------------- pushd interface 6to4 reset
找到: add route prefix=0.0.0.0/0 interface="本地连接" nexthop=10.100.18.254 publish=是 add address name="本地连接" address=10.100.18.100 mask=255.255.255.0 其中nexthop=10.100.18.254表示网关;address=10.100.18.100表示IP地址;mask=255.255.255.0表示子网掩码。
将以上网关、IP地址和子网掩码改成自己电脑相应的值。
在自己的电脑上输入以上ip.txt的内容,并保存为C盘根目录下ip.txt。如果能够直接从其它电脑上拷贝过来到C盘根目录下也可以。
在自己电脑上,开始->所有程序->附件->命令提示符,在cmd窗口内输入采用netsh -c c:\ip.txt 命令。
IP地址更改完毕,重启电脑,搞定!