Server core 에서 Network 설정하기

Managing various network settings in Windows Server 2008 R2 Core

https://blogs.technet.com/b/networking/archive/2010/06/08/managing-various-network-settings-in-windows-server-2008-r2-core.aspx

Server Core 에서는 Full version 과 같은 GUI가 제공되지 않기 때문에  Network 설정에 어려움이 많이 있습니다. 위 블로그에서는 Server Core 에서 Network 을 설정하는 방법에 대해서 설명하고 있습니다.

 

설치된 NIC에 대한 설명과 GUID 얻기

wmic nicconfig get Description,SettingID

Network interface에 대한 자세한 정보 얻기

netsh interface ipv4 show interfaces

Static IP 설정하기

netsh interface ipv4 set address name="<Network Adapter Name" source=static address=<IP Address> mask=<Subnet Mask> gateway=<Gateway Address> <Default Gateway Metric>

Example: netsh int ip set address "Local Area Connection" static 192.168.0.101 255.255.255.0 192.168.0.254 1

 

DHCP 사용하도록 설정하기

netsh interface ipv4 set address name="<ID>" source=dhcp

Example: netsh int ip set address "Local Area Connection" source=dhcp

 

DNS 서버의 IP 변경하기

netsh interface ipv4 add dnsserver name="<Network Adapter Name>" address==<IP address of the Primary DNS server> index=1

netsh interface ipv4 add dnsserver name=”<Network Adapter Name>” address=<IP address of the Secondary DNS server> index=2

서버 재 시작하기

shutdown /r /t 0

 

DNS 서버 롤 설치하기

start /w ocsetup DNS-Server-Core-Role

Note: Using /w switch prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed.

DNS 서버 롤 제거하기

start /w ocsetup DNS-Server-Core-Role /uninstall

DHCP 서버 롤 설치하기
start /w ocsetup DHCPServerCore

참고 : DHCP 서버는 자동으로 시작되지 않기 때문에 아래 명령으로 자동으로 변경해 주어야 합니다.

sc config dhcpserver start=<spacebar>auto

최초 한번은 수동으로 시작해 주어야 합니다.

net start dhcpserver

 

DHCP 서버 롤 제거하기

start /w ocsetup DHCPServerCore /uninstall

 

아래 블로그에 있는 nvspbind를 사용하면 보다 편리하게 설정을 하실 수 있습니다.

•Set the correct bindings for NICs.
•Enable or disable specific bindings on any NIC and to query and change the NIC connection order.
https://blogs.technet.com/b/jhoward/archive/2010/01/25/announcing-nvspbind.aspx