Configuring TCP/IP group access by using the BSDS (INADDR_ANY) method

The bootstrap data set (BSDS) method is the preferred method for configuring TCP/IP communications for a Db2® data sharing group. Use this method to specify dynamic virtual IP addresses (DVIPAs) in the bootstrap data set by using the DSNJU003 utility.

Before you begin

You should be familiar with general instructions for configuring TCP/IP communications for Db2. See Connecting Db2 for z/OS distributed database systems with TCP/IP.

The steps in this topic require you to specify several types of VIPADYNAMIC statements. For more information, see TCP/IP profile (PROFILE.TCPIP) and configuration statements.

About this task

This task describes how to define the DVIPAs that are needed by a Db2 data sharing group by specifying those DVIPAs in the BSDS. This task uses IPV4 addressing to illustrate the configuration process, but IPV6 addresses are also supported.

A member of a data sharing group can be configured to have a maximum of two IP addresses: a group IP address and a member IP address. Each pair can be of type IPV4 or IPV6, or you can specify a pair of both IPV4 and IPV6 addresses.

A group IP address
A group IP address must be the same for all members of a data sharing group. You define a group IP address by specifying a GRPIPV4 address, a GRPIPV6 address, or both in the BSDS. The instructions in this topic show how to define a group IP address as a VIPADISTRIBUTE must be the same for all members of a data sharing group. You define a group IP address by specifying a GRPIPV4 address, a GRPIPV6 address, or both in the BSDS. The instructions in this topic show how to define a group IP address as a VIPADISTRIBUTE VIPA address, which is also referred to as a sysplex distributor address or a distributing DVIPA (DDVIPA). Using a sysplex distributor address is the preferred way to define a group IP address.
Note: You can define a separate DDVIPA independent of the DDVIPA defined to Db2 as the group's IP address to also distribute connections to the member ports of a data sharing group, possibly with a different distributing method; however, Db2 will have no knowledge of this IP address.
Restriction: In some TCP/IP configurations, a DDVIPA is configured with no port values specified in its definition so that it can be shared by many applications, and all of those applications bind their ports to this DDVIPA. In these types of configurations in which the DDVIPA dynamically learns the ports it is to manage, the DDVIPA cannot be used exclusively as the Db2 group IP address in its BSDS as the GRPIPV4 address or GRPIPV6 address. For TCP/IP configurations in which a DDVIPA is used by many applications, you must use the BINDSPECIFIC method to configure TCP/IP group access.
A member IP address
A member IP address must be unique to each member of a data sharing group. You define a member IP address by specifying an IPV4 address, an IPV6 address, or both in the BSDS. The instructions in this topic show how to define a member IP address as a VIPARANGE IP address, which is the preferred way to define member IP addresses. A TCPIP VIPARANGE address will not physically exist until Db2 is started with its IPV4 or IPV6 set to a VIPARANGE address value.
Important:
  • The BSDS and BINDSPECIFIC methods are mutually exclusive. If any BIND specifications exist on any Db2 server port entries of the PORT reservation statement of the currently active PROFILE.TCPIP, connection requests will fail.
  • This task is typically performed by or in consultation with a network communications administrator.

