Perform loopback testing

Synopsis

  lotest [--mtu <mtu>] [--broadcast] <sending interface> <receiving interface>

Examples

Perform a loopback test from "net0" to "net1"

  lotest net0 net1

Description

Perform a loopback test by sending packets from one network interface and verifying that they are received correctly on a second network interface. The two network interfaces should be directly connected using a network cable.

You can specify the packet size (excluding the link-layer header) using the --mtu option. If no packet size is specified, then the default Ethernet size of 1500 bytes will be used.

You can specify a broadcast destination link-layer address using the --broadcast option. If a broadcast destination address is not specified, then the link-layer address of the receiving interface will be used.

The test will continue until it is interrupted (e.g. by pressing Ctrl-C) or until a packet is received incorrectly. The number of packets successfully received will be displayed as a running total during the test.

See also

Build options

This command is available only when the build option LOTEST_CMD is enabled.

Notes

This command is intended primarily for correctness testing during iPXE development. It can be used to verify that a network driver is transmitting and receiving packets correctly, even when no suitable network switch is available.

The two network interfaces should be directly connected using a cable. If they are plugged into a network switch, then the loopback test may fail due to the presence of additional packets seen by the receiving network interface.

Some drivers will generally work but will fail a loopback test because they do not strip the Ethernet CRC from the received packet. These drivers should be fixed.

Some drivers that pass a loopback test may use an MTU that is too small to support VLANs. These can be identified by creating a VLAN interface on each end, and then performing the loopback test over the VLAN interfaces. For example:

  vcreate --tag 123 net0
  vcreate --tag 123 net1
  lotest net0-123 net1-123

Some USB drivers may fail to correctly transmit or receive packets that have a length (inclusive of the 14-byte Ethernet link-layer header and any device-specific headers) which is an exact multiple of the USB bulk endpoint MTU (typically 512 bytes). These drivers should be fixed.

cmd/lotest.txt ยท Last modified: 2016/05/23 22:38 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.