Mainframe Path Start learning free
Applied11 min readLesson 1 of 3

Communications Server and the TCP/IP stack

z/OS Communications Server provides both TCP/IP and SNA networking. The TCP/IP stack runs as a started task, is configured by a profile dataset, and reaches the network through OSA adapters. A handful of commands tell you what it is doing.

One product, two networks

Every program on z/OS that talks to anything outside the box, from a CICS web service to an FTP transfer to a 3270 logon, goes through z/OS Communications Server. It has two halves: the IP side, a full TCP/IP stack, and the SNA side, implemented by VTAM. They are closely linked: VTAM must be active before TCP/IP can start its OSA and other VTAM-controlled interfaces, and some IP hardware definitions live in VTAM.

Where networking sits on z/OS
ApplicationsCICS, IMS, DB2, MQ, FTP, TN3270, SSH, z/OS Connect
Sockets APIsUSS sockets, assembler and other socket interfaces
TCP/IP stackStarted task, configured by its profile
VTAM and DLC layerDevice control for OSA and other links
HardwareOSA-Express adapters, HiperSockets

The stack as a started task

The TCP/IP stack is a started task, very often called TCPIP, though the name is set by the site. Most systems run one stack; running several is possible but uncommon. Around it run other address spaces, such as the resolver (name lookups), Policy Agent (security and quality-of-service policies, including AT-TLS), the FTP daemon and the TN3270 server.

OSA adapters and HiperSockets

OSA-Express (Open Systems Adapter) cards are the mainframe's network interface cards, shared by several LPARs. They are defined in the I/O configuration with a channel path type that sets their mode.

TypeModeUsed for
OSDQDIONormal high-performance Ethernet traffic for TCP/IP
OSENon-QDIOOlder or special cases, including some SNA traffic
OSCOSA-ICCConsole and 3270 sessions for operators, independent of TCP/IP
IQDHiperSocketsMemory-speed IP between LPARs on the same machine, no cables

The profile and its key statements

The stack reads its configuration from the TCP/IP profile dataset (often referred to as PROFILE.TCPIP) when it starts. You will rarely edit it as a beginner, but reading it explains most behaviour. Statement details vary by release; this is the concept-level view.

Profile statements you will seeWhat it means
TCPCONFIG / IPCONFIG
Stack-wide TCP and IP settings
INTERFACE ... DEFINE IPAQENET
Defines an IPv4 OSA QDIO interface and its address; older profiles use DEVICE and LINK pairs
HOME
IP addresses owned by this stack (older style; INTERFACE carries its own address)
BEGINROUTES ... ENDROUTES
Static routes, including the default gateway
PORT
Reserves a port for a named job, so only that job can listen on it
AUTOLOG
Started tasks the stack starts and restarts, such as FTPD
VIPADYNAMIC ... ENDVIPADYNAMIC
Dynamic VIPA and Sysplex Distributor definitions

Separately, resolver configuration (often a TCPIP.DATA dataset or file) tells programs which stack to use, the default domain and which name servers to ask. Changes to the profile can be applied to a running stack with V TCPIP,,OBEYFILE,dsname, although some settings need a restart. Both are change-controlled.

Commands for looking

FromCommandShows
ConsoleD TCPIP,,NETSTAT,HOMEIP addresses this stack owns
ConsoleD TCPIP,,NETSTAT,CONNCurrent connections and listeners
ConsoleD TCPIP,,NETSTAT,DEVLINKSInterfaces and their status
TSONETSTAT ROUTEThe routing table
TSOPING hostWhether a host answers ICMP echo
TSOTRACERTE hostThe route packets take to a host
USS shellnetstat, ping, tracerouteThe same functions from a z/OS UNIX shell (also named onetstat, oping, otracert)
D TCPIP,,NETSTAT,HOME response (illustrative)
HOME ADDRESS LIST:
LINKNAME:   OSAPRD1
  ADDRESS:  10.20.30.41
    FLAGS:  PRIMARY
LINKNAME:   VIPA1
  ADDRESS:  10.20.40.10
LINKNAME:   LOOPBACK
  ADDRESS:  127.0.0.1
3 OF 3 RECORDS DISPLAYED

If the stack is not called TCPIP, put its name between the commas, for example D TCPIP,TCPIPB,NETSTAT,HOME. TSO and USS commands use the stack named in your resolver configuration.

TRY IT YOURSELF

Which TSO command shows the route packets take to a remote host?

Show a hint

It is the z/OS spelling of traceroute.

Show the solution

TRACERTE host traces the path from the stack to the remote host.

Common mistakes

Assuming TCP/IP works without VTAM

Communications Server's IP side depends on VTAM for device control. If VTAM is not up, the stack cannot start its OSA interfaces.

Editing the profile and expecting instant effect

The profile is read at start. Running changes need an OBEYFILE, and some statements only take effect on restart. Always go through change control.

Querying the wrong stack

On a system with more than one stack, commands without a stack name may look at a different stack from the one your application uses.

What you will see at work

Key terms

Check your understanding.
Take this lesson's quiz and save your progress. Free.

Take the lesson quiz
VIPA, Sysplex Distributor and the TN3270 server →