SLIDING WINDOW ARQ
Among several popular mechanisms for error control two protocols are important:- Go-back-n ARQ
- Selective Reject ARQ
- The sending device keeps copies of the transmitted frames until all of them have been acknowledged
- In addition to ACK frames, receiver also has the option of NAK frames, if data has been received damaged
- Because sliding window is a continuous TX mechanism, both ACK and NAK frames must be numbered for identification
- ACK frames carry the number of the next frame expected
- ACK 5 tells sender that all frames up to frame 5 are received
- NAK frames carry the number of the damaged frame itself
- If data frames 4 and 5 are damaged, NAK 4 and NAK 5 must be sent
- ACK frames carry the number of the next frame expected
- Like sender in stop-and wait ARQ, the sliding window ARQ is also equipped with a timer in the sender to deal with lost ACKs
Go Back n ARQ
In Go Back n ARQ, if one frame is lost or damaged, all frames sent since last frame acknowledged are retransmittedGo Back n- Lost Data Frame
- Sliding window requires that data frames be transmitted sequentially
- If one or more frames are so noise corrupted that they become lost in transit, the next frame to arrive at the receiver will be out of sequence
Go Back n- Lost ACK
- When the window capacity is reached and all frames allowed have been sent , the sender starts a Timer
- If an ACK is not received before that Timer expires, sender retransmits all therames since the last ACK
Selective Reject ARQ
- In selective-reject ARQ, only the specific damaged or los frame is retransmitted
- If a frame is corrupted in transit, a NAK is returned and the frame is resent out of sequence
- The Rx device must be able to sort frames and insert the retransmitted frame into the proper place
- The Rx device must contain sorting logic to enable it to reorder frames received out of sequence
- Sending device must contain a searching mechanism that allows it to find and select only the requested frame for retransmission
- Selective Reject ARQ
- A buffer in the receiver must keep all previously received frames on hold until all retransmissions have been stored
- To avoid selectivity, ACK number, like NAK numbers must refer to frame received instead of next expected frame
- A smaller window size is required because of this added complexity
-
Selective Reject ARQ-Lost Frame
Selective Reject ARQ vs Go Back n
- Although retransmitting only specific damaged or lost frames may seems more efficient than resending all the frames
- Because of the complexity of sorting and storage required by the receiver and exa logic needed by sender to select specific frames for retransmission, selective reject ARQ is EXPENSIVE and not often used
- Selective reject gives better performance but in practice it is usually it is discarded in favor ofgo-back-n for simplicity of implementation
Protocols
Protocol: Set of rules or conventions for executing a particular taskProtocol in DataComm.:Set of rules or specifications used to implement one or more layers of the OSI Model
Example: EIA 232-D interface is a protocol used at the physical layer in the OSI Model Protocols
Data Link Protocols: Set of specifications used to implement the data link layer Data link protocols contain rules for:
- Line Discipline
- Flow Control
- Error Control
Categories of Data Link Protocols
Data link protocols can be divided into two sub-groups:Asynchronous Protocols: Treat each character in a Bit stream independently
Synchronous Protocols: Take the whole bit stream and chop it into characters of equal Size
Asynchronous Protocols
Employed mainly in ModemsInherent Slowness is a disadvantage: Requires addition of start and stop bits and extended spaces b/w frames, so these are mainly replaced with High-speed synchronous mechanisms
Not Complex and Inexpensive to Implement
Transmission does not require timing coordination; Timing is done by using extra bitsDifferent Asynchronous Protocols
A variety of Asynchronous protocols have been developedWe will discuss some of the important ones
XMODEM
In 1979 Ward Christiansen designed a File transfer protocol for Telephone-line communication b/w PCs called XMODEM
Half Duplex and Stop-and-Wait ARQ protocol
XMODEM
- The first field is a One Byte start of header (SOH) field
- The second field is a two-byte Header.
- The first header byte , the Sequence number carries the Frame number
- The second header byte is used to check the validity of the sequence number
- The fixed data field holds 128 bytes of data
- The last field CRC checks for errors in the data field only
Transmission in XMODEM
- TX begins with sending of a NAK frame from the receiver to the sender
- Each time, the sender sends a frame, it must wait for an ACK before sending next frame
- If NAK is received instead of ACK, the last frame is sent again
- A frame is also resent if no response arrives from a receiver after a fixed time period
- A sender can also receive cancel (CAN) to abort TX
Control Frames in XMODEM
Control frames from the receiver
- ACK: Acknowledgement
- NAK: Error or start of transmission
- CAN: Aborts the transmission
Summary
- Error Control
- Stop-and-Wait ARQ
- Sliding Window ARQ
- Go-back-n
- Selective Reject
- Data Link Protocols
Reading Sections
Section 10.3,11.1,“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan