Starting TCP/IP support

Before you start DDF, ensure that z/OS® UNIX System Services and TCP/IP are started. Also ensure that the local host information is set up correctly in the TCP/IP configuration files.

About this task

Important: When using dynamic VIPA, the IP addresses that have been assigned to Db2 by the TCP/IP profile must be registered with the DNS.

Procedure

To start TCP/IP support:

Start DDF.

DDF executes the following steps when it is started:

  1. Establishes the TCP/IP listener by opening sockets for the DRDA SQL, Secure SQL, and resync ports to accept connections from remote locations.
  2. Obtains the hostname that is specified in TCPIP.DATA. The hostname is used to register with WLM and, in some cases, to obtain the IP address. You can specify the IP address that Db2 should use for communication with its partners as follows:
    • Note that Db2 13 is an IPv6 system and does not use gethostid to obtain the IP addresses because gethostid does not support IPv6. You can instead specify the address in the domain name server (DNS), if one is present, or in a local host file. You can specify an IPv4 address, an IPv6 address, or both, which should be mapped to the hostname that is specified in TCPIP.DATA. Db2 obtains the user-specified IP addresses by resolving the hostname.
    • If you want DDF to accept connections only on a specific IP address (IPv4 or IPv6), specify the IP address on the SQL port in the TCP/IP profile by using the BIND keyword. For example, use the following configuration, where 446 is the SQL port and Vx is either an IPv4 or IPv6 address:
      PORT
      446 TCP DB2ADIST BIND Vx                    
      With this method, Db2 only accepts connections on the specified IP address. Moreover, this method is not supported with secure SQL port. If your subsystem is running in data sharing mode, you must also specify an IP address on the DRDA resync port. For more details, see TCP/IP access methods for Db2 data sharing.
    • The most recommended place to specify the IP address is in the DDF communication record of the bootstrap data set (BSDS) by using the DSNJU003 utility. For example:
      //SAMPLE    EXEC PGM=DSNJU003                              
      //SYSIN    DD *                                
        DDF IPV4=1.2.3.4,                
            IPV6=1::2 
      The advantage of this approach is that Db2 accepts connections not only on the specified IP address, but on any IP address that is active on the TCP/IP stack. Additionally, connections are accepted on both secure and non-secure SQL ports. Db2 also resolves the hostname to an IP address through a name server or local host file to fill up any IP address that is not specified in the BSDS. For example, if the BSDS specified IPv4 but not IPv6, Db2 would try to obtain the IPv6 address by resolving the hostname.
    Important: IP addresses should not be specified simultaneously in both the Db2 BSDS and TCP/IP PORT statement. Binding to a specific IP address and binding to any IP address (INADDR_ANY) are mutually exclusive, and DDF TCP/IP services will not be available until the IP addresses are specified in only one place.
  3. Obtains the domain name by resolving the IPv6 address, if one is specified, or the IPv4 address through a name server or the local host file. If you use data sharing, member domain names are obtained by resolving member IP addresses, and group domain names are obtained by resolving group IP addresses.

    Important: Whether you use data sharing or not, Db2 13 uses the domain name that you specify in the name server, if one is present, or in a local host file, without further modifying or qualifying the name.However, DDF tolerates the absence of a domain name, when the IP address is specified in the Db2 BSDS.
    To determine the host IP address and domain name, issue a DISPLAY DDF command. The IPADDR field of the DSNL085I message displays the IPv4 and IPv6 addresses, if any, that are associated with the host.
    DSNL081I STATUS=STARTD
    DSNL082I LOCATION            LUNAME            GENERICLU
    DSNL083I STLEC1              USIBMSY.SYEC1DB2  -NONE
    DSNL084I TCPPORT=446   SECPORT=0     RESPORT=5001
    DSNL085I IPADDR=::9.30.113.198
    DSNL085I IPADDR=2001:DB8::8:800:200C:417A
    DSNL099I DSNLTDDF DISPLAY DDF REPORT COMPLETE
    Until the local host information is available, DDF TCP/IP services are not available to local and remote applications. If a failure occurs obtaining the local host information, DDF periodically attempts to get the local host information until successful or until DDF is stopped. DDF tolerates the absence of a domain name as long as an IP address is specified in the Db2 BSDS.
  4. Listens and accepts connection requests on SQL, secure SQL, and resync ports.