netsh를 이용한 windows XP, windows 7 IP변환 명렁어 및 배치(bat)
# windows XP
1. cmd 실행
2. IP 세팅
[static]
C:\Documents and Settings\Administrator>netsh -c int ip set address name="로컬 영역 연결" source=static addr=192.168.1.100 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0
[dhcp]
C:\Documents and Settings\Administrator>netsh -c int ip set address name="로컬 영역 연결" source=dhcp
3. dns세팅
[static]
C:\Documents and Settings\Administrator>netsh -c int ip set dns name="로컬 영역 연결" source=static addr=168.126.63.1 register=PRIMARY
[dhcp]
C:\Documents and Settings\Administrator>netsh -c int ip set dns name="로컬 영역 연결" source=dhcp
※ 여기서 name=에 들어가는 "로컬 영역 연결"은 Ethernet adapter 이름인거 아시죠? ^^
# windows 7
1. cmd 실행
2. IP 세팅
[static]
C:\Documents and Settings\Administrator>netsh interface ip set address name="무선 네트워크 연결" static 192.168.1.151 255.255.255.0 192.168.1.1 1
※ 여기서 마지막 1 은 gwmetric 값입니다.
[dhcp]
C:\Documents and Settings\Administrator>netsh interface ip set address name="무선 네트워크 연결" dhcp
3. dns세팅
[static]
C:\Documents and Settings\Administrator>netsh interface ip add dns name="무선 네트워크 연결" 168.126.63.1
[dhcp]
C:\Documents and Settings\Administrator>netsh interface ip add dns name="무선 네트워크 연결" dhcp
※ 배치(bat)파일은 첨부할게요 ^^