Have you ever run into a problem where you are attempting to troubleshoot a network connectivity issue or configuring network settings on a Windows Server 2008 R2 Core machine?

While working on an issue, I found myself asking the question, “How do I manage network settings on a Core machine?”

image

This goal of this post is to provide you with the tools you might need to troubleshoot a network connectivity issue or configure various network settings on a Windows Server 2008 R2 Core machine.

To get details about the installed network interfaces with their GUID:

wmic nicconfig get Description,SettingID

image

To get details about the installed network interfaces:

netsh interface ipv4 show interfaces

image

Assign/Set the server with a static IP address:

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

Configure the server to use a DHCP assigned IP address:

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

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

Assign/Change the DNS Server IP address:

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

Restart the server:

shutdown /r /t 0

Install the DNS Server role:

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.

To un-install the DNS Server role, execute the following command at a command prompt: start /w ocsetup DNS-Server-Core-Role /uninstall

Install the DHCP Server role:

start /w ocsetup DHCPServerCore

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

Note 2: The DHCP Server service does not start automatically by default. Use the following command to configure it to start automatically:

sc config dhcpserver start=<spacebar>auto

Start the service for the first time: net start dhcpserver

To un-install the DHCP Server role, execute the following command on the command prompt: start /w ocsetup DHCPServerCore /uninstall

Before I end this, I would like to share a new utility available called nvspbind. I’m pretty sure that nvspbind will help you while working on a Windows Server 2008 Core machine in following activities:

  • Set the correct bindings for NICs.
  • Enable or disable specific bindings on any NIC and to query and change the NIC connection order.

http://blogs.technet.com/b/jhoward/archive/2010/01/25/announcing-nvspbind.aspx

Additional References:

Bye for now…

Rohan Saksena (Rosak)