Laureline's Wiki

Laureline's Wiki

Homework 1 - Out of order packet loss

Homework 1 - Out of order packet loss

What if a packet is lost in the network how can we counteract?

considerations

  • multiple packets
    • out of order delivery
  • packet loss
  • packet corruption

Out of order delivery

Place a sequence number (count of the number of bytes sent) in each packet header. On the receiving end, keep track of the current sequence number and queue packets with sequence numbers in the future and free them as needed.

Packet Splitting

If a packet's payload size exceeds the underlying layer's ability to transport it, a packet can be split into smaller chunks and reassembled as necessary by the next node. A flag and a secondary fragment number must be placed in the packet's header to provide this functionnality.

Packet Loss

Using the sequence number above, the receiving end can send back a acknowlegement that the packet has been received. If either packets (original of ack) get lost during transmission, the sender will retransmit the packet after a timeout (computed using rolling average of delays RTT + 4*RTTdev).

To prevent network flooding and delays waiting for acknowlegements, a transmittion frame (buffer) can be implemented. The sender will transmit up to a certain number of packets without immeiately waiting for an acknowlegement. When the receiver sends an acknowlegement for a sequence number, all packets before are automatically acknowleged.

Selective acknowlegement can also be used to signal the reception of chunks of sequence numbers.

Packet corrution

To ensure the integrity of a packet's payload a checksum algorithm can be used. It can either be inserted in the header or at the end of the payload. If it is present in the header, the checksum of the packet must be computed by replacing the checksum's value by a fixed value during computation. This does not prevent intentional tampering of packets since an attacker can simply update the checksum.