Created
June 1, 2013 22:18
-
-
Save theand/5691893 to your computer and use it in GitHub Desktop.
[Windows BAT] setting DHCP/STATIC IP address for network adapter. Before running this script, must set device name in Control Panel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @echo "### Dynamic(DHCP) IP 설정 중.." | |
| netsh -c int ip set address name="유선" source=dhcp | |
| @echo "### Auto DNS 설정 중.." | |
| netsh -c int ip set dns name="유선" source=dhcp register=PRIMARY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @echo "### Static IP 설정 중.." | |
| netsh -c int ip set address name="유선" source=static addr=XXX.XXX.XXX.XXX mask=YYY.YYY.YYY.YYY gateway=112.172.138.254 gwmetric=0 | |
| @echo "### DNS #1 설정 중.." | |
| netsh -c int ip set dns name="유선" source=static addr=ZZZ.ZZZ.ZZZ.ZZZ register=PRIMARY | |
| @echo "### DNS #2 설정 중.." | |
| netsh -c int ip add dns name="유선" addr=ZZX.ZZX.ZZX.ZZX index=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @echo "### Dynamic(DHCP) IP 설정 중.." | |
| netsh -c int ip set address name="무선" source=dhcp | |
| @echo "### Auto DNS 설정 중.." | |
| netsh -c int ip set dns name="무선" source=dhcp register=PRIMARY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @echo "### Static IP 설정 중.." | |
| netsh -c int ip set address name="무선" source=static addr=XXX.XXX.XXX.XXX mask=YYY.YYY.YYY.YYY gateway=112.172.138.254 gwmetric=0 | |
| @echo "### DNS #1 설정 중.." | |
| netsh -c int ip set dns name="무선" source=static addr=ZZZ.ZZZ.ZZZ.ZZZ register=PRIMARY | |
| @echo "### DNS #2 설정 중.." | |
| netsh -c int ip add dns name="무선" addr=ZZX.ZZX.ZZX.ZZX index=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DHCP용 PHP 코드를 받고 싶습니다.