¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 12°Ç
   
DHCP --> STATIC BATCH
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2011-11-15 (È­) 16:52 Á¶È¸ : 6075
±ÛÁÖ¼Ò :
                          



DHCP·Î ÇÒ´ç ¹ÞÀº  IP¸¦ ÀÚµ¿À¸·Î °íÁ¤IP·Î ¼³Á¤Çϱâ À§Çؼ­´Â ´ÙÀ½°ú °°Àº ¹èÄ¡ÆÄÀÏÀ» ÀÌ¿ëÇÏ¸é µÈ´Ù.


ȸ»öÀº ÁÖ¼®ÀÔ´Ï´Ù. Áö¿ì½Ã°í »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.

IP, Subnet Mask, Default Gateway, DNS Servers Á¤º¸¸¦ ã´Â ½ºÅ©¸³Æ®
@echo off
for /f "tokens=2 delims=:" %%G in ('ipconfig/all ^| find "IP Address"') do set ip=%%G%
for /f "tokens=2 delims=:" %%G in ('ipconfig/all ^| find "Subnet Mask"') do set mask=%%G%
for /f "tokens=2 delims=:" %%G in ('ipconfig/all ^| find "Default Gateway"') do set gate=%%G%
for /f "tokens=2 delims=:" %%G in ('ipconfig/all ^| find "DNS Servers"') do set dns=%%G%


IP, Subnet Mask, Default Gateway, DNS Servers º¯¼ö ¼±¾ð
set ip=%ip:~1%
set mask=%mask:~1%
set gate=%gate:~1%
set dns=%dns:~1%

°íÁ¤À¸·Î º¯°æÇÏ´Â ºÎºÐ
netsh -c int ip set address name="·ÎÄà ¿µ¿ª ¿¬°á" source=static addr=%ip% mask=%mask% gateway=%gate% gwmetric=0
netsh -c int ip set dns name="·ÎÄà ¿µ¿ª ¿¬°á" source=static addr=%dns% register=PRIMARY
rem netsh -c int ip add dns name="·ÎÄà ¿µ¿ª ¿¬°á" addr="º¸Á¶DNS" index=2

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.