hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
Tuning and Troubleshooting


Previous Contents Index


ping

Send ICMP ECHO_REQUEST packets to network hosts.


Format

ping [-dfnqruvR] -c count [-i wait] [-l preload] [-p pattern] [-s packetsize] host

description

The ping command uses the ICMP (Internet Control Message Protocol) mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE message from the specified host or gateway host. ECHO_REQUEST datagrams ( ping ) have an IP (Internet Protocol) and ICMP header, followed by a struct timeval and then an arbitrary number of pad bytes used to fill out the packet.

When using ping for fault isolation, first run the command on the local host to verify that the local network interface is up and running. Then, hosts and gateways further and further away should be sent the ping command. Round-trip times and packet loss statistics are computed. If duplicate packets are received, they are not included in the packet loss calculations, although the round-trip time of these packets is used in calculating the minimum, average, and maximum round-trip time numbers. When the specified number of packets have been sent (and received), or if the program is terminated with a SIGINT, a brief summary is displayed.

This program is intended for use in network testing, measurement, and management. Because of the load it can impose on the network, it is unwise to use ping during normal operations or from automated scripts.

ICMP packet details

An IP header without options is 20 bytes. An ICMP ECHO_REQUEST packet contains an additional 8 bytes worth of ICMP header followed by an arbitrary amount of data. When a packetsize is given, this indicates the size of this extra piece of data (the default is 56). Thus, the amount of data received inside of an IP packet of type ICMP ECHO_REPLY will always be 8 bytes more than the requested data space (the ICMP header).

If the data space is at least 8 bytes large, ping uses the first 8 bytes of this space to include a timestamp, which it uses in the computation of round-trip times. If less than 8 bytes of pad are specified, no round-trip times are given.

Duplicate and damaged packets

The ping command will report duplicate and damaged packets. Duplicate packets should never occur, and seem to be caused by inappropriate link-level retransmissions. Duplicates can occur in many situations and are rarely (if ever) a good sign, although the presence of low levels of duplicates can not always be cause for alarm.

Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's path (in the network or in the hosts).

Different data patterns

The network layer should never treat packets differently depending on the data contained in the data portion. Unfortunately, data-dependent problems have been known to invade networks and remain undetected for long periods of time. In many cases the problematic pattern does not have sufficient transitions, such as all ones (1) or all zeros (0), or has a pattern at the right, such as almost all zeros (0). It is not necessarily enough to specify a data pattern of all zeros on the command line because the problematic pattern of interest is at the data-link level, and the relationship between what you enter and what the controllers transmit can be complicated.

Data-dependent problems can be identified only by extensive testing. If you are lucky, you can manage to find a file that either cannot be sent across your network or that takes much longer to transfer than other files of similar length. You can then examine this file for repeated patterns that you can test by using the -p option to the ping command.

TTL details

The TTL value of an IP packet represents the maximum number of IP routers that the packet can go through before being thrown away. You can expect each router in the Internet to decrement the TTL field by exactly one.

The maximum possible value of this field is 255, and most UNIX compatible systems set the TTL field of ICMP ECHO_REQUEST packets to 255. This is why you can use the ping command on some hosts but not reach them with TELNET or FTP .

In normal operation, ping displays the TTL value from the packet it receives. When a remote system receives a ping packet, it can do one of three things with the TTL field in response:

cautions

Many hosts and gateways ignore the RECORD_ROUTE option.

Flooding and preloading the ping command is generally not recommended, and flooding ping messages on the broadcast address should be done only under very controlled conditions.


Flags

-c count

Stops after sending (and receiving) the specified number (count) of ECHO_RESPONSE packets.

-d

Sets the SO_DEBUG option on the socket being used.

-f

Floods ping . Outputs packets as fast as they come back or 100 times per second, whichever is more. For every ECHO_REQUEST sent, a dot (.) is displayed, while for every ECHO_REPLY received a backspace is used. This provides a rapid display of how many packets are being dropped. You must have system privileges to use this option. Using the -f flag can be very hard on a network and should be used with caution.

-i wait

