Skip to content

Instantly share code, notes, and snippets.

@theand
Created June 1, 2013 22:18
Show Gist options
  • Select an option

  • Save theand/5691893 to your computer and use it in GitHub Desktop.

Select an option

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.
@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
@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
@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
@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
@wildshark

Copy link
Copy Markdown

DHCP용 PHP 코드를 받고 싶습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment