Lync Edge DNS LB EE Pool using Hosts File

May 15th, 2012 | Tags:

Issue:

Adding multiple host names within a single line item in the Hosts file results in in the Edge server not properly failing over between the internal FE servers in the EE Pool.

When using DNS round robin for an internal Enterprise Edition Pool, the Edge servers need to be able to resolve all IP addresses that would be associated with the Pool. Typically the EE Pool IP addresses would be returned to the server via round robin DNS entries that have been entered on the DMZ DNS servers. In an environment that does not have local DNS servers in the DMZ, but instead uses public DNS servers for resolution, the Edge servers cannot resolve the private IP addresses for the EE pool members.

TechNet documentation shows the following: (Use local Host file)

  • Set Up Network Interfaces for Edge Servers
    • Each Edge Server is a multihomed computer with external and internal facing interfaces. The adapter Domain Name System (DNS) settings depend on whether there are DNS servers in the perimeter network. If DNS servers exist in the perimeter, they must have a zone containing one or more DNS A records for the next hop server or Pool (that is, either a Director or a designated Front End Pool), and for external queries they refer name lookups to other public DNS servers. If no DNS servers exist in the perimeter, the Edge Server(s) use external DNS servers to resolve Internet name lookups, and each Edge Server uses a HOST to resolve the next hop server names to IP addresses.
  • Security Note
    • For security reasons, we recommend that you do not have your Edge Servers access a DNS server located in the internal network.

When configuring the local Hosts files on Windows Servers, it is typical to setup the hosts file with multiple names in the following format:

When configuring the local Hosts files on Windows Servers, it is typical to setup the hosts file with multiple names in the following format:

IP <tab> hostname <tab> FQDN

10.0.0.15     server1     lyncpool.domain.local

10.0.0.16     server2     lyncpool.domain.local

For many reasons, it is convenient to setup the local hosts file to include multiple names including the local host name of the internal Lync FE server.

When setting the hosts file up in this manner, the Edge server will not failover between the two internal FE servers in the EE Pool as expected when using DNS LB.  When the FE server listed first in the Hosts file goes offline, the Access Edge service does not try to re-establish service with the second FE server.

 

Cause:

When looking at the cached values from the Hosts files on the system, we can see the following differences when multiple names are listed vs. when only the FQDN is listed.

Example 1: (Hosts file contains server host name)

In this example we set the hosts file to include the local host name of the internal FE server, plus the FQDN of the EE Pool.  When displaying the local DNS Cache “ipconfig /displaydns” we see the records as recorded by the local system cache.

What causes the problem is the line item for “lyncpool.domain.local”.  We see that there is a CNAME value that correlates to  the first line item in Hosts file “server1”.

When server1 goes offline, it never fails over to server2, since it is not registered in the local cache.

Hosts file:

10.0.0.15     server1     lyncpool.domain.local

10.0.0.16     server2     lyncpool.domain.local

C:\Users\Administrator>ipconfig /displaydns

Windows IP Configuration

server1
    —————————————-
    Record Name . . . . . : server1
    Record Type . . . . . : 1
    Time To Live  . . . . : 86400
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 10.0.0.15

server2
    —————————————-
    Record Name . . . . . : server2
    Record Type . . . . . : 1
    Time To Live  . . . . : 86400
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 10.0.0.16

lyncpool.domain.local
    —————————————-
    Record Name . . . . . : lyncpool.domain.local
    Record Type . . . . . : 5
    Time To Live  . . . . : 86400
    Data Length . . . . . : 8
    Section . . . . . . . : Answer
    CNAME Record  . . . . : server1

 

Example #2 (Hosts file contains only the Lync FE Pool FQDN)

In this example we set the hosts file to include only the FQDN of the internal EE Pool. When displaying the local DNS Cache “ipconfig /displaydns” we see the records as recorded by the local system cache.

In this example, we see that there is no longer a CNAME value.  Instead, for lyncpool.domain.local we see the two A records containing the IP’s for Server1 and Server2.

When server1 goes offline, it takes about 60 seconds, but eventually the Access Edge service starts connecting the the second FE server in the EE Pool as expected.

Hosts File:

10.0.0.15      lyncpool.domain.local

10.0.0.16      lyncpool.domain.local

 

C:\Users\Administrator>ipconfig /displaydns

Windows IP Configuration

lyncpool.domain.local
    —————————————-
    Record Name . . . . . : lyncpool.domain.local
    Record Type . . . . . : 1
    Time To Live  . . . . : 86400
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 10.0.0.15

Record Name . . . . . : lyncpool.domain.local
    Record Type . . . . . : 1
    Time To Live  . . . . : 86400
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 10.0.0.16

 

Resolution:

When using local Hosts files with DNS LB for the internal EE Pool, the format of the Hosts file must be in the following format, with the FQDN of the internal EE Pool listed on separate lines than that of the FE FQDN:

 

10.0.0.15      lyncpool.domain.local

10.0.0.16      lyncpool.domain.local

10.0.0.15      server1.domain.local

10.0.0.16      server2.domain.local

 

Adding multiple host names within a single line item results in a CNAME value being created in the local DNS cache, that only resolves the first entry listed.   This results in the Edge server to not properly fail over between the internal FE servers in the EE Pool.

  1. October 21st, 2013 at 18:35
    Reply | Quote | #1

    thank you!

  2. December 10th, 2013 at 09:40
    Reply | Quote | #2

    Excellent explanation and just what I was looking for!
    Thanks for the Post!
    -Dan

  3. Don L
    September 14th, 2015 at 05:13
    Reply | Quote | #3

    (I know it’s an old article but I’ve investigated it anyway and wish to add my 2 cents since others might find it.)

    Unfortunately, the article is wrong when saying “[….] with only the FQDN of the internal EE Pool listed”.
    The Edge servers MUST be able to resolve the host names of each individual Frontend server or you’ll have a non functional Lync environment.

    But it’s right when stating that adding multiple records on one line would create CNAME records – actually I’d never noticed that before, so thanks for that info :-)

    The proper solution for Lync in this case would be to create the HOSTS file like this:
    10.0.0.15 server1.domain.local
    10.0.0.16 server2.domain.local
    10.0.0.15 lyncpool.domain.local
    10.0.0.16 lyncpool.domain.local

    That would result in A records only, and you’ll end up with the desired result.

    (And btw, using only 2 FE servers is a no-go. It must be an odd number of FE’s.)

    • Jeremy
      September 21st, 2015 at 16:26
      Reply | Quote | #4

      Don,

      Thanks for the reply. You are correct in that the Edge server needs to be able to resolve the Front End’s by FQDN as well. My intent was to show the requirement for the Pool being separated onto its own line, and I overlooked adding the FE’s on a separate line.

      I’ve updated the post appropriately.

      Jeremy

  4. September 21st, 2015 at 16:19
    Reply | Quote | #5

    I’ve been looking everywhere for this. Thank you!