Exam Guidelines Lecture

Submission and File Handling

  • Inspera submissions are final. Missing the deadline means missing the submission.

  • Submit multiple times before the deadline to ensure a version is always available.

  • Always download and verify the submitted file to ensure it's the correct one. Submitting the wrong file has consequences during exams.

  • The submission portal typically opens 3-4 days before the deadline, sometimes two days before.

S Bit

  • Set the 's bit' to one and the rest to zero.

  • The receiver, upon receiving, sends back an ACK (acknowledgment).

File Chunking

  • When transmitting a file (e.g., 3.06 bytes), the last chunk sent might be smaller than the standard size.

  • Example: a last chunk might be 520 bytes + 8 bytes = 528 bytes.

  • The last chunk is meant to be smaller or equal to the standard chunk size.

Sync Packet

  • Handling sync packets can be approached in multiple ways (open-ended).

  • The sender has a timer set.

Packet Loss

  • In a 50% loss scenario, expect to receive three acknowledgements in quick succession (around 10-10.01 milliseconds apart).

  • Upon receiving an ACK, send a new packet immediately.

  • An RTT (Round-Trip Time) mechanism is needed, and there will always be a window of packets.

  • Every ACK should trigger a new packet transmission.

  • Wireshark should show that every ACK is followed by a new packet.

  • Avoid activating all ACKs of the same packet; each ACK triggers a new packet.

Loss and Retransmission

  • With window packets, loss implies a "go-back-N" approach.

  • The entire window is retransmitted upon detecting a loss.

  • The receiver discards out-of-order packets. If packet #4 is lost and #5 and #6 are sent, the receiver discards #5 and #6.

  • After a timeout, packets #4, #5, and #6 will be re-sent.

Transfer Completion

  • After the complete transfer, the sender sends a FIN (finish) packet.

  • The FIN packet has the FIN flag set to off (one bit).

  • The receiver responds with an ACK, signaling the end of the transmission.

Optional Arguments and Exception Handling

  • Mandatory use of optional arguments in your implementation.

  • Refer to the provided GitHub page for examples.

  • Handle exceptions related to IP addresses and port addresses (using the -p flag).

  • The code should validate whether an entered IP address is valid and handle invalid inputs (e.g., shuffled characters).

Testing Environment

  • Code must be tested in Mininet, not on a local machine.

File Handling Details

  • Read and write files in binary mode.

  • Data size should be precisely 8 bytes.

  • Remove the header when appending data to an output file.

Demonstration Setup

  • Demonstration using ApolloDisk:

    • Open two extra windows.

    • Open Wireshark on the sender side to capture packets.

    • Run the server with the -s flag and appropriate parameters.

    • Run the client with a window size (e.g., 5) and a file.