Add additional DNS server to Windows Server 2008 Core NIC configuration

An issue occurred at a previous employer whereby a Server 2008 (Core) Hyper-V server had been set up with only a primary DNS server on both NICs. This may have resulted in an issue if the DNS server went down (or even if it was rebooted). I raised a change to add a secondary DNS server and have documented the steps here to show how a simple admin task can often go awry.

My change documentation included 4 simple steps:

1. Log on to server VMHOST03.

2. At the command prompt type

netsh interface ipv4 add dnsserver name=”LAN HOST VM1″ address=10.10.10.2 index=2

3. Then

netsh interface ipv4 add dnsserver name=”LAN HOST VM2″ address=10.10.10.2 index=2

4. Finally run ipconfig /all to be sure the DNS server entry has been appended to the current list and has not overwritten the current entry.

However, the implementation was not as straightforward as I hoped, as error “The filename, directory name, or volume label syntax is incorrect.” kept coming back. After much tribulation I discovered that the issue was with the name of the NICs (I assume the spaces in the name of the NICs was the problem). It also turned out that the NICs and their descriptions were set wrongly; Ethernet adapter LAN HOST VM1 had a description of PhysicalNIC2 and Ethernet adapter LAN HOST VM2 had a description of PhysicalNIC1. With this in mind I decided to change LAN HOST VM1 to NIC2 with the command:

netsh int set int name=”LAN HOST VM1″ newname=NIC2

and LAN HOST VM2 to NIC1 with the command:

netsh int set int name=”LAN HOST VM2″ newname=NIC1

I then ran the command

netsh interface ipv4 add dnsserver name=NIC1 address=10.10.10.2 index=2

and then

netsh interface ipv4 add dnsserver name=NIC2 address=10.10.10.2 index=2

This was successful and the relevant portion of the ipconfig /all output then displayed:

Ethernet adapter NIC2:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : PhysicalNIC2
Physical Address. . . . . . . . . : 00-23-7D-FC-B4-87
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6565:51d6:775c:642b%11(Preferred)
IPv4 Address. . . . . . . . . . . : 10.10.10.71(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.10.20
DNS Servers . . . . . . . . . . . : 10.10.10.1
10.10.10.2
Primary WINS Server . . . . . . . : 192.168.1.42
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter NIC1:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : PhysicalNIC1
Physical Address. . . . . . . . . : 00-23-7D-FC-B4-86
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f865:2dee:3c72:1def%10(Preferred)
IPv4 Address. . . . . . . . . . . : 10.10.10.72(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.10.20
DNS Servers . . . . . . . . . . . : 10.10.10.1
10.10.10.2
NetBIOS over Tcpip. . . . . . . . : Enabled

Posted in Guides Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*