Stop-and-Wait Automatic Repeat Request
Our first protocol, called the Stop-and-Wait Automatic Repeat Request (Stop-and-
Wait ARQ), adds a simple error control mechanism to the Stop-and-Wait Protocol. Let
us see how this protocol detects and corrects errors.
To detect and correct corrupted frames, we need to add redundancy bits to our data
frame (see Chapter 10). When the frame arrives at the receiver site, it is checked and if
it is corrupted, it is silently discarded. The detection of errors in this protocol is mani-
fested by the silence of the receiver.
Lost frames are more difficult to handle than corrupted ones. In our previous proto-
cols, there was no way to identify a frame. The received frame could be the correct one,
or a duplicate, or a frame out of order. The solution is to number the frames. When the
receiver receives a data frame that is out of order, this means that frames were either
lost or duplicated.
The corrupted and lost frames need to be resent in this protocol. If the receiver does
not respond when there is an error, how can the sender know which frame to resend? To
remedy this problem, the sender keeps a copy of the sent frame. At the same time, it starts
a timer. If the timer expires and there is no ACK for the sent frame, the frame is resent, the
copy is held, and the timer is restarted. Since the protocol uses the stop-and-wait mecha-
nism, there is only one specific frame that needs an ACK even though several copies of
the same frame can be in the network.
Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame
and retransmitting of the frame when the timer expires.
Since an ACK frame can also be corrupted and lost, it too needs redundancy bits
and a sequence number. The ACK frame for this protocol has a sequence number field.
In this protocol, the sender simply discards a corrupted ACK frame or ignores an
out-of-order one.
볼드체 처리한 부분이 이해가 안가는데
같은 프레임의 복사본이 여러개 네트워크 상에 있어도 ACK가 필요한(ACK로 응답을 하는 것이 필요한 프레임이) 프레임은 오직 하나 뿐이다. 라고 되어있는데 말이야
이게 대체 무슨 말인지 이해가 안가
만약에
1. A라는 프레임이 전송
2. A라는 프레임이 전송
3. A라는 프레임이 전송
이렇게 A라는 프레임이 3번 연속해서 전송이 된 경우에 응답 측에서 ACK로 응답하는 횟수가 1번밖에 없다 그런 말인가?
3번 모두 ACK로 응답해야되는거 아냐?
타임아웃때문에 dup 패킷 날아가는거 말하는건가??
TCP에서 패킷전송할때 타임아웃에 걸리거나 하면 패킷 복사본을 재전송하는데 수신측에서 이걸 두번이상 받아버리면 ACK를 하나 보내는걸로 알고있음
loss가 계속 일어나서 sender A 프레임 1차 전송 -> timeout -> A 프레임 2차 전송 -> timeout -> A 프레임 3차 전송 이런 식으로 현재 총 세 번 보낸 상태라고 하면 sender 입장에서는 1차, 2차는 이미 timeout돼서 끝난 프레임이고 ack를 기다리는 프레임은 오직 세번째로 전송한 프레임이라는 말 같은데? 이미 sender가 loss로 취급한 1차, 2차 프레임은 네트워크 상에 돌아다녀도 아무런 상관이 없지
학교에서 배운바로는 일단 수신자가 패킷을 받으면 같은패킷이 재전송되는 경우 그냥 ACK를 안보낸는거라고 기억.... 모르겠다 사실 내기억 자주 변조됨
근데 이런건 네이버에 한글로 치니까 많이 나오는데 ㅇㅇ..
안드의노예 // 이거 설명 TCP 말하는거 아닌것같음
근데 대강 개념은 비슷한거같은데...
frame이면 데이터링크 레이어인가??
Data link control 챕터인데
timeout됐다는거는 수신 측에서 그 프레임이 corrupted or loss된 거라서 discard했다는거고
근데 이경우에는 copy본이 여러개라고 했으니까 corrupted or loss되지 않은 프레임이 여러개라는거같은데