先编好一个文件,就起名叫changeip.sh吧。
然后再写一个bat文件,就起名叫changip.bat吧,
changeip.bat的内容如下:
@echo off
netsh exec changeip.sh
@echo on
然后changeip.sh文件内容如下:
int ip
set address name = "本地连接" source = static addr = 10.176.0.2 mask = 255.255.255.0
set address name = "本地连接" gateway = 10.176.0.1 gwmetric = 1
set dns name = "本地连接" source = static addr = 202.106.196.115