Content

  1. Go-Back-N
    1. Flow
  2. Selective Repeat
    1. Flow
  3. Window Size

Go-Back-N

  • Sender

    • Sends up to N packets
    • Sets timer of oldest un-ACKed packet
    • Retransmit all un-ACKed packets on timeout
  • Receiver

    • Discards out-of-order packets
    • Resend ACK of last received packets to inform sender

Flow

  • Sender
    • rdt_send()
      • If window not exhausted
        • Transmit data
        • Increase seq #
        • Start timer if not previously done
      • If exhausted (nextseqnum == base+N)
        • Block & wait for window to open
    • rdt_rcv(ACK(n)): all packets before seq # = n have arrived (cumulative ACK)
      • Advance window until base + seq #
    • timeout()
      • Retransmit all packets after oldest unACKed seq #
  • Receiver
    • rdt_rcv(data(n)): receive window of size 1
      • If error || not expectedseqnum
        • Discard
        • Re-ACK the highest-order seq #
      • Else
        • Increment expectedseqnum
        • Advance window by 1
        • Send ACK

Selective Repeat

  • Sender
    • Sends up to N packets
    • Sets timer of every un-ACKed packet
    • Retransmit that un-ACKed packets on timeout
  • Receiver
    • Buffers out-of-order packets
    • Send ACK for each received packet

Flow

  • Sender
    • rdt_send()
    • rdt_rcv(ACK(n))
      • If in current window [base,nextseqnum-1]
        • Mark packet n as received
        • If n == base, advance window until next unACKed packet
    • timeout(n)
      • Resend packet n
      • Restart timer
  • Receiver
    • rdt_rcv(data(n))
      • If in current window [base,base+N-1]
        • Send ACK(n)
        • If out-of-order
          • Buffer
        • If in-order
          • Deliver to upper layer
          • Advance window until next not-yet-received packet
      • If in previous window [base-N,base-1]
        • Resend ACK(n)
      • Else
        • Ignore

Window Size

  • Go-Back-N

Window size must be less than 2^k.

  • Selective Repeat

Window size must be at most 2^(k-1) (so that can differentiate between current & previous windows).

results matching ""

    No results matching ""