위로 아래

GUI

window + r : 실행창 열기

ncpa.cpl : 네트워크 연결 창 열기

Internet Protocol Version 4 (TCP/IPv4) 속성 : 해당 어댑에서 사용할 IP주소, 서브넷, 게이트웨이, DNS 정보 설정

 

 

 

CLI 

CLI 사용 이유

  1. 원격 관리나 자동화에 있어서는 GUI를 쓰는 데에 한계가 있다
  2. 윈도우 서버 Core 버전 등과 같이 GUI 환경이 제공되지 않거나, 고정 IP를 사용하는 장소를 자주 옮겨 다닐 때, 노트북을 연결해 이용해야할 때, 스크립트를 만들어 네트워크 설정을 손쉽게 바꿀 때 사용

 

명령어

cmd 관리자 권한으로 실행

ipconfig : IP주소, 서브넷 마스크, 게이트웨이 확인 가능

ipconfig /all : IP주소, 서브넷 마스크, 게이트웨이, MAC 주소, DNS 서버 정보, DHCP 사용 여부 등

 

 

netsh 명령

네트워크 어댑터 static 설정

#static 설정 기본
netsh interface ipv4 set address name="인터페이스명" static IP 주소 서브넷 게이트웨이

#DNS 설정
netsh interface ipv4 set dns name="인터페이스명" static DNS_서버주소

#DNS 두 개 설정
netsh interface ipv4 set dns name="인터페이스명" static DNS_서버주소1
netsh interface ipv4 set dns name="인터페이스명" static DNS_서버주소2 index=2

 

 

네트워크 어댑터 dhcp 자동 설정

#dhcp 자동 설정 기본
netsh interface ipv4 set address name="인터페이스명" source=dhcp

#dhcp 자동 설정 dns
netsh interface ipv4 set dns name="인터페이스명" source=dhcp

 

 

재시작

netsh interface set interface name="인터페이스명" admin=disabled

netsh interface set interface name="인터페이스명" admin=enabled