天天看點

指令行批量修改IP并ping測試

指令行批量測試ip
    
@echo off
set ip=0
:begin
set /a ip=%ip%+1
netsh interface ip set address "本地連接配接" static 172.20.209.%ip% 255.255.0.0 172.20.209.1
netsh interface ip set dns "本地連接配接" static 221.228.255.1 primaryping  172.20.209.1  && goto :write || echo "不通"
:write
echo "===========================">> ip.txt
ping  172.20.209.1>> ip.txt
echo 172.20.209.%ip% >> ip.txt
echo "===========================">> ip.txt
goto :begin      

謝謝支援!

2016.6.26