Hostname Resolution

The following urlcp settings control DNS (hostname resolution):

  • dnsdomains or dnsdomain (list) Takes a list of one or more search domains. Hostnames that do not contain a dot are searched for in each of these domains, in order. The default list is obtained from /etc/resolv.conf or the equivalent, depending on the system. Returns the previous list of domains. The limit is 5 domains. Has no effect if dnsmode is sys. Added in version 3.01.960500000 20000608.

  • dnshostsfile (string)

    Sets the file to use for local hostname resolution, i.e. for the hosts value of dnsservices. The default is /etc/hosts on Unix, and %SYSTEMROOT%System32driversetchosts on Windows (potentially altered by registry). Returns 0 on error. Added in version 7.07.1550614572 20190219.

  • dnsignoretrunc or dnsigntc (boolean) Sets whether to ignore the TC (truncated message) flag in DNS replies. This flag may be set by the name server if the reply is too large to fit in one UDP packet and was truncated; a typical cause of this is a hostname with many IP addresses, e.g. DNS-based load management. Since only one IP is used from the reply, it is safe to ignore this flag. On by default. Added in version 3.01.982400000 20010216.

  • dnsmode (string)

    Sets the routines to use for domain name resolution. The second argument is either int to use the internal (non-blocking) Texis functions, sys to use the system's C library functions (blocking), or (in version 3.01.993260000 20010622 and later), intsys which uses internal routines unless no nameservers can be found in which case the system C library functions are used. Returns the previous setting. The default is intsys. (Version 3.01.993260000 20010622 and earlier defaulted to int and had no intsys setting.) In version 4.04.1068200000 20031106 and later, an empty string will restore the default setting.

    Note that the sys (and intsys if no nameservers found) routines are blocking: thus a PARALLEL fetch or nslookup will in effect be serial, and slow DNS traffic may even cause the timeout to be exceeded for some fetches. Also, certain information and features of nslookup and nsinfo may be ignored if sys mode is set, as well as other DNS-related settings in urlcp.

  • dnsrecurse (boolean) Sets whether to request recursion to other nameservers when resolving hostnames. The default is on. Added in version 3.01.989630000 20010511. Returns previous setting.

  • dnsretrans (integer) Sets the initial retransmit interval (in seconds) for DNS lookups. Has no effect if dnsmode is sys. Default 5.

  • dnsretry (integer) Sets the max number of retries for DNS lookups. Returns previous setting. Has no effect if dnsmode is sys. Default 4.

  • dnsservices (list) Takes a list of one or more of the strings hosts or bind, indicating the name resolution services to use and the order in which to try them. Returns previous setting. Has no effect if dnsmode is sys.

     

  • nameservers (list) Sets the list of nameservers to use, in order, for DNS resolution. Takes a list of dotted-decimal IP address strings, and returns the previous list of nameservers. Has no effect if dnsmode is sys.


Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.