28 Communications Server for z/OS V1R7 TCP/IP Implementation, Volume 1 - Base Functions, Connectivity, and Routing
When considering allowing applications to use their own set of statements, it is important to
set up a DEFAULTTCPIPDATA file, so the environment will provide the application owners
with the possibility of using their own settings, while it will maintain the basic settings defined
for those who do not want to define their own definitions.
2.3.2 Using the Resolver address space in a multiple stack environment
When implementing a Resolver address space with global settings in a multiple stack
environment, we must be very careful. The Resolver address space is a single process within
the z/OS LPAR, which means the global environment (GLOBALTCPIPDATA) statements will
have an impact on all stacks within the z/OS LPAR.
What should be taken into consideration when deciding whether to use GLOBALTCPIPDATA
is to verify that all stacks will use common Resolver statements, such as NameServer and
domainorigin. If they cannot use common Resolver statements, then you must use distinct
TCPIP.DATA data sets for setting up a DEFAULTTCPIPDATA file to define a default TCP/IP
stack for applications that do not define their own Resolver statements.
In our scenario, we will implement a global environment defining a common set of
statements. This will allow each stack to use its own TCPIP.DATA data set to define the local
environment and will create a default TCPIP.DATA defining stack TCPIPA as the default
TCPIPJOBNAME statement (see Figure 2-6).
Figure 2-6 Multiple stacks with global Resolver environment
Important: In some Resolver environments, the use of the trace functions (such as
SockDebug or TraceResolver) may affect performance. Therefore, we recommend using
the method described in “CTRACE - RESOLVER (SYSTCPRE)” on page 46.
Resolver
TCPIPA
Stack A
TCPIPB
Stack B
LPAR30
GLOBALTCPIPDATA('TCPIPA.TCPPARMS(GLOBAL)')
DEFAULTTCPIPDATA('TCPIPA.TCPPARMS(DEFAULT)')
GLOBALIPNODES (’TCPIPA.TCPPARMS(IPNODES)’)
COMMONSEARCH
RSSETUP
//RESOLVER PROC PARMS='CTRACE(CTIRES00)'
//EZBREINI EXEC PGM=EZBREINI,REGION=0M,TIME=1440,PARM=&PARMS
//SETUP DD DSN=USER1.TCPCS.TCPPARMS(RSSETUP),DISP=SHR,FREE=CLOSE
TCPIPA.TCPPARMS(GLOBAL):
Nameserver 10.1.1.1
Domain itso.ibm.com
Resolvevia UDP
...
TCPIPB.TCPPARMS(DATAB30):
Hostname SC30B
TCPIPJobname TCPIPB
...
TCPIPA.TCPPARMS(DATAA30):
Hostname SC30A
TCPIPJobname TCPIPA
...
TCPIPA.TCPPARMS(DEFAULT):
Hostname SC30
TCPIPJobname TCPIPA
Chapter 2. The Resolver 29
Using local settings in a multiple stack environment
When designing a multiple stack scenario, it is important to check each application that will be
used and how it will be implemented in the environment. Each type of application has its own
relationship with a TCP/IP stack, for example:
򐂰 A native TCP/IP sockets program will always use one stack only—by default the stack that
is identified in the TCPIPJOBNAME option in the chosen Resolver configuration file.
However, the stack can also be chosen via the program configuration and API calls to
associate the program with a chosen stack, as shown in Figure 2-7.
Figure 2-7 Native TCP/IP applications in a multiple stack environment
򐂰 Applications using UNIX System Server callable APIs or LE C/C++ sockets APIs can be
implemented using a generic bind to open the same port in all TCP/IP stacks. By doing so,
the application will accept incoming connections or UDP datagrams over any interface of
all connected stacks, as shown in Figure 2-8 on page 30.
Outbound connections or UDP datagrams are processed by the C-INET pre-router, and
the stack with the best route to the destination is chosen.
When using a generic bind, the server port number must be reserved in all stacks. If one
has it reserved to another address space, the bind() call fails.
When using the generic bind, it does not matter if the chosen Resolver configuration file
has a TCPIPJOBNAME; it is not used when the server is a pure generic server.
Inbound Outbound
Native MVS
Socket
Program
X
TCPA TCPB
TCPC
YZV
C-INET
BPX Callable Sockets
Pre-routing Table
TCPIPJobname
TCPB
30 Communications Server for z/OS V1R7 TCP/IP Implementation, Volume 1 - Base Functions, Connectivity, and Routing
Figure 2-8 UNIX System Server callable APIs or LE C/C++ sockets APIs using Generic bind in a
multiple stack environment
򐂰 Applications using UNIX System Server callable APIs or LE C/C++ sockets APIs can also
use a specific bind to open a socket. A bind-specific server socket will only receive
connections from the stack that owns the IP address to which the socket is bound.
Outbound connections or UDP datagrams will be handled by the stack that offers the best
route to the destination IP address, as shown in Figure 2-9.
Figure 2-9 UNIX System Server callable APIs or LE C/C++ sockets APIs using specific bind in a
multiple stack environment
Inbound Outbound
socket( )
bind(8001, 0)
listen( )
X
TCPA TCPB
TCPC
YZV
C-INET
BPX Callable Sockets
Pre-routing Table
Inbound Outbound
socket( )
bind(8001, Y)
listen( )
X
TCPA TCPB
TCPC
YZV
C-INET
BPX Callable Sockets
Pre-routing Table
Application-specific
Configuration Data

Get Communications Server for z/OS V1R7 TCP/IP Implementation, Volume 1: Base Functions, Connectivity, and Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.