Search code examples
networkingdata-link-layer

What is the Difference between REJECT and SELECTIVE REJECT in HDLC protocol?


I was reading about the HDLC (High-Level Data Link Control ) protocol in which the frame's control field has a 'Type bit'. The type Bit 1 is for REJECT which is basically a Negative Acknowledgement packet asking to retransmit the damaged frame. Now I don't have a problem with that. But type bit 3 is for SELECTIVE REJECT. I googled it and it claimed to be the same as REJECT. This confuses me. What exactly is SELECTIVE REJECT?


Solution

  • Sorry for answering my own question. Just researched a little and found this amazing answer. I promise to research more thoroughly before posting questions on SO. So hope it is useful for someone.

    Reject (REJ):

    If the value of the code subfield is 01, it is a REJ S-frame. This is a NAK frame, but not like the one used for Selective Repeat ARQ. It is a NAK that can be used in Go-Back-N ARQ to improve the efficiency of the process by informing the sender, before the sender time expires, that the last frame is lost or damaged. The value of N(R) is the negative acknowledgment number.

    Selective reject (SREJ):

    If the value of the code subfield is 11, it is an SREJ S-frame. This is a NAK frame used in Selective Repeat ARQ. Note that the HDLC Protocol uses the term selective reject instead of selective repeat. The value of N(R) is the negative acknowledgment number.

    Here's the full link. Link