How to add a DC to the LMHosts file so I can join a DC that's in a different subnet.

11,405

Solution 1

Point the client system's DNS settings to the DC, then join by entering the domain's fully-qualified domain name.

LMHosts, NetBIOS name resolution, and WINS are on their way out; use DNS.

Solution 2

uhg

1) using a KB article from 3 years ago written for an OS 2 revisions behind the one you are using generally is not going to work.

2) What is your DNS server? If you can talk to the DC via ICMP are you doing it via IP or DNS?

3) You need to make sure you have the proper ports allowed through your firewalls/vpn config.

4) What is the exact error you are getting when you try to connect the machine to the domain?

Solution 3

The LMHOSTS file would be used for Netbios names. Your Windows 7 machine will need to resolve the FQDN (DNS name) of the domain you need to add it to. The DNS server you are using on your Windows 7 should be able to resolve (or forward to a DNS server that can resolve) the Domain in question. If neither of those are true then a quick fix would be to add the full domain name i.e. coolest.dude.com to the HOSTS file using the IP you can ping.

You will also need to ensure that traffic is open from your subnet to the remote location DC.

Share:
11,405

Related videos on Youtube

Will
Author by

Will

Updated on September 18, 2022

Comments

  • Will
    Will almost 2 years

    Solution: No ports needed to be open since sonicwall VPN's allow all traffic by default. I just pointed the client machine's primary DNS to the DC and it worked.

    Thanks guys, great site. -Will

    How can I create a static entry, so when the computer tries to connect to our domain, it will be pointed to the DC (10.0.0.21). I would rather not involve a DNS server in this.

    I tried setting the DC as my secondary DNS within TCP/IP settings but that didn't work.

    The exact error is as follows: "AN AD DC for the domain "x" could not be contacted. Ensure it was typed correctly."

    "The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "X.com":

    The error was: "DNS name does not exist." (error code 0x0000232B RCODE_NAME_ERROR)

    The query was for the SRV record for _ldap._tcp.dc._msdcs.X.com"

    The two networks are connected over the internet by SonicWall VPN Routers. Do I need to unblock any ports?

    • mfinni
      mfinni about 13 years
      Tell us the error you got when trying.
    • mfinni
      mfinni about 13 years
      Quoted from below: "I would rather not involve a DNS server in this." Then you're doing it wrong. AD is built on top of DNS.
    • Will
      Will about 13 years
      How so? Why dedicate more resources to a DNS server? I'm not trying to be argumentative but it seems you are just set in your ways. I am simply trying to join a computer to the domain over VPN. I already have the entry in the hosts file. I am following the link Zy posted and unblocking ports now.
    • mfinni
      mfinni about 13 years
      AD is built on top of DNS. I'm not sure how else to explain it. You can use a HOSTS file entry, which is still (wait for it) part of DNS. AD still needs a DNS server. I'm not saying you have to add a new one, you can use an existing one that has all of the AD entries. Adding the DC as your secondary won't work, because this Win7 machine will only go to the secondary if the primary is down. You don't know enough about AD or DNS, I'm sorry to say.
    • mfinni
      mfinni about 13 years
      Yup - as I thought. When it comes to AD problems, DNS is almost always the first place to look for problems.
    • mfinni
      mfinni about 13 years
      Don't forget to mark an answer. All three of the offered answers have the right info, to my eye, so pick the one you liked best.
    • Zypher
      Zypher about 13 years
      Adding '[Solved]' to the title of the question is not the proper way to make your issue here resolved. As the question owner there are Check marks below the vote Icons, click the one next to the answer you feel helped you the most. That is the way to mark an issue solved here and credit the proper person.