Search code examples
active-directoryvirtual-machinewindows-server-2012-r2

Setting up VMWare Virtual Windows Server 2012 with Active directory, AD IP changing


On my Windows 7 Pro laptop I have have created a VMWare virtual Windows Server 2012 R2 running Active Directory and IIS. I used this walk-through to guide me.

The idea is to setup a development environment for a website that uses AD authentication.

The first issue I have is the IP address of the AD domain controller keeps changing, seems a daily thing. using the command prompt I use: _ldap._tcp.dc._msdcs.Domain_Name

two days ago: 192.168.174.131
yesterday:192.168.174.134
today:192.168.174.137

As per the walk-through under the section heading 'Configure the server to communicate with the AD domain' I configure the server to communicate with the AD domain by setting the IPv4 DNS IP, however if this keeps changing that is an issue isn't it?

enter image description here

Also in the walk-through, under the section heading 'Add a DNS A record for the web site' it uses the same IP address, so it is an issue here as well.

Afraid I haven't done much networking.

Can someone please tell me why this is happening, if it should be happening and possibly a resolution please. Have I missed something in the walk-through or has it missed something?


Solution

  • The first issue I have is the IP address of the AD domain controller keeps changing, seems a daily thing. using the command prompt I use: _ldap._tcp.dc._msdcs.Domain_Name

    two days ago: 192.168.174.131 yesterday:192.168.174.134 today:192.168.174.137

    The reason why your AD Domain Controller's IP-Address keeps changing might be because you have not configured a static IP-Address for your DC. For an AD Domain Controller, it should have a static IP-Address, or else the systems joined to this AD domain won't be able to communicate with the DC. It is recommended to have a static IP-Address for your AD DC servers.

    The article has not shared the steps for setting up a DC, and I think you've mixed it up by setting up AD DS and IIS on the same server. Usually, as a recommended practice, a server having AD Domain Services role should not install additional roles like IIS. I assume you're using this just for experiment.

    As per the walk-through under the section heading 'Configure the server to communicate with the AD domain' I configure the server to communicate with the AD domain by setting the IPv4 DNS IP, however if this keeps changing that is an issue isn't it?

    I am assuming you've configured this server an AD DC in itself too, and so you need to assign a static IP for this server.

    In the shared image, for the 3rd part where you've configured the DNS, you also need to assign a static IP on the top. In the current image, the default option which you've selected is "Obtain an IP Address automatically". You can assign a static IP like any of the values in the same range (e.g., 192.168.174.131, OR 192.168.174.134, OR 192.168.174.137).

    In short, whatever is your AD DC's IP-Address, other systems joined to that domain should use that as a DNS value for their network configuration.

    Also in the walk-through, under the section heading 'Add a DNS A record for the web site' it uses the same IP address, so it is an issue here as well.

    The DNS A record (Address record) is used to point a domain or a subdomain to an IP-Address of the system hosting that domain. You can think it as IP-Address resolution for the URL.

    In the article pointed by you, they have done this to help other internal systems resolve your URL into the IP-Address to reach your server which is hosting the website. As AD DC has the DNS role too, you can configure A record in the AD DNS. This setting has to be done on the AD DC server.

    Afraid I haven't done much networking.

    Can someone please tell me why this is happening, if it should be happening and possibly a resolution please. Have I missed something in the walk-through or has it missed something?

    This is just an advice from my side it'd be helpful if you go through the basic networking stuff and DNS before proceeding ahead with the article content. It'd be very useful for you if you have a good networking idea which will help you to understand the AD concepts very smoothly.

    I hope this answer helps you.