C H A P T E R  3

Ethernet Loopback Test (netlbtest)


Note - The netlbtest external loopback test is not supported in 1000Mbps mode for the Sun PCI-Express Dual Gigabit Ethernet MMF/UTP Adapter and the e1000g driver.




netlbtest Description

The netlbtest replaces the gemtest previously included in SunVTS. It provides functional test coverage of the devices which have device drivers that support the Ethernet loopback test. These devices include eri (the Ethernet device in the RIO chip) and ge (Gigabit Ethernet), ce (GigaSwift Ethernet), dmfe (10/100 Mbps Ethernet), and vca (Sun Crypto Accelerator 4000). The netlbtest runs in loopback (external/internal) mode.

The netlbtest uses DLPI RAW mode to talk to the device driver. For the purpose of this test, a packet is defined as an Ethernet header followed by the Ethernet data payload (refer to the IEEE 802.3z standard). The test generates and sends out the desired number of packets (a tunable parameter) and expects to receive the same number of packets through the loopback interface, external or internal. If an error occurs (for example, packet mismatch or timeout), an error message indicating the type of error, its probable cause(s), and recommended action(s) is displayed on the SunVTS console.

The data sent out is generated by a random number generator, and put into a data buffer. Each time a packet is sent, it is selected from a different starting point of the data buffer, so that any two consecutively transmitted packets are not the same.



Note - Do not run nettest and netlbtest at the same time or the tests might fail.



A new debugging capability has been added in netlbtest. After one packet is not received, four more packets are transmitted. If all of the packets are not received within the timeout time, the test will stop with the error message, timed out for receiving .... If up to four packets are missing, the test will stop with an error message, Missed %d packet(s).... If a packet is received late and the current transmitted packet is not received, the test will stop with a warning message, Packet delay.... If the packets arrived late but within five times the timeout value and no packet is missing, the test passes.


netlbtest Test Requirements

You must have the Ethernet card and the device driver installed, a loopback connector in place (external loopback only), and Intervention mode enabled before running netlbtest. netlbtest cannot run and does not appear in the GUI if the network interface is connected to a live network. netlbtest also requires that the Ethernet device be configured offline before running the test. Use the ifconfig(1M) command to bring the Ethernet device down before running netlbtest. Enter the following commands to bring the interface down:


# ifconfig interface down
# ifconfig interface unplumb

To run netlbtest, a loopback connector must be connected to the Ethernet interface when performing the external loobpback test only. A loopback connector provides the network interface driver the necessary link for testing, while maintaining isolation from a live network.



Note - The loopback connector is not required for both internal and external tests of the Ethernet device. The loopback connector is required for the external loopback test only.



The loopback cable for ge and Sun GigaSwift Ethernet MMF adapter (ce fiber) is based on the following specifications-- multimode, duplex, 62.5/125 micron, sc connector, 850nm. The cable can be made by splitting a standard fiber optic cable in two. The two ends of the cable should be connected to the TX and RX ports of the adapter (the order does not matter), thus forming a loop.

The loopback connector for the eri device is a standard RJ-45 connector. See Appendix A in the SunVTS User's Guide for the diagram. The loopback connector for a Sun GigaSwift Ethernet UTP adapter (ce copper) is a standard RJ-45 with all 8 pins connected. See Appendix A of the SunVTS User's Guide for the diagram.


netlbtest Options

To reach the following dialog box, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system might not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.


FIGURE 3-1 netlbtest Test Parameter Options Dialog Box

Screenshot of the netlbtest Test Parameter Options dialog box


Refer to TABLE 3-1 for test parameter descriptions.


TABLE 3-1 netlbtest Options

netlbtest Options

Description

Configuration

Specifies the port address, host ID, and domain name of the system under test.

Total Packets

Specifies the total number of the packets to send. The default number of packets is 1,000. The maximum number of packets is 100,000,000.

Packet size

Determines the size (in bytes) of the packets to be transmitted.
60 <= packet size <= 1514. The default packet size is 1000 bytes.

Time_Out(sec)

Determines the amount of time (in seconds) that netlbtest can wait to receive packets. If no packets are received within this time frame, netlbtest reports an error message. The range for timeout is from 1 to 1,000 seconds.

Loopback

Determines the external and internal loopback mode. The default setting is internal loopback mode.

Print_Warning

Enables or disables the printing of warning messages. The default setting is Disable.

Processor Affinity

Binds the test to a specific processor. If no processor is specified, the test migrates between processors. This option is only available on multiprocessor systems.

Debug_Timeout

Enables or disables the debugging feature of netlbtest. The default setting is Disable. The range for timeout is from 1 to 1,000 seconds.



netlbtest Test Modes


TABLE 3-2 netlbtest Supported Test Modes

Test Mode

Description

Functional

Runs the full set of subtests. The host must not be connected to the network through the intended test device.


Since netlbtest requires a loopback connector for the external loopback test, it can only be selected when Intervention mode is enabled.


netlbtest Command-Line Syntax

/opt/SUNWvts/bin/netlbtest standard-arguments
-o dev=device, tpkts=n, pksz=pkt-size, lb=Internal, warn=Disable, timeout=number-of-seconds


TABLE 3-3 netlbtest Command-Line Syntax

Argument

Description

dev=device-name

Specifies the device to test such as ge0 or eri0.

tpkts=n

[1...100000], count of packets to loopback. Packets number can be 1 to 100,000. The maximum number of packets is 100,000,000.

pksz=pkt-size

Determines the size (in bytes) of the packets to be transmitted.
60 <= packet size <= 1514. The default packet size is 1000 bytes.

lb=Internal

Selects internal (or external) loopback mode.

warn=Disable

Enables or disables printing of warning messages.

timeout=number-of-seconds

Determines the amount of time (in seconds) that netlbtest can wait to receive packets. If no packets are received within this time frame, netlbtest reports an error message. The range for timeout is from 1 to 1,000 seconds.