MacTCP: DNS (Domain Name Server) Configuration Problems

I'm having a problem with the MacTCP Domain Name Server (DNS). Below is the problem and some attempts to resolve it.

If I set up the MacTCP DNS information like this:
Domain
IP Address
Default
colby.edu
137.146.210.37
X
.
137.146.210.33


If the server 137.146.210.33 goes down, and I query the name "colby.edu"; the name doesn't resolve but all other names do. This is a problem because everyone queries the name "colby.edu" to receive email.

However if I add another host to the end of the DNS info like this:
Domain
IP Address
.
137.146.210.39

I can access "colby.edu", at least as long as that server is up.

I have two questions:

Question 1:
Is the use of a period in the domain still valid for the MacTCP DNS information? The documentation we have for MacTCP 1.x says that using a period will substitute the Domain Name above. The documentation for 2.x doesn't mention using the period. If I replace the period in the above example that didn't work, the "colby.edu" address does resolve.

Question 2:
How exactly does MacTCP determine which server to query first and the order for querying?

I've tried this with MacTCP 2.0.4 and 2.0.6. Here is the situation:

If I set up MacTCP with domain name servers like this:

Domain
IP Address
Default
colby.edu
137.146.210.37
X
.
137.146.210.33



Everything resolves properly when both machines are up. However, when 137.146.210.33 goes down names like "server.colby.edu" are resolved properly but the name "colby.edu" is not resolved.

Later last week we had another situation. MacTCP was set up like:

Domain
IP Address
Default
colby.edu
137.146.1.5
X
.
137.146.210.37
.
137.146.210.33


The name server 137.146.1.5 crashed, and the other two servers weren't being used to look up the address "colby.edu". This can be frustrating for users, one setup of MacTCP DNS will work because it doesn't have an entry for the server that is "down" while another user won't work because they do have an entry for the server that is down.

In the first case above, if I replaced the period with "colby.edu" the address "colby.edu" would resolve properly. However that isn't true for the second example.

Basically, if a name server in the Domain Name Server list goes down and you query on a name that appears in the domain name list that name may not get resolved to its IP address. I say may because in example #1 if I add the entry:

Domain
IP Address
.
137.146.210.37

to the DNS information then "colby.edu" does resolve to its proper IP address.
There are several ways to setup MacTCP to handle domain name servers:

Method 1
Domain
IP Address
Default
colby.edu
137.146.210.37
X
.
137.146.210.33

With this configuration, all DNS lookups within the domain of "colby.edu" (for example, ftp.colby.edu) will be made to 137.146.210.37. Lookups with any other domain (for example, ftp.support.apple.com) will go to 137.146.210.33. The "." ends up being a wild card that matches anything that "colby.edu" does not.

The draw back to this method is that 137.146.210.37 is not used for all lookups. This can be a real problem if the second name server is slow or unreliable.

Also, if you have a machine with the same name as the domain, MacTCP will look for it in the parent domain. In your situation, the host "colby.edu" has the same name as the domain. So MacTCP thinks the host is in the "edu" domain and uses 137.146.210.33 for the lookup. This is okay as long as 137.146.210.33 is up. If it is down, the name lookup will fail even though 137.146.210.37 is up.

This is the most likely the problem you are experiencing.

Method 2

Domain
IP Address
Default
.
137.146.210.37
X
.
137.146.210.33


This method works well in most respects. 137.146.210.37 would be used for all DNS lookups unless it was down. If 137.146.210.37 were down, then 137.146.210.33 would be used instead.

The only problem with this method is that you must use fully qualified domain names even when addressing hosts in your domain. For example, if you were using the host "test.colby.edu" and wanted to telnet to ftp.colby.edu, you would have to type "telnet ftp.colby.edu". If MacTCP were setup as in example 1 above, all you would have to type is "telnet ftp".


Method 3

Domain
IP Address
Default
colby.edu
137.146.210.37
X


This method is a good way to go if your primary domain server never goes down.


Method 4

Domain
IP Address
Default
colby.edu
137.146.210.37
X
.
137.146.210.37
.
137.146.210.33


This method is the best way to go and the one we recommend using. It will use 137.146.210.37 for all lookups unless it is down and still allows you to use partially qualified domain names.

This method should solve your problem.
Published Date: Feb 19, 2012