BANalyzerContentsBackNext

HDLC Operation

1. Initialization

A HDLC link is set up by using one of these set commands:

SNRM / SNRME

Set normal response/extended mode (7-bit sequence numbers). Used on multidrop lines; one station is designed primary; secondary stations may only transmit frames when being polled.

SARM / SARME

Set asynchronous response / extended mode (7-bit sequence numbers). Used on multidrop lines with link initialization done by a secondary station.

SABM / SABME

Set asynchronous balanced / extended mode (7-bit sequence numbers). Used on point-to-point lines; either side may initiate data transfer.

SIM

Set initialization mode.Initializes the link-control functions in the addressed station.

During initialization, the usage of 3-bit or 7-bit sequence numbers is specified by these set commands.

2. Data Transfer

When the initialization has been requested and accepted, then a logical connection is established. Both sides may begin to send user data in I-frames.

N(s) <> N(r)

Flow control and error control are provided by using the N(s) and N(r) fields (send/receive sequence number). A station numbers the frames it sends sequentially modulo 8 or 128, depending on whether 3- or 7-bit sequence numbers are used, and places the sequence number in N(s). When a station receives a valid I-frame, it acknowledges that frame with its own I-frame by setting the N(r) field to the number of the next frame it expects to receive. This is known as piggibacked acknowledgment, since the acknowledgment rides back on an I-frame. Acknowledgments can also be sent on a supervisory frame.

The use of sequence numbers accomplishes three important functions:

1. Flow Control

A station is only allowed to send 7 frames (3-bit sequence number) or 127 frames (7-bit sequence number) without an acknowledgment. No more frames may be sent until some of the outstanding frames are acknowledged. Thus, if the receiver is slow to acknowledge, the sender's output is restricted.

2. Pipelining

More than one frame may be in transit at a time; this allows more efficient use of links with high propagation delay, such as satellite links.

3. Error Control

If a frame is received in error, a station can send a negative acknowledgment via a supervisory frame to specify which frame was received in error. This may be done in one of two ways. In the go-back-N() approach, the sending station retransmits the rejected frame plus all subsequent frames that have been transmitted since the rejected frame. In the selective-repeat approach, the sending station retransmits only the frame received in error.

Supervisory Frames

There are four types of S-frames. The receive-ready (RR) frame is used to acknowledge the last I-frame received by indicating the next I-frame expected. The RR is used when there is no reverse use data traffic (I-frames). Receive-not-ready (RNR) acknowledges an I-frame, as with RR, but also asks the peer entity tu suspend transmission of I-frames. When the entity that issued the RNR is again ready, it sends an RR. REJ indicates that the last I-frame received has been rejected and that retransmission of all I-frames beginning with number N(r) is required. Selective reject (SREJ) is used to request retransmission of just a single frame.

3. Disconnect

Either HDLC module can initiate disconnet, either on its own initiative if there is some sort of fault or at the request of its higher-layer user. HDLC issues a disconnect by sending a disconnect (DISC) frame. The other side must accept the disconnect by replying with a unnumbered acknowledgment (UA).

Literature/Sources:

HDLC


BANalyzerContentsBackNext