
햄드네요
Go-Back-N Protocol
Go-Back-N vs. Stop-and-Wait
- What's the difference?
- Sliding window size! → multiple packet transmission is considered

- Tx: m-bit window
- Rx: 1-bit window
- The sequence numbers are modulo 2^m, where m is the size of the sequence num field in bits.
- The acknowledgment number is cumulative and defines the sequnce num of the next packet expected to arrive.
- The send window is a box of maximum size = 2^m - 1 with three variables: Sf, Sn and Ssize
- If m = 3

- The send window can slide on or more slots when an error-free ACK with ackNo between Sf and Sn arrives.

- Rx size: 1

- When timer expires, all un acked packets are re-transmitted.
- ex) 송신측에서 packet 6(Sn=7) 전송했지만, 타이머 만료
- 만일 Sf=3이면, packet 3, packet 4, packet 5, packet 6 이 4개의 패킷이 un-acked packet이 됨
- 타이머 만료되었으므로 송신측은 packet 3~6까지 4개의 packet 재전송
- Go-back-N인 이유
- FSM for Go-Back-N

- Send window size for Go-Back-N
- Go-Back-N 프로토콜에서 송신 윈도우의 크기는 2^m보다 작아야 한다.
- 수신 윈도우의 크기는 항상 1이다.

- Example: When some ACKs are lost

- Example: When some packets are lost

- Inefficiency
- Inefficient retransmission occurs even when some packets are successfully received.
- Why? Rx is too simple: Rx window size = 1 !!
- Solution? Use longer R → Selective-Repeat Protocol!
Selective-Repeat Protocol
- Selective + Repeat

- Window size
- Tx: 2^(m-1)
- If m=4, max window size=8
- Rx: 2^(m-1)
- Rx window
- Buffer to store the information of out-of-order packets

- Timer
- 이론상, Selective-Repeat에서는 아직 처리되지 않은 각각의 packet마다 타이머를 사용 (타이머 만료되면 재전송)
- Go-Back-N은 처리되지 않은 패킷을 그룹으로 묶어 처리 but Selective-Repeat은 독립적으로 처리
- Acknowledgments
- Go-Back-N에서 AckNo는 누적, 이 번호 이전의 모든 패킷들은 이상없이 도착했음을 의미
- Selective-Repeat에서 AckNo는 오류 없이 수신된 하나의 패킷 seqNo
- Example) 송신 측에서 패킷 0, 1, 2, 3, 4, 5 까지 6개의 패킷을 전송했다. 송신측이 ackNo = 3의 ACK를 수신했다. 시스템이 GBN 또는 SR을 사용하는 경우에 ACK 수신은 각각 무엇을 의미하는가?
- GBN의 경우 패킷 0, 1, 2가 훼손되지 않고 잘 수신되었다는 것과 수신 측에서 패킷 3의 수신을 기다리고 있다는 것을 의미
- SR의 경우 패킷 3이 훼손되지 않고 잘 도착했다는 것을 의미, 다른 패킷에 대한 정보는 없다.
- FSM for Selective-Repeat

글로벌소프트웨어캠퍼스와 교보DTS가 함께 진행하는 챌린지입니다.