218k views
4 votes
Start the "TCP/IP" (reliable connection simulator) applet.

In the text field labeled "Your message:", type the following: "Computer networking is essential in our world today.". Then press the button "Send a message."
Watch the entire sequence of packets that are sent for the sample message. How many "DAT" packets were sent? How many "ACK" packets were sent?
If each character or blank in a packet header counts for one character, and all "DAT" packets except the last carry 10 characters (including the blanks), and "ACK" packets have no data characters (though they do have a header), count up how many characters were sent in total.
There are 52 characters in the above message, including blanks and punctuation. Subtract 52 from the total number of characters sent in both directions in all packets. Divide this number by the total number of characters to get the overhead (those characters which are not really data but yet you have to transmit them), represented as a percentage.
Imagine that you have a million-character message to send, perhaps a large file. How many characters in total (and to your best estimate) would be sent in all packets necessary to move it from node 0 to node 1?
What would be an obvious way to decrease the overhead?
Repeat Steps 1 and 2.
Select "Delete packets that are touched".
Delete some data packets by clicking on them as they move along the wire and watch the retransmission after timeout.
What happens if you delete the re-transmitted packet?
Now try deleting some ACK or NAK packets. What happens?
See if you can compute the checksum as TCP/IP does. Run the applet, using any message. Select a data packet, but don’t select the last packet because it might be too short, less than 10 characters. Count up the characters, including blanks. If they do not equal 10, assume there are blanks at the end so that the character count is 10.
Using the "Text Encoding in ASCII" applet, type in the characters from the data packet, and click on "translate text".
Add up the values for each of the characters. Then calculate the modulus of this number using 256.
Compare your manually computed checksum for the first packet of the message "Introduction to Computer Science" against what the applet shows for the packet. Do they match?
Now damage your packet by altering one character. Re-compute the checksum. You should realize how the applet can spot errors.
Think of a way that a packet can be damaged and still have the same checksum as the undamaged version. Give one example for this scenario.

1 Answer

6 votes

Final answer:

Observing the TCP/IP reliable connection simulator applet allows calculating the number of DAT and ACK packets, total characters sent, and the overhead percentage in the communication. Scaling this to a million-character message provides an estimate of total characters sent. The applet also demonstrates error detection through checksums and the robustness of the TCP retransmission mechanism.

Step-by-step explanation:

To determine the number of DAT and ACK packets sent, and the overhead in a TCP/IP communication session, one must observe the described applet simulation. In this case, each DAT packet carries up to 10 characters, and each ACK packet acknowledges the receipt of a DAT packet. The overhead can be calculated by subtracting the actual data characters from the total characters sent including headers, and then deriving the percentage. If one million characters need to be sent, the total characters including overhead can be estimated by scaling up the observed overhead percentage. To reduce overhead, increasing the payload size of each packet is an obvious solution. When packets are deleted in the simulation, the applet demonstrates the retransmission of packets, showcasing the reliability feature of TCP/IP. For the checksum calculation, encoding the characters in ASCII and summing their values, followed by taking the modulo with 256, allows comparison with the applet's computed checksum. By altering a character and re-computing the checksum, one can observe how errors are detected. Potentially, a packet could be damaged yet carry the same checksum if the error involves complementary alterations of character values, which cancel each other out when summed.