Waits the specified number of seconds between sending each packet. The default is to wait for 1 second between each packet. This option is incompatible with the -f option.

-l preload

If preload is specified, ping sends that many packets as fast as possible before falling into its normal mode of behavior. You must have system privileges to use this option. Using the -l option can be very hard on a network and should be used with caution.

-n

Numeric output only. No attempt is made to look up symbolic names for host addresses. This occurs only when displaying ICMP packets other than ECHO_RESPONSE.

-p pattern

Specifies up to 16 pad bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example, -p ff will cause the sent packet to be filled with all ones (1).

-q

Suppresses output. Nothing is displayed except the summary lines at startup time and at completion.

-R

Records route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on returned packets. Note that the IP header is large enough for only nine such routes. Many hosts ignore or discard this option.

-r

Bypasses the normal routing tables and sends directly to a host on an attached network. If the host is not on a directly attached network, an error is returned. This option can be used to send ping to a local host through an interface that has no route through it (for example, after the interface was dropped by ROUTED).

-s packetsize

Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.

-u

Displays the time in microseconds (three decimal places). In order to ensure this microsecond precision, the NTP_TIME and MICRO_TIME kernel options must be on. By default, NTP_TIME and MICRO_TIME kernel options are off. If these kernel options are off and this flag is used, the time is displayed to three decimal places, but in milliseconds.

-v

Specifies detailed output. ICMP packets other than ECHO_RESPONSE that are received are listed.

Examples

The following example shows how to use the ping command.
#1

TCPIP> ping 
PING rufus.lkg.dec.com (10.10.2.4): 56 data bytes 
64 bytes from 10.10.2.4: icmp_seq=0 ttl=64 time=30 ms 
64 bytes from 10.10.2.4: icmp_seq=1 ttl=64 time=0 ms 
64 bytes from 10.10.2.4: icmp_seq=2 ttl=64 time=0 ms 
64 bytes from 10.10.2.4: icmp_seq=3 ttl=64 time=0 ms 
 
 
----rufus.lkg.dec.com PING Statistics---- 
4 packets transmitted, 4 packets received, 0% packet loss 
round-trip (ms)  min/avg/max = 0/8/30 ms 
      


route

Manually manipulates the routing tables.


Format

route [-nqvC] add [-net|-host] [family] destination[/bitmask] gateway [-link] [modifiers [args]]

route [-nqv] change [-net|-host] [family] destination gateway [-link] [modifiers args]

route [-n] monitor

route [-nqvC] delete [-net|-host] [family] destination[/bitmask] [-link] gateway [modifiers args]

route [-nqvC] flush [family]

description

The route command allows you to manually manipulate the network routing tables. It normally is not needed, since a system-routing table management daemon, such as GATED or ROUTED, should tend to this task.

