Standard server lookup

The various client utility programs in the Internet Utilities all look up the servers to contact, for their services, in a standard way.

Lookup parameters

Lookup is parameterized by the client itself and by command-line options supplied to the client program. The parameterization comprises a service name, a transport name, and a well-known port number for the service that the client wants to use, and control settings for things such as whether version 6 IP addresses for servers will be requested and whether and how SRV lookups will be employed.

The input to the lookup procedure is a string, which is either treated as a domain name or an IP address, usually according to the setting of a /BYIP command-line option or determined from whether the string is supplied via a /SERVER or a /SERVERIP command-line option.

Lookup by IP address

The standard server lookup procedure for IP addresses is as follows:

  1. The string supplied is converted to one or more IP version 4 addresses, or failing that IP version 6 addresses. It is a fatal error if neither conversion works. Multiple addresses are separated by semi-colons.

  2. Each address is combined with the well-known port number, to form the address+port+priority+weight tuple for a server. All priorities and weights are set to zero in this case.

Lookup by domain name

The standard server lookup procedure given domain names is as follows:

  1. The string supplied is passed through the standard name qualification procedure. It is a fatal error if name qualification fails.

  2. If the /SRV_SELF option has been enabled, the client issues a SRV query for the combination of service prefix, transport prefix, and the fully qualified domain name itself.

    If the response to that query is a success, the utility then issues A and AAAA queries as necessary to convert the resultant domain names to IP addresses. The ports, priorities, weights, and IP addresses obtained from the DNS become the list of servers to contact, and lookup stops here.

  3. If the /SRV_SUPERDOMAINS option has been enabled, the client issues zero or more SRV queries for the combination of service prefix, transport prefix, and progressively shorter superdomains of the fully qualified domain name, all of the way up to the root.

    If the response to any of those queries is a success, the utility then issues A and AAAA queries as necessary to convert the resultant domain names to IP addresses. The ports, priorities, weights, and IP addresses obtained from the DNS become the list of servers to contact, and lookup stops here.

  4. If the client is a content DNS client (the only such client in the Internet Utilities being the DNSGETZ command) or the content DNS server lookup utility (the DNSGETNS command), the client issues an NS query for the fully qualified domain name.

    If the response to that query is a success, the utility then issues A and AAAA queries as necessary to convert the resultant domain names to IP addresses. The IP addresses obtained from the DNS in conjunction with the well-known port become the list of servers to contact, with the ports and weights set to zero, and lookup stops here.

  5. If the client is an SMTP Relay client (the only such client in the Internet Utilities being the SMTPRC command) or the SMTP Relay server lookup utility (the DNSGETMX command), the client issues an MX query for the fully qualified domain name.

    If the response to that query is a success, the utility then issues A and AAAA queries as necessary to convert the resultant domain names to IP addresses. The priorities and IP addresses obtained from the DNS in conjunction with the well-known port become the list of servers to contact, with the weights set to zero, and lookup stops here.

  6. If the /IMPLICIT option is enabled, the client issues AAAA and A queries for the fully qualified domain name.

    If the response to that query is a success, the IP addresses obtained from the DNS in conjunction with the well-known port become the list of servers to contact, with the ports and weights set to zero, and lookup stops here.

  7. It is a fatal error if no (enabled) lookups succeed.

If the /IP6ADDR option is disabled, all AAAA lookups are eliminated from the above procedure.

If the /FETCHGLUE option is disabled, all explicit AAAA or A lookups are eliminated from the above procedure, and address information is only taken from "additional data" supplied by the proxy DNS server.


The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.