You get a bonus - 1 coin for daily activity. Now you have 1 coin

Domain trust - how to see computers in another domain by their short DNS name

Practice



We have: several domains with trust relationships configured between them. Everything works, but a computer located in domain DomainA cannot see a computer from Domain2 by its short name (which, actually, makes sense). For example, computer Comp1.DomainA cannot see computer Comp2.DomainB when addressing it simply as Comp2.

ping Comp2
Response: nope

ping Comp2.DomainB
Response: aha, found it!

However, situations do arise, so to speak. Example: server SERVER.DomainA needs to be accessible from DomainB. At the same time it's inconvenient or not possible to bind it to a static IP address, and adding a separate A record in DomainB's DNS isn't great either (since there can be several servers and computers).


Why

This behavior occurs because the name of a computer that belongs to an Active Directory domain is, in fact (FQDN), not Comp1, but Comp1.DomainA (or Comp1.DomainA.local or something like that). So when an IP address is resolved by the computer's short name, the Windows machine automatically tries to append a DNS suffix. This suffix (unless something else is defined in Group Policy) is the Active Directory domain itself.

For example, if the computer's name is Comp1, and it's located in domain DomainA, then the computer's full name is Comp1.DomainA. And if we try, from computer Comp1 (Comp1.DomainA), to access computer Comp2, then, in fact, Windows looks for Comp2.DomainA, not Comp2.DomainB. In other words, it looks for the computer in its own domain (which makes sense).

However, within the domain we can configure different behavior: we can give computers an entire set of DNS suffixes to check. If a computer isn't found with one suffix, the next one is checked. Moreover, all of this is done through domain Group Policy, so there's no need to log in to each computer individually - all of them at once (or all those covered by a specific policy) will receive the instructions.


Solution

On the domain controller, we open the Group Policy editor, create a new policy or modify an existing one. Our goal is for this policy to apply to domain computers and to apply computer configuration settings.

Now we open the policy for editing and go to the following path:
Computer Configuration\
Policies\
Administrative Templates\
Network\
DNS Client

and modify the "DNS Suffix Search List" policy. We enable it and enter the required DNS suffixes in the order you need, separated by commas.

For example, if we're working with domain DomainB.local and we also want computers from DomainA and DomainC.ru to be visible, then the configuration line will look like this:
DomainB.local,DomainA,DomainC.ru

That is, we list our own domain first.

Then, when trying to resolve the IP address of computer CompX, Windows will first try to query the DNS server as CompX.DomainB.local, if that fails - then CompX.DomainA, and if that fails again - then CompX.DomainC.ru.



PS. Naturally, the DNS server of the domain you're working with must already have conditional forwarders configured, or it must otherwise be able to resolve foreign DNS zones somehow (for example, via secondary zones).

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Operating Systems and System Programming"

Terms: Operating Systems and System Programming