====== 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 ''[[:cmd:md5sum]]'' and ''[[:cmd:sha1sum]]'' commands can be used to verify that a file was downloaded correctly. {{ :clipart:nic.jpeg?237x222|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 ===== - 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. - Boot into a version of iPXE with ''[[:buildcfg:digest_cmd|DIGEST_CMD]]'' enabled. - Use ifstat to identify the name of your network interface (hereafter assumed to be ''net0''). - Open the interface and obtain an IP address using ''[[:cmd:dhcp]] net0''. - Download the pseudo-random data file using ''[[:cmd:imgfetch]]''. - Use ''[[:cmd:md5sum]]'' to calculate the MD5 digest of the downloaded file, and verify that this matches the MD5 digest calculated earlier. - Use ''[[:cmd:sha1sum]]'' to calculate the SHA1 digest of the downloaded file, and verify that this matches the SHA1 digest calculated earlier.