728x90
윈도우의 Command 에서 아이피를 변경하고자 한다면
아래와 같이 두가지 방법으로 변경이 가능합니다
1. NETSH
- dhcp
netsh interface ip set address "이더넷 1" dhcp
netsh interface ip set dns "이더넷 1" dhcp
- static
netsh interface ip set address "이더넷 1" static 192.168.0.1 255.255.255.0 192.168.0.254 1
netsh interface ip set dns "이더넷 1" static 1.1.1.1
netsh interface ip add dns "이더넷 1" static 1.0.0.1
위와 같이 아이피와 dns를 변경하면 된다
위의 "이더넷 1"의 경우 어댑터의 이름으로 지정하면 된다
2. wmic
- dhcp
wmic nicconfig where index=1 call enabledhcp
wmic nicconfig where index=1 call setdnsserversearchorder ()
- static
wmic nicconfig where index=1 call enablestatic (192.168.0.1), (255.255.255.0)
wmic nicconfig where index=1 call setgateways (192.168.0.254)
wmic nicconfig where index=1 call setdnsserversearchorder (1.1.1.1, 1.0.0.1)
or
wmic nicconfig where index=1 call setdnsserversearchorder (1.1.1.1)
위와 같이 아이피와 dns를 변경하면 된다
위의 "index=1"의 경우 어댑터의 index를 찾아 지정하면 된다
728x90
'OS > Windows' 카테고리의 다른 글
[Windows] 페이징 파일 (Page File) Command 설정 (0) | 2023.01.03 |
---|---|
[Windows] 마우스 오른쪽 버튼 메뉴 CMD 추가 (0) | 2023.01.02 |
[Windows] 네트워크 상태 오류 확인 (0) | 2022.12.26 |
[Windows] 페이징 파일 오류 (Paging File Error) (0) | 2022.12.08 |
[Windows] 주소 결정 프로토콜(Address Resolution Protocol, ARP) (0) | 2022.11.10 |