Command reference / sys

PING

Verify TCP/IP Connection

Tests connectivity between this system and a remote system by sending test packets and checking for replies. The page gives the primary command name as VFYTCPCNN, with PING as the alternate name. It cannot verify IP over SNA connections. The local domain name is appended to host names that lack a domain or a trailing period.

Allowed environments: *ALL. Positional parameters: 1.

Parameters

RMTSYS Remote system

Names the remote host to verify; the name must resolve and the host must be reachable. Names come from the TCP/IP host table or a name server, and resolution depends on ADRVERFMT.

Type
*CHAR
Required
Yes
Length
50
Case
Uppercase

Suggested / special values: *INTNETADR

*INTNETADR
The remote system is identified by the INTNETADR parameter instead of a name.

INTNETADR Remote internet address

The IPv4 or IPv6 address of the remote system. An IPv4 address with all ones or all zeros in its network or host portion is invalid. Enclose the address in apostrophes when typed on a command line.

Type
*CHAR
Required
No
Length
50
Case
Uppercase

ADRVERFMT Address version format

Sets how the RMTSYS host name is resolved. The default works out the method from the name, using IPv6 when the system has an IPv6 address configured.

Type
*CHAR
Required
No
Default
*CALC
Length
5
Case
Uppercase

Allowed values: *CALC, *IP4, *IP6

*CALC
The method is calculated from the host name; IPv6 is tried first if configured, then IPv4.
*IP4
Uses IPv4 host name resolution.
*IP6
Uses IPv6 host name resolution.

MSGMODE Message mode

Controls how much information is displayed. The first element sets the detail shown per response; the second sets the form of the summary message when errors occur.

Type
*ELEM
Required
No
Case
Uppercase
*VERBOSE
Displays messages as each response arrives.
*QUIET
Displays only the initial message and the summary messages.
*COMP
The summary is a completion message.
*ESCAPE
The summary is a monitorable escape message, useful when a program issues the request.
Elements in order

Response message detail Response message detail

Type
*CHAR
Required
No
Default
*VERBOSE
Length
8
Case
Uppercase

Allowed values: *VERBOSE, *QUIET

Summary, if response errors Summary, if response errors

Type
*CHAR
Required
No
Default
*COMP
Length
7
Case
Uppercase

Allowed values: *COMP, *ESCAPE

PKTLEN Packet length (in bytes)

Length of the data in each packet sent, excluding headers. Default is 256; valid range 8 to 65500.

Type
*UINT2
Required
No
Default
256
Range
8 to 65500
Case
Uppercase

NBRPKT Number of packets

How many packets are sent to the remote system. Default is 5; valid range 1 to 999.

Type
*UINT2
Required
No
Default
5
Range
1 to 999
Case
Uppercase

WAITTIME Wait time (in seconds)

How long to wait for each echo packet before that packet counts as a failure. Default is 1; valid range 1 to 120.

Type
*UINT2
Required
No
Default
1
Range
1 to 120
Case
Uppercase

LCLINTNETA Local internet address

Local address of the interface that outbound packets should use. Accepts the same IPv4 or IPv6 forms as INTNETADR.

Type
*CHAR
Required
No
Default
*ANY
Length
50
Case
Uppercase

Suggested / special values: *ANY

*ANY
Uses any interface's local internet address.

TOS Type of service

The service type hosts and routers use to balance throughput, delay, reliability, and cost. Not used when IPv6 address resolution verifies the connection.

Type
*CHAR
Required
No
Default
*NORMAL
Length
10
Case
Uppercase

Allowed values: *NORMAL, *MINDELAY, *MAXTHRPUT, *MAXRLB, *MINCOST

*NORMAL
Normal service for delivery of data.
*MINDELAY
Prompt delivery matters most for this connection.
*MAXTHRPUT
A high data rate matters most for this connection.
*MAXRLB
A higher level of effort to ensure delivery matters most.
*MINCOST
Lower monetary cost matters most for this connection.

IPTTL IP time to live (hop limit)

How many router hops a packet may cross before it is discarded, which helps prevent routing loops. IPv6 calls this the hop limit. Valid range 1 to 255.

Type
*UINT2
Required
No
Default
*DFT
Range
1 to 255
Case
Uppercase

Suggested / special values: *DFT

*DFT
Uses the default time-to-live: 1 for multicast addresses, otherwise the IPTTL value set by CHGTCPA.

Examples

PING RMTSYS(IPHOST) PKTLEN(100) NBRPKT(10) WAITTIME(15)

Sends 10 packets of 100 bytes to the host IPHOST; each packet must complete within 15 seconds.

IBM command documentation

Generated from os/cl/catalog/PING.json and os/cl/help/PING.json.