Table of Contents

Driver test: large file transfer correctness

Rationale

Downloading a large file via HTTP provides an easy test of the complete transmit and receive datapath under a sustained high packet load. The md5sum and sha1sum commands can be used to verify that a file was downloaded correctly.

A network card

Preparation

Create a 512MB file containing pseudo-random data, using e.g.:

  dd if=/dev/urandom of=512mb bs=1M count=512

Obtain the MD5 and SHA1 digests of your pseudo-random data file:

  md5sum 512mb
  sha1sum 512mb

Copy your pseudo-random data file to a web server on your local network.

Test sequence

  1. Before starting, ensure the network cable is connected to a network which provides a DHCP server and a web server which can serve your pseudo-random data file.
  2. Boot into a version of iPXE with DIGEST_CMD enabled.
  3. Use ifstat to identify the name of your network interface (hereafter assumed to be net0).
  4. Open the interface and obtain an IP address using dhcp net0.
  5. Download the pseudo-random data file using imgfetch.
  6. Use md5sum to calculate the MD5 digest of the downloaded file, and verify that this matches the MD5 digest calculated earlier.
  7. Use sha1sum to calculate the SHA1 digest of the downloaded file, and verify that this matches the SHA1 digest calculated earlier.