Networking on z/OS
|
Previous topic |
Next topic |
Contents |
Glossary |
Contact z/OS |
PDF
Examples of managing TCP/IP Networking on z/OS |
|||
|
TCP/IP, like VTAM, has a number of commands available to monitor and change the environment. TCP/IP provides two methods of issuing most commands, either through the z/OS console or from within a TSO or z/OS UNIX environment. However, the more powerful commands for controlling the TCP/IP environment are issued from the z/OS system console. This section focuses on console commands only. The TCP/IP commands are documented in z/OS IP System Administrator's Commands. There are many commands for displaying and testing a TCP/IP network. Commands such as PING and TRACERTE are not covered here. They are effectively standard across all platforms and commonly used. Examples of displaying TCP/IP The DISPLAY TCPIP,,NETSTAT command is often used to monitor TCP connections. On a busy host, the command would need to be narrowed in focus to only display connections for a specific port. For example, a display of all TN3270 connections (port 23) can be found in Figure 1. The
complete command issued was:
D TCPIP,tcpprocname,NETSTAT,ALLCON,PORT=23 In this display, a network administrator can determine at a glance the number of connections and the state of each connection. If a problem is noted, the IP address of the remote host ("FOREIGN SOCKET") is readily available. Figure 1. DISPLAY NETSTAT of port
23
EZZ2500I NETSTAT CS V1R6 TCPIP USER ID CONN LOCAL SOCKET FOREIGN SOCKET STATE TCPIP 00000017 0.0.0.0..23 0.0.0.0..0 LISTEN TCPIP 0000D4DE 192.168.246.24..23 192.168.6.251..2119 ESTBLSH TCPIP 00244B11 192.168.246.24..23 192.168.7.99..1499 CLOSWT 3 OF 3 RECORDS DISPLAYED On a regular basis, some automation programs check device or route status using the DISPLAY NETSTAT command. A network administrator might do the same manually, or might do so in response to a reported connectivity problem. To check the status of all TCP/IP devices, the following command
might be issued:
D TCPIP,tcpprocname,NETSTAT,DEV Figure 2 shows the output from the command. Note the LNKSTATUS field, which describes whether the device is fully functional ("READY") or not. In addition, various statistics and counts can be found. Figure 2. DISPLAY NETSTAT DEV command output
DEVNAME: OSA100 DEVTYPE: MPCIPA
DEVSTATUS: READY CFGROUTER: NON ACTROUTER: NON
LNKNAME: OSATR100 LNKTYPE: IPAQTR LNKSTATUS: READY
NETNUM: N/A QUESIZE: N/A SPEED: 0000000100
MACADDRORDER: NON-CANONICAL SRBRIDGINGCAPABILITY: YES
IPBROADCASTCAPABILITY: NO ARPBROADCASTTYPE: ALL RINGS
ARPOFFLOAD: YES ARPOFFLOADINFO: YES
ACTMTU: 17914
READSTORAGE: GLOBAL (4096K) INBPERF: BALANCED
BSD ROUTING PARAMETERS:
MTU SIZE: 00000 METRIC: 00
DESTADDR: 0.0.0.0 SUBNETMASK: 255.255.255.128
MULTICAST SPECIFIC:
MULTICAST CAPABILITY: YES
GROUP REFCNT
----- ------
224.0.0.1 0000000001
LINK STATISTICS:
BYTESIN = 7721257
INBOUND PACKETS = 44830
INBOUND PACKETS IN ERROR = 85896
INBOUND PACKETS DISCARDED = 0
INBOUND PACKETS WITH NO PROTOCOL = 0
BYTESOUT = 252
OUTBOUND PACKETS = 3
OUTBOUND PACKETS IN ERROR = 0
OUTBOUND PACKETS DISCARDED = 0
1 OF 1 RECORDS DISPLAYED
If a connectivity problem is apparent and the device appears to be in good working order, the next step would be to ensure that there were no routing problems with respect to (or from the perspective of) the z/OS host. Obviously, a routing problem could exist elsewhere in the network. The
command to display routes is:
D TCPIP,tcpprocname,NETSTAT,ROUTE Figure 3 shows sample output from a NETSTAT ROUTE command. A network administrator would need to know which network is experiencing connectivity problems. The network administrator would then scan this table for the appropriate route taken to reach the network. The flags field tells the network administrator
information about the route. For example, in this display, the flags shown
are:
Other route flags exist and can be found documented under the NETSTAT command in z/OS IP System Administrator's Commands. Figure 3. DISPLAY NETSTAT ROUTE command
EZZ2500I NETSTAT CS V1R6 TCPIP 278 DESTINATION GATEWAY FLAGS REFCNT INTERFACE DEFAULT 192.168.246.1 UGS 000013 ETH1 DEFAULT 192.168.247.129 GS 000000 OSATR104 9.21.111.210/32 0.0.0.0 H 000000 SNA1 9.23.246.0/24 0.0.0.0 US 000000 ETH1 9.23.246.0/24 0.0.0.0 S 000000 ETH2 9.23.246.16/32 0.0.0.0 UH 000000 VLINK1 9.23.246.23/32 0.0.0.0 H 000000 ETH2 9.23.246.24/32 0.0.0.0 UH 000000 ETH1 9.23.247.128/25 0.0.0.0 US 000000 OSATR100 9.23.247.128/25 0.0.0.0 S 000000 OSATR104 9.23.247.130/32 0.0.0.0 H 000000 OSATR104 9.23.247.135/32 0.0.0.0 UH 000000 OSATR100 127.0.0.1/32 0.0.0.0 UH 000020 LOOPBACK 13 OF 13 RECORDS DISPLAYED Examples of controlling TCP/IP You can alter the TCP/IP configuration with the VARY TCPIP,,OBEYFILE command. The OBEYFILE command is a very powerful command, since it can change any aspect of the TCP/IP configuration. This is because the OBEYFILE command runs a process similar to the process that runs during TCP/IP startup. An OBEYFILE causes TCP/IP to read a configuration file in the same fashion as the TCP/IP PROFILE data set is read at startup. A sample of an OBEYFILE command
is as follows:
VARY TCPIP,tcpprocname,OBEYFILE,DSN=your.obey.file
In this example, your.obey.file might contain a new set of DEVICE and LINK statements, a HOME statement, or both. Sometimes TCP/IP connections need to be cleared by issuing a VARY TCPIP,,DROP command. Before issuing the command, a network administrator would have discovered a connection that needed to end. Either the connection is an undesired connection entirely, or else it is in a state needing external intervention. Such a connection would be discovered using the DISPLAY NETSTAT command illustrated in Figure 1. Note
in this example that the last connection is in a state of CLOSWT. A CLOSWT
connection is often an indication of a problem with a TCP/IP application.
The application might have left this connection in this unusable state indefinitely.
The DROP command can be used to cleanup (remove) such a connection. The command
to remove the CLOSWT connection above would need to use the connection number
to identify it on a DROP command, as follows:
VARY TCPIP,tcpprocname,DROP,CONN=244B11 This command would clean up the connection as far as the z/OS TCP/IP is concerned. The VARY TCPIP,,STOP and VARY TCPIP,,START commands are used for stopping or starting TCP/IP devices. These commands are often the first set of commands issued when a network administrator discovers a device failure. For example, if a device problem was detected and the device was known to be inoperative, a VARY STOP followed by a VARY START would be attempted.
A sample command would be:
VARY TCPIP,tcpprocname,START,OSA2380 This command causes TCP/IP to attempt to restart device OSA2380. |
Copyright IBM Corporation 1990, 2010 |