IPv6 name servers and the resolver

The z/OS® resolver can communicate to a Domain Name System (DNS) name server using either IPv4 or IPv6 communications. When the resolver is operating on an IPv6-capable system, the resolver opens either an IPv6 socket or an IPv4 socket to connect to the target DNS name server, depending on the IP addresses of the potential target name servers. If both IPv6 and IPv4 addresses are specified as IP addresses for the target name servers, the resolver opens an IPv6 socket and relies on TCP/IP stack processing of IPv4-mapped IPv6 addresses to provide the appropriate communication with the name server. When the resolver is operating on an IPv4-only system, any IPv6 address specified as a target name server is ignored.

The list of name servers to be searched, as defined using the NSINTERADDR or NAMESERVER configuration statements in the TCPIP.DATA file, is stored in the res_state control block structure. Depending on the API used, applications can obtain the res_state control block, and can examine or even modify the contents of the res_state list of name servers (nsaddr_list). The nsaddr_list structure is not designed to accommodate IPv6 addresses, and changing the structure to accommodate IPv6 addresses would adversely affect existing applications. Therefore, resolver does not save IPv6 addresses into the nsaddr_list array, and returns only the IPv4 addresses coded on the NSINTERADDR or NAMESERVER configuration statements. If only IPv6 addresses are specified for name server addresses, the nsaddr_list array returns as an empty list in res_state. If your application examines the contents of the res_state control block, in particular the nsaddr_list information, and requires that at least one name server IP address be present in the list, you need to specify at least one IPv4 address on a NSINTERADDR or NAMESERVER statement in the TCPIP.DATA file used by the application. Although nsaddr_list does not reflect the IPv6 addresses specified in the TCPIP.DATA file, resolver maintains the full list internally and uses the entire list for searching and caching purposes, unless the application modifies nsaddr_list for its own purposes.

The following z/OS functions do not use the resolver's ability to communicate to a name server using IPv6:

If you choose to use IPv6 name servers, ensure that the setting for the MAXSOCKETS parameter on the BPXPRMxx AF_INET6 NETWORK statement is sufficiently large enough to include the number of IPv6 sockets being opened by resolver. Use the following rough calculations to determine whether the MAXSOCKETS value is large enough:

  1. Determine how many concurrent resolver calls typically occur on your system. Each resolver call that involves communication with a DNS name server opens 1 or 2 sockets depending on the actual resolver API being used.
  2. Determine the largest number of IPv6 sockets you have open on your system at any one point in time.
  3. Add (number of concurrent resolver calls * 2) and the largest number of IPv6 sockets together. Compare this number against the setting of MAXSOCKETS on the appropriate BPXPRMxx AF_INET6 NETWORK statement.
    • If the MAXSOCKETS setting is the larger value, then the setting is acceptable.
    • If the MAXSOCKETS setting is the lesser value, update the MAXSOCKETS setting to the larger number.