Procedure

  1. Reserve the SQL port and resynchronization ports for each member of the data sharing group. If your environment is set up to receive SSL connection requests, also reserve the secure SQL port.
    Edit the PROFILE.TCPIP file for each LPAR in the sysplex where a member of the data sharing group might be started and add entries for these ports to the PORT reservation statement as shown in the following example:
    PORT
            446 TCP DB2A SHAREPORT  /* DRDA port for SQL requests */
            448 TCP DB2A SHAREPORT  /* Secure SQL port for SSL requests */
           5001 TCP DB2A            /* Resync port; unique for each member */
            446 TCP DB2B SHAREPORT
            448 TCP DB2B SHAREPORT
           5002 TCP DB2B
            446 TCP DB2C SHAREPORT
            448 TCP DB2C SHAREPORT
           5003 TCP DB2C
    
    In this example, ports are reserved for a data sharing group that includes members DB2A, DB2B, and DB2C. Three ports are reserved for each of these members:
    • Port 446 is the DRDA port number for initially receiving SQL requests (TCPPORT) and also the port where RESTful service requests are processed.
    • Port 448 is the secure DRDA port number for receiving SSL connection requests (SECPORT). You need to reserve this port only if you configured Db2 to accept connection requests that use the SSL protocol. This port can also be used to accept RESTful service requests over connections that use the SSL protocol.
    • Ports 5001, 5002, and 5003 are the resynchronization ports (RESPORT). The resynchronization ports must be unique for each member of the data sharing group.

    If more than one member is started on the same LPAR, you must specify the SHAREPORT parameter on the DRDA port statement and on the secure SQL port statement if it is used. The SHAREPORT parameter enables multiple listeners on the same port.

  2. Define a range of member IP addresses for use by the data sharing group.
    In the PROFILE.TCPIP file for each LPAR in the sysplex where a member of the data sharing group can be started, use the VIPARANGE statement to specify the range of IP addresses that will be available to the data sharing group members. For example:
    VIPARANGE DEFINE 255.255.255.255 10.1.1.2
    VIPARANGE DEFINE 255.255.255.255 10.1.1.3
    VIPARANGE DEFINE 255.255.255.255 10.1.1.4
    

    Because this data sharing group includes three members, three VIPARANGE statements are required.

  3. Designate an LPAR of the sysplex to be the primary sysplex distributor for the group IP address. This LPAR's activated PROFILE.TCPIP VIPADYNAMIC statements must include the VIPADISTRIBUTE statement and a related VIPADEFINE statement for the group IP address. For example,:
    VIPADEFINE 255.255.255.255 10.1.1.1 
    VIPADISTRIBUTE DEFINE 10.1.1.1 PORT 446 448 DESTIP ALL
    
    In this example:
    • The VIPADEFINE statement designates the LPAR where this statement is activated to be the primary sysplex distributor of the sysplex.
    • The VIPADISTRIBUTE statement specifies that 10.1.1.1 is to be a distributing IP address and includes in its definition the DRDA SQL/REST port numbers and secure port numbers that you reserved in a previous step.
    • DESTIP ALL specifies that all TCP/IP stacks that are active in the sysplex and that contain servers listening on any of the specified PORTs can receive the connection requests that target the IP address.
  4. Create and run a change log utility job to update the members’ DDF record to specify the IP addresses.
    Start of change

    For example, the following DDF statements add the ports and IP addresses for the DB2B member, which is assigned to port 5002:

    //DB2B		EXEC PGM=DSNJU003
    //SYSIN  DD *
    DDF LOCATION=GROUP1,PORT=446,SECPORT=448,RESPORT=5002
    DDF IPV4=10.1.1.2,GRPIPV4=10.1.1.1
    
    End of change

Example

The following example TCPIP.PROFILE PORT statements show how you might define the ports and IP addresses to configure TCP/IP for group access by using the BSDS method. The values that are used in these examples match the values that are used in the procedure section of this topic.

z/OS LPAR 1: Primary sysplex distributor
PORT
   446 TCP DB2A SHAREPORT
   448 TCP DB2A SHAREPORT
 5001 TCP DB2A
   446 TCP DB2B SHAREPORT
   448 TCP DB2B SHAREPORT
 5002 TCP DB2B
   446 TCP DB2C
   448 TCP DB2C
 5003 TCP DB2C
VIPADYNAMIC
  VIPARANGE DEFINE 255.255.255.255 10.1.1.2
  VIPARANGE DEFINE 255.255.255.255 10.1.1.3
  VIPARANGE DEFINE 255.255.255.255 10.1.1.4
  VIPADEFINE 255.255.255.255 10.1.1.1
  VIPADISTRIBUTE DEFINE 10.1.1.1 PORT 446 448 DESTIP ALL
ENDVIPADYNAMIC
z/OS LPAR2: Backup sysplex distributor 1
PORT
   446 TCP DB2A SHAREPORT
   448 TCP DB2A SHAREPORT
 5001 TCP DB2A
   446 TCP DB2B SHAREPORT
   448 TCP DB2B SHAREPORT
 5002 TCP DB2B
   446 TCP DB2C
   448 TCP DB2C
 5003 TCP DB2C
VIPADYNAMIC
  VIPARANGE DEFINE 255.255.255.255 10.1.1.2
  VIPARANGE DEFINE 255.255.255.255 10.1.1.3
  VIPARANGE DEFINE 255.255.255.255 10.1.1.4
  VIPABACKUP 2 10.1.1.1
  VIPADISTRIBUTE DEFINE 10.1.1.1 PORT 446 448 DESTIP ALL
ENDVIPADYNAMIC
z/OS LPAR3: Backup sysplex distributor 2
PORT
   446 TCP DB2A SHAREPORT
   448 TCP DB2A SHAREPORT
 5001 TCP DB2A
   446 TCP DB2B SHAREPORT
   448 TCP DB2B SHAREPORT
 5002 TCP DB2B
   446 TCP DB2C
   448 TCP DB2C
 5003 TCP DB2C
VIPADYNAMIC
  VIPARANGE DEFINE 255.255.255.255 10.1.1.2
  VIPARANGE DEFINE 255.255.255.255 10.1.1.3
  VIPARANGE DEFINE 255.255.255.255 10.1.1.4
  VIPABACKUP 1 10.1.1.1
  VIPADISTRIBUTE DEFINE 10.1.1.1 PORT 446 448 DESTIP ALL
ENDVIPADYNAMIC