3

I have a Windows server that is multi-homed (it is NOT a DC). The problem is that the 2nd IP creates a DNS entry as well, which sometimes takes priority over the 1st IP. As such, when somebody tries to connect to a file share on this server by server name it will try to connect to the wrong IP and it won't work.

How would I go about preventing this secondary IP (used for an application, the IP doesn't need to be published in DNS) from creating a DNS entry, while still allowing the primary IP to create an entry?

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
ThingsToDo
  • 191
  • 2
  • 5
  • 11

5 Answers5

7

Are the multiple addresses assigned to a single adapter, or do you have have multiple adapters.

If you have multiple adapters then you should be able to un-check the 'Register this connection's addresses in DNS' box. See http://support.microsoft.com/kb/305553#6

Zoredache
  • 128,755
  • 40
  • 271
  • 413
3

If both ip addresses are bound to the same network card then you won't be able to use the solution Zoredache provided... exactly. What you can do is follow his suggestion and then create a static A record for the ip address that you do want registered in DNS.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
3

In my case where the server is a domain controller (and I have one address per adapter), unchecking the "Register this connections' address" did not help. I had to put a bogus IP address in the "User the following DNS server addresses" section so when it tried to register the address (despite my telling it not to), no harm was done.

Mark Hill
  • 31
  • 1
  • More info: you also need to prevent the DNS server from listening to the secondary address. See [http://www.binarywar.com/2010/01/prevent-registration-of-multiple-ip-addresses-in-dns/](http://www.binarywar.com/2010/01/prevent-registration-of-multiple-ip-addresses-in-dns/) – Mark Hill Aug 16 '12 at 18:33
1

I know this is an aged post, however, I ran into this same issue(s) and discovered another resolutions. Correct me if incorrect.

I was not able to overcome the above aforementioned issue of client DNS attempting to resolve via a second IP address on a dual-port NIC (so, same adaptor) in Windows Server 2016 Essentials.

I was able to overcome this issue by following joeqwerty's solution AND the following:

  1. Open DNS Snap-in via Server Manager -> Tools
  2. Right click root Server -> Properties -> Interfaces
  3. Select "Only the following IP addresses" under "Listen on:"
  4. Uncheck the IP address you do not wish to listen on.
  5. Select "Apply" -> "Ok"
  6. Next, under "Forward Lookup Zones" in the DNS Directory tree right click your primary FLZ.
  7. Select "Properties"
  8. Navigate to "Name Servers" tab
  9. Select your Server FQDN
  10. Select "Edit" underneath pane
  11. Select IP address you DO NOT want to "listen on"
  12. Select "Delete" to the right of selection pane.
  13. Confirm delete.
  14. Apply & Save
  15. Restart DNS Service
  16. Confirm via "nslookup {yourServerHostname}"
  17. Should only return singular IP address.

All is well within my forest now.

Hope this helps anyone in the future.

Best, Taylor

1

You can use the SkipAsSource flag when using netsh to add an IP address to an interface:

Netsh Int IPv4 Add Address <Interface Name> <IP Address> SkipAsSource=True

This will prevent registration in DNS regardless of the setting on the interface a whole.

Be careful when using the UI afterwards as it has a habit of resetting it.

Glorfindel
  • 1,213
  • 3
  • 15
  • 22
Fowl
  • 396
  • 1
  • 4
  • 21