Using only a specific DNS Server while connected to a specific Subnet

create share 666 Reputation points
2023-11-06T10:36:20.47+00:00

Hi,

Is it possible to restrict the domain connected pcs to use only a specific DNS Server address when they connect to a specific Subnet regardless of the number of DNS Servers in a domain?

Thanks.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,728 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Luis Arias 7,686 Reputation points
    2023-11-06T11:37:14.9466667+00:00

    Hi @create share I'm not sure where is your deployment, so here there is for Onprem and on Azure:

    On-premise:

    On your DHCP Scope you can specify the DNS server fo an specific subnet , this will depends how you are setting up the dns configuration on your machines.

    Configure DHCP Server and Scope Options in Windows Server 2016

    On Azure

    At vnet level you can specify the dns server target:

    User's image

    Another option is doing at interface level , so you be specify on dns server configuration by VM:

    User's image

    Beside you can use command with the "Set-AzNetworkInterface" PowerShell commandlet to change DNS settings on a network interface. (https://learn.microsoft.com/en-us/powershell/module/az.network/set-aznetworkinterface?view=azps-4.4.0#description)

    Or you can use the Azure CLI "az network nic update" cmdlet. ( https://learn.microsoft.com/en-us/cli/azure/network/nic?view=azure-cli-latest#az-network-nic-update)

    Cheers,

    Luis Arias


    If the information helped address your question, please Accept the answer.

    0 comments No comments

  2. create share 666 Reputation points
    2023-11-06T14:57:58.2866667+00:00

    Hi,

    It is on-premise. I am already using the correct DNS Entry in the DHCP Scope. I think I asked the wrong question. The problem is actually with the DNS Domain Name. I need all the PCs to be authenticated by a specific DC which is not happening now. When I am pinging the dns domain name "domain.com", instead of pinging the DC in the same office, it is pinging the main office DCs and then I have to run ipconfig /flushdns multiple times to let it ping the required DC..

    Thanks.

    0 comments No comments

  3. create share 666 Reputation points
    2023-11-06T16:47:17.0766667+00:00

    I think the problem has been resolved after removing the IP Addresses of other DCs from the NIC on the branch DC.

    0 comments No comments

  4. create share 666 Reputation points
    2023-11-08T17:33:11.9366667+00:00

    No, the problem has come back. Any other suggestions?

    0 comments No comments

  5. Luis Arias 7,686 Reputation points
    2023-11-08T19:44:57.7766667+00:00

    Hi @create share additional actions that you can do are setup a Multisite Infrastructure in your active directory onpremise with a new site and new subnet:

    • Open AD site and services create a Site
    • Create new Site
    • Create subnet using the network CIDR that you want to create specific configuration , linked to the new site
    • Go to you default site and move the DC that you want to use to authenticate this subnet

    User's image

    You can configure Multisite infrastructure and the additional requirement:

    Cheers,

    Luis


    If the information helped address your question, please Accept the answer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.