반복적인 IP 변경, 배치 파일로 쉽게 변경하는 방법
Solution

반복적인 IP 변경, 배치 파일로 쉽게 변경하는 방법

+ 더보기에서 이더넷은 개인마다 네트워크 어뎁터 이름이 달라질 수 있음.

 

 

my ip 1.cmd
다운로드

 

 

더보기
@echo off

title 반복적인 ip 변경, 배치 파일로 쉽게 바꾸다

mode con cols=80 lines=13

color 1F

 

:_Menu

cls

echo.

echo.

echo.

echo               1. Office IP

echo.

echo               2. DHCP IP

echo.

echo.

echo.

set /p num=Choose the number : 

if "%num%"=="1" goto _office_IP

if "%num%"=="2" goto _dhcp_IP

goto _Menu

 

:_office_IP

netsh -c int ip set address name="이더넷" source=static addr=192.168.1.199 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0

netsh -c int ip set dns name="이더넷" source=static addr=8.8.8.8 register=PRIMARY

netsh -c int ip add dns name="이더넷" 164.124.107.9

goto _Success

 

:_dhcp_IP

netsh -c int ip set address name="이더넷" source=dhcp

netsh -c int ip set dns name="이더넷" source=dhcp

netsh -c int ip add dns name="이더넷" source=dhcp

goto _Success2

 

:_Success

cls

echo.

echo.

echo.

echo    The operation completed successfully.

echo.

echo.

echo.

pause > nul

goto _Menu

 

:_Success2

cls

echo.

echo.

echo.

echo    The operation completed successfully.

echo.

echo.

echo.

pause > nul

goto _Menu