nettest, nettest.stf - ICMP network test
./nettest [ standard_arguments ] [ -o option=value ]
./nettest.stf [ hostname ]
If no test targets are specified, nettest determines the target machine (or machines) to test against by sending an ICMP broadcast to find them.
If nettest fails to find all necessary targets, it tries an RPC broadcast to the RPC port mapper daemon. If the targets are specified, nettest uses the specified target (or targets) instead. After finding the necessary target, nettest performs the following tests:
- Random test. Sends out 256 packets with random data length and random data.
- Incremental test. Sends out packets with length from minimum to maximum packet size using incremental data. (Min and max values differ for each device.)
- Pattern test. Sends 256 packets of maximum length, where each packet contains one test pattern, and all byte patterns (0 to 0xFF) are used. That is, the first packet contains pattern 0, the second packet contains pattern 1, and so on, until the last packet pattern of 0xFF.
If Level 2 certification is selected, nettest.stf runs nettest, but it also runs some additional tests. The additional tests for Level 2 are an RCP test, FTP test, and NFS mount test. These tests involve copying files between the test machine and the client, and comparing the copies to the originals to ensure that no errors occured. These extra tests are all contained within the nettest.stf wrapper.
The following values are set as part of the -o option:
- target=h1+h2+...
- A list of test targets by host name or IP address.
- dev=interface
- Network interface name. The default value is le0 for Ethernet networks.
- delay=seconds
- The time between subtests in seconds. The default is 30 seconds.
- timeout=seconds
- The number of seconds to wait before a timeout. The default is 20 seconds.
- retry=n
- The number of test timeout retries. The default is 3 retries.
- warn
- When enabled, nettest prints warning messages.
- hostname
- A network test target host name or IP address.
The nettest test primarily uses the ICMP and requires at least two machines on a network: the machine under test and a test target machine. Both machines must support the transport control protocol/interface program (TCP/IP, which includes ICMP). The target machine must either be configured to respond to ICMP broadcast or to RPC broadcast.
If nettest.stf is run manually, give the RUNTIME environment variable a value in seconds. RUNTIME is used by nettest.stf to determine how long it should run.
# RUNTIME=1200 export RUNTIME # ./nettest.stf moonIn this example, nettest.stf runs for 20 minutes (1200 seconds), and its test target will be the machine called moon.
The nettest test outputs information regarding the section of testing that it is currently performing. The test exits with an appropriate error message if any problems occur.
As nettest.stf runs nettest, it outputs error messages, but the script also outputs a !PASS message if the test completed successfully, or terminates with an !ERROR message if a problem occurs in any section of the testing.
The nettest.stf script loops its tests (including nettest) for the length of time specified by RUNTIME.
The nettest test takes a couple of minutes to complete.
This test can run concurrently with mcpu, hds, memory, and rmdtest after the flp test finishes.
# sh ./nettest -v -o dev=iprb0,target=moon,packets=8192# sh ./nettest.stf moon
Copyright 2005 Sun Microsystems, Inc. All rights reserved.