Error detection - the IP header checksum algorithm


The exercise to perform

Below are 6 questions. The identical questions have been cast in the form of a Canvas "quiz." Please do this homework exercise by taking that quiz.


Print out this worksheet. It can be applied to any IP packet to assist manual emulation of the header checksum calculation, just as IP itself would perform it. Apply the worksheet to the second packet in the "dns.pcap" file. It came from Roman Dunaytsev on his website. The site is excellent. There,  take a quick look in particular at  the "Teaching" link generally. dns.pcap is available within this zip file.

dns.pcap is a Wireshark trace file containing 2 packets (a dns request/reply sequence). Below the exercise has been performed on the first packet, to serve as a model for your applying it to the second. Here's the first packet:

Here is the checksum exercise performed for this packet:

After printing out the worksheet, fill in its blanks with values from the second packet so as to derive the checksum for the second packet. (Get the second packet's contents by viewing the packet in Wireshark.) You may wish to use a hexadecimal calculator, such as the calculator accessory found in Windows (switch it into "Scientific" mode via the "View" menu in order to surface its hexadecimal capability). Remember that IP uses one's complement addition, where if a sum entails a carry outside the width of the values being summed the carried 1 is not discarded but added back into the remaining digits of the sum. For example above, 3405 was added to FFE3, yielding 133E8. The 1 that was carried outside the 4-digit width is added back into the remaining digits, 33E8, so 33E9 becomes the sum.


Answer these questions:

1. The number of occasions in the calculation process where there is a "carry" and resultant 1's-complement carry-bit add-back is:
a. 1
b. 2
c. 3
d. 4
e. 5

2. The value calculated in cell R4/C2 is:
a. 4548
b. 0000
c. A204
d. 2216
e. D901
f. A4FC

3. The value calculated in cell R5/C2 is:
a. 4548
b. 0000
c. A204
d. 2216
e. D901
f. A4FC

4. The value calculated in cell R6/C2 is:
a. 4548
b. 0000
c. A204
d. 2216
e. D901
f. A4FC

5. The value calculated in cell R7/C2 is:
a. 4548
b. 0000
c. A204
d. 2216
e. D901
f. A4FC

6. The value calculated in cell R8/C2 is:
a. 4548
b. 0000
c. A204
d. 2216
e. D901
f. A4FC