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.
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.
| Type | Mode | Used for |
|---|---|---|
| OSD | QDIO | Normal high-performance Ethernet traffic for TCP/IP |
| OSE | Non-QDIO | Older or special cases, including some SNA traffic |
| OSC | OSA-ICC | Console and 3270 sessions for operators, independent of TCP/IP |
| IQD | HiperSockets | Memory-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.
TCPCONFIG / IPCONFIGINTERFACE ... DEFINE IPAQENETHOMEBEGINROUTES ... ENDROUTESPORTAUTOLOGVIPADYNAMIC ... ENDVIPADYNAMICSeparately, 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
| From | Command | Shows |
|---|---|---|
| Console | D TCPIP,,NETSTAT,HOME | IP addresses this stack owns |
| Console | D TCPIP,,NETSTAT,CONN | Current connections and listeners |
| Console | D TCPIP,,NETSTAT,DEVLINKS | Interfaces and their status |
| TSO | NETSTAT ROUTE | The routing table |
| TSO | PING host | Whether a host answers ICMP echo |
| TSO | TRACERTE host | The route packets take to a host |
| USS shell | netstat, ping, traceroute | The same functions from a z/OS UNIX shell (also named onetstat, oping, otracert) |
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 DISPLAYEDIf 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.
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
Communications Server's IP side depends on VTAM for device control. If VTAM is not up, the stack cannot start its OSA interfaces.
The profile is read at start. Running changes need an OBEYFILE, and some statements only take effect on restart. Always go through change control.
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
- Network questions on z/OS usually start with 'which stack, which address, which port'; NETSTAT answers all three.
- Network specialists and z/OS systems programmers share ownership of the profile, OSA definitions and VTAM.
- Developers mostly meet the stack through port numbers, host names and firewall requests for their applications.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.