Chapter 7 - Data Link Control Protocols
Stop-and-Wait Flow Control
A source entity transmits a frame. After the destination entity receives the frame, it indicates its willingness to accept another frame by sending back an acknowledgment to the frame just received. The source must wait until it receives the acknowledgment before sending the next frame. The destination can thus stop the flow of data simply by withholding acknowledgment.
Sliding Windows Flow Control
Allows multiple numbered frames to be in transit If have full-duplex link, can piggyback ACKs
Selective-Reject ARQ
Also called *selective retransmission* Only rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Minimizes retransmission Receiver must maintain large enough buffer More complex logic in transmitter Less widely used Useful for satellite links with long propagation delays
Error Control
Bit errors introduced by the transmission system should be corrected.
Information Frames (I-frames)
Carry the data to be transmitted for the user Flow and error control data, using the ARQ mechanism, are piggybacked on an information frame
Automatic Repeat Request (ARQ)
Collective name for error control mechanisms Effect of it is to turn an unreliable data link into a reliable one
Combined Station
Combines the features of primary and secondary. May issue both commands and responses.
Unbalanced Configuration
Consists of one primary and one or more secondary stations and supports both full-duplex and half-duplex transmission.
Balanced Configuration
Consists of two combined stations and supports both full-duplex and half-duplex transmission.
Frame Synchronization
Data are sent in blocks called frames. The beginning and end of each frame must be recognizable
Disconnect
Either module can initiate Either on its own initiative if there is some sort of fault, or at the request of its higher-layer user Sends disconnect (DISC) frame Remote entity replies with a UA Any outstanding unacknowledged I-frames may be lost Recovery is the responsibility of higher layers
Error Control Techniques
Error Detection Positive Acknowledgment Retransmission after timeout Negative acknowledgment and retransmission
Frame Check Sequence Field
Error detecting code calculated from the remaining bits of the frame, exclusive of flags The normal code is the 16 bit CRC-CCITT Optional 32-bit FCS, using CRC-32, may be employed if the frame length or the line reliability dictates this choice
Bit Stuffing
For all bits between the starting and ending flags, the transmitter inserts an extra 0 bit after each occurrence of five 1s in the frame. After detecting a starting flag, the receiver monitors the bit stream
Responses
Frames issued by a secondary station
Commands
Frames issued by the primary station
Secondary Station
Operates under the control of the primary station. Frames issued by a secondary are called responses. The primary maintains a separate logical link with each secondary station on the line.
Address Field
Identifies secondary station that transmitted or will receive frame Usually 8 bits long May be extended to multiples of 7 bits Leftmost bit indicates if is the last octet (1) or not (0) Address 11111111 allows a primary to broadcast a frame for reception by all secondaries
3 Types of Frames
Information Frames (I-frames) Supervisory Frames (S-frames) Unnumbered Frames (U-frames)
HDLC Operation
Initialization Data Transfer Disconnect
Control and Data
It is usually not desirable to have a physically separate communications path for control information. Accordingly, the receiver must be able to distinguish control information from the data being transmitted.
Go-back-N ARQ
Most commonly used error control Based on sliding-window Use window size to control number of outstanding frames While no errors occur, the destination will acknowledge incoming frames as usual RR=receive ready, or piggybacked acknowledgment If the destination station detects an error in a frame, it may send a negative acknowledgment REJ=reject Destination will discard that frame and all future frames until the frame in error is received correctly Transmitter must go back and retransmit that frame and all subsequent frames
High Level Data Link Control (HDLC)
Most important data link control protocol Specified as ISO 3009, ISO 4335
HDLC Data Transfer Modes
Normal Response Mode (NRM) Asynchronous Balanced Mode (ABM) Asynchronous Response Mode (ARM)
Addressing
On a shared link, such as a local area network (LAN), the identity of the two stations involved in a transmission must be specified.
Information Field
Present only in I-frames and some U-frames Must contain an integral number of octets Variable length
Station Types
Primary Station Secondary Station Combined Station
Unnumbered Frames (U-frames)
Provide supplemental link control functions
Supervisory Frames (S-frames)
Provide the ARQ mechanism when piggybacking is not used
Primary Station
Responsible for controlling the operation of the link. Frames issued by the primary are called commands.
Initialization
Signals the other side that initialization is requested Specifies which of the three modes (NRM, ABM, ARM) is requested Specifies whether 3- or 7-bit sequence numbers are to be used
Versions of ARQ
Stop-and-Wait Go-back-N Selective-reject
Flow Control
Technique for assuring that a transmitting entity does not over-whelm a receiving entity with data The sending station must not send frames at a rate faster than the receiving station can absorb them.
Data Transfer
The N(S) and N(R) fields of the I-frame are sequence numbers that support flow control and error control An HDLC module will number them sequentially Receive Ready (RR) is used when there is no reverse user data traffic
Control Field
Use of poll/final (P/F) bit depends on context In command frames P bit is set to 1 to solicit (poll) a response from the peer HDLC entity In response frames F bit is set to 1 to indicate the response frame transmitted as a result of a soliciting command The basic control field for S- and I-frames uses 3 bit sequence numbers An extended control field can be used that employs 7-bit sequence numbers U-frames always contain an 8-bit control field
Error Detection
The destination detects frames that are in error, using the techniques described in the preceding chapter, and discards those frames.
Negative acknowledgment and retransmission
The destination returns a negative acknowledgment to frames in which an error is detected. The source retransmits such frames.
Positive Acknowledgment
The destination returns a positive acknowledgment to successfully received, error-free frames.
Link Management
The initiation, maintenance, and termination of a sustained data exchange require a fair amount of coordination and cooperation among stations. Procedures for the management of this exchange are required.
Retransmission after timeout
The source retransmits a frame that has not been acknowledged after a predetermined amount of time.
Link Configurations
Unbalanced Configuration Balanced Configuration
Asynchronous Balanced Mode (ABM)
Used with a balanced configuration Either station initiates transmission Has no polling overhead Most widely used
Normal Response Mode (NRM)
Used with an unbalanced configuration Primary initiates transfer
Asynchronous Response Mode (ARM)
Used with unbalanced configuration Secondary may transmit without permission from primary Rarely used
Data Transparency
With the use of bit stuffing, arbitrary bit patterns can be inserted into the data field of the frame. This property is known as ____
Lost Frames
a frame fails to arrive at the other side
Stop and Wait ARQ
based on the stop-and-wait flow control technique outlined previously. The source station transmits a single frame and then must await an acknowledgment (ACK). No other data frames can be sent until the destination station's reply arrives at the source station.
Damaged Frames
frame arrives but some of the bits are in error