The route command accepts five commands:
add Adds a route.
flush Removes all routes.
delete Deletes a specific route.
change Changes aspects of a route (such as its gateway).
monitor Reports any changes to the routing information base, r` lookup misses, or suspected network partitions.

The flush command has the following format:


route [-n] flush [family] 

In this format, the address family can be specified by the -inet keyword.

The other commands have the following format:


route [-n]  command [-net | -host] destination[/bitmask] gateway modifier [-netmask mask] 

Unless the net or the host parameter is specified on the command line, route creates a host route or a network route by interpreting the Internet address associated with destination parameter. If the destination has a local address part of INADDR_ANY, or if the destination is the symbolic name of a network, a network route is created; otherwise, a host route is created.

For example, 128.32 is interpreted as -host 128.0.0.32 , 128.32.130 is interpreted as -host 128.32.0.130 ; -net 128.32 is interpreted as 128.32.0.0 , and -net 128.32.130 is interpreted as 128.32.130.0 .

All symbolic names specified for a destination or gateway are looked up first as a host name using gethostbyname() . If this lookup fails, getnetbyname() is then used to interpret the name as that of a network.

Routes added with the route command are marked as RTF_STATIC to differentiate them from routes added by the routing daemons (GATED or ROUTED). The GATED daemon does not remove the RTF_STATIC routes when it is shut down.

The route utility uses a routing socket and the new message types RTM_ADD, RTM_DELETE, and RTM_CHANGE. As such, only a privileged user can modify the routing tables.


Flags

-n

Prevents attempts to display host and network names symbolically when reporting actions.

-v

Displays additional details.

-q

Suppresses all output.

Modifiers

-all

Specifies that the kernel add or delete the specified route on all interfaces (for example, TU0 and TU1 ) that are in the same subnet as the gateway. Use this modifier only with the add and delete modifiers. Do not use -all with the -dev and -olddev modifiers.

-blackhole

Specifies that this route is a blackhole route. Packets sent to blackhole routes are dropped, and notification is not sent to the packet originators. This is different from a normal route, which allows packets to be forwarded out on it. You must specify 127.0.0.1 (localhost) as the gateway argument.

-cloning

Generates a new route on use of this route.

-dev device

Specifies the interface device to use in the routing entry. Use this modifier when you want to designate a particular interface for a route. If you do not specify this modifier, the route is added on the first interface that is found.

-genmask mask

Specifies that the netmask mask is used for all routes cloned from this route.

-hopcount count

Sets this route's maximum hopcount to the value specified by count.

-iface | -interface

Specifies that this route is through an interface instead of through a gateway (gateway is the default). This means the destination is reachable directly through an interface; no intermediate system is required. The gateway parameter is the host address to be used for transmission.

-inet

Sets this route's type as AF_INET. When you specifiy inet with the delete or flush command, only AF_INET routes are deleted.

-llinfo

Specifies that this route contains valid link-layer information.

-lock

Locks the metric specified by the next modifier specified on the command line. A locked metric is not modified by the kernel. The following metrics can be locked: mtu , hopcount , recvpipe , sendpipe , ssthresh , rtt , and rttvar .

-lockrest

Locks the metrics specified by all the modifiers that follow on the command line. A locked metric is not modified by the kernel. The following metrics can be locked: mtu , hopcount , recvpipe , sendpipe , ssthresh , rtt , and rttvar .

-mtu size

Sets this route's maximum transmission unit (MTU) (in bytes) to the value specified by size.

-netmask mask

Specifies the subnet mask to use for the routing entry. Networks that use a nonstandard subnet must include this modifier. Specify this modifier after any optional modifiers. Do not specify this modifier if you specify a CIDR bitmask (/bitmask). Do not specify this modifier with the change command.

-nofragtopmtu

Specifies that IP datagram fragmentation is disabled for this route.

-nopmtudisc

Specifies that path MTU discovery is disabled for this route.

-olddev device

Specifies the old interface device that you want to change in the routing entry. Use this modifier with the change command only to move a route from one interface to another.

-oldgateway name

Specifies the old gateway that you want to change in the routing entry. Use this modifier with the change command only.

-precedence value

Sets the precedence of the route to the value specified by value. Among equivalent routes to the same destination, the route with the lower precedence is preferred.

-recvpipe bandwidth

Sets this route's inbound delay bandwidth product (in bytes) to the value specified by bandwidth.

-reject

Specifies that this route is a reject route. Packets sent to reject routes are dropped, and messages designating the route as unreachable are sent to the packet originators. This is different from a normal route, which allows packets to be forwarded out on it. You must specify 127.0.0.1 (localhost) as the gateway argument.

-rtt time

Sets this route's round-trip time (in microseconds) to the value specified by time.

-rttvar variance

Sets this route's round-trip time variance (in microseconds) to the value specified by variance.

-sendpipe bandwidth

Sets this route's outbound delay bandwidth product (in bytes) to the value specified by bandwidth.

-ssthresh threshold

Sets this route's outbound gateway buffer limit (in bytes) to the value specified by threshold.

Examples

The following examples show how to use the route utility.
#1

TCPIP>  route   add   default   128.32.0.130 
      

The example shows how to add gateway 128.32.0.130 as a default gateway.

#2

TCPIP> route   add   -host   milan  128.32.0.130 
      

The example shows how to add a route to host milan via gateway 128.32.0.130 .

#3

TCPIP> route   delete   -host   milan   128.32.0.130 
      

The example shows how to delete an existing route via gateway 128.32.0.130 to host milan .

#4

TCPIP> route   add  -precedence 1 -host   milan   128.32.0.130 
      

The example shows how to add a route with a precedence value of 1 to host milan via gateway 128.32.0.130 .

#5

TCPIP> route  change  -oldgateway 128.32.0.130 -oldinterface le0 - 
_TCPIP>  -host milan 128.32.10.101 
      

The example shows how to change an existing route for host milan via gateway 128.32.0.130 to use a new gateway 128.32.10.101 .


sysconfig

Maintains the subsystem configuration.


Format

sysconfig -c | -d | -m | -q | "-Q" | -r | -s | -u [subsystem-name] [attribute-list]

description

The sysconfig command queries and modifies the in-memory subsystem configuration. Use this command to add subsystems, reconfigure subsystems that are already in memory, query subsystems, and unconfigure and remove subsystems.

The sysconfig utility allows you to modify the value of subsystem attributes, as long as the subsystem supports run-time modifications.

When you configure a subsystem using the -c flag, you make that subsystem available for use. If the subsystem is loadable, the sysconfig command loads the subsystem and then initializes the value of its attributes.

To modify the value of a subsystem attribute, use the -r (reconfigure) flag. Specify the subsystem attributes and values on the command line. The sysconfig utility modifies the named attributes by storing the value you specify in them. The modifications take effect immediately.

To get information about subsystem attributes, use either the -q flag or the "-Q" flag. You can specify an attribute list with both these flags. When you use the -q flag, the sysconfig command displays the value of attributes from the in-memory system configuration table.

When you use the "-Q" flag, the sysconfig utility displays the following information about each attribute you specify in the attribute list or, if you omit the attribute list, every attribute for the specified subsystem. You must enclose the "-Q" flag in quotation marks to preserve its case.

To get information about the state of subsystems, use the -s flag. This flag provides a list of the subsystems that are currently loaded and configured. If you specify subsystem-name, the command displays information about the state of that subsystem. Each subsystem can have one of three states:

Subsystems that are not being used can be unconfigured using the -u flag. Unconfiguring subsystems can free up kernel memory, making it available for other uses. You can unconfigure any static or loadable subsystem that supports run-time unconfiguration. If you unconfigure a loadable subsystem, that subsystem is also unloaded from the kernel.

You can use the sysconfig command to display the value of attributes on the local system. If you want to configure, reconfigure, or unconfigure a subsystem, you must be authorized to modify the kernel configuration. Only users who have a system group UIC or who have an account with SYSPRV, BYPASS, or OPER privilege can configure, reconfigure, or unconfigure the subsystems.


Parameters

subsystem-name

Specifies the subsystem on which you want to perform the operation. The subsystem-name argument is required for all flags except -s and -m . If you omit subsystem-name when you use the -s or -m flag, the sysconfig utility displays information about all loaded subsystems.

attribute-list

Specifies attribute names and, depending on the operation, attribute values.

The attribute-list argument is required when you use the -r flag and is optional with the -q flag. Any attribute list specified with other flags is ignored by the sysconfig utility.


Flags

-c

Configures the specified subsystem by initializing its attribute values and, possibly, loading it into memory. Use this command whether you are configuring a newly installed subsystem or one that was removed using the sysconfig -u command option.

-d

Displays the attribute settings in the SYSCONFIGTAB.DAT file for the specified subsystem.

-m

Queries the mode for the specified subsystems. A subsystem's mode can be static or dynamic. If you omit the subsystem name, sysconfig displays the mode of all the configured subsystems.

-q

Queries attribute values for the configured subsystem specified by subsystem-name. If you omit the attribute list, values for all the specified subsystem's attributes are displayed.

"-Q"

Queries information about attributes of the configured subsystem specified by subsystem-name . The information includes the attribute data type, the operations supported, and the minimum and maximum values allowed for the attribute. Note that the minimum and maximum values refer to length and size for attributes of char and binary types, respectively. If you omit the attribute-list argument, information about all attributes in the specified subsystem is displayed.


Previous Next Contents Index