Overview Data Link Technology Functions of the data link layer Technologies concept and design error control flow control fundamental protocols Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science I / 3 1 I / 3 2 Role of the data-link layer Communications between hosts over the same transmission media communication between hosts over the same physical media shared media point-to-point connection Physical connection type does not always correspond to a communication model. Especially Ethernet. Role of the data-link layer Using physical layer service to provide communication function. packet switching datalink frame Interface for the network layer network data link introduction of the concept of packet address-based node identification semantic communication control physical I / 3 3 I / 3 4 Functions of the data link layer Frame synchronization Error detection, error correction ARQ, flow control Addressing Link management Function of the physical layer Providing minimal functions to use the digital wire. Per-bit transmission and correcting error Input: bit sequence, Output: bit sequence Direct control over electrical or optical signal transmission medium Remarkable points transmission medium maximum transmission distance multiplexing cost I / 3 5 I / 3 6
Frame Datalink layer protocol data unit (PDU) Defining the frame borders. Can determine failure (bit error) root cause Adding error-detecting / error-correcting code to bit sequences in order to delimit the appropriate frame length Frame header error detection and flow control control information 01111110 address control data checksum 01111110 Frame synchronization (1) Character-based frame synchronization Physical layer transmits data based on character unit. CCITT X.21 physical layer frame is 8bit coding format ASCII(IA5) Insertion of a special character at the header and footer of the data transmission. STX, ETX Data identification by DLE (Data Link Escape) transmission of binary data character stuffing header payload I / 3 7 I / 3 8 Frame synchronization (2) Original Data Transmission Sequence DLE ETX DLE DLE DLE STX DLE data frame character stuffing transmission Frame synchronization (3) Bit-sequence-based frame synchronization A special bit sequence is inserted to the data header and footer. synchronization bit stuffing special bit sequence only appears at the frame header and footer e.g. special bit sequence 01111110 01111110 address control data checksum 01111110 I / 3 9 I / 3 10 Frame synchronization (4) Original Data Transmission Sequence end bit pattern start bit pattern transmission Error Control Goal Detecting and correcting transmission error in channel Is the frame correctly sent? Is the frame sequence order correct? Technology Introducing the concept of frame (failure localization) Coding technology Error Correction Code Error Detection Code Protocol technology timer retransmission bit stuffing I / 3 11 I / 3 12
Error detection code bit error parity method is typical example ASCII is a 7-bit code representation. Parity bit is the 8th bit. Even parity: even number odd parity: odd number of Detecting single bit error in 8-bit frame is possible burst error consecutive bits error Usually caused by electrical noise of a network adaptor or a switching equipment Widespread use of cyclic code. CRC (Cyclic Redundancy Check code) Existence of several standards. FEC (Forwarded Error Correction) CRC (1) Adds a failure detection CRC check bit after the frame. Polynomial representation of the bit sequence. n-bit sequence (a n-1 1, a 0 ) a i : 0 or 1 polynomial expression F(x)=a n-1 x n-1 2 x 2 +a 1 x+a 0 Calculates polynomial expression. modulo 2 equivalent to an exclusive OR I / 3 13 I / 3 14 CRC (2) Calculation procedure Generate the generator polynomial G(x) of order r (r < m) In the case a node sends an m-bit frame, the polynomial expression is M(x) (order m-1) Generate x r M(x) by adding r Calculate a remainder R(x) by dividing the polynomial expression x r M(x) by G(x). CRC (3) Error detection F(x) is always divisible by G(x) If F(x) is not divisible by G(x), there is a remainder Burst error less than r-bit long is detectable Other remainders depend on G(x) Generate F(x), the code to be sent F(x) = x r M(x) + R(x) I / 3 15 I / 3 16 Standardized CRC (1) Typical standards CRC-12 x 12 +x 11 +x 3 +x 2 +x+1 CRC-16 x 16 +x 15 +x 2 +1 CRC-32 x 32 +x 26 +x 23 +x 22 +x 16 +x 12 + x 11 +x 10 +x 8 +x 7 + x 5 +x 4 +x 2 +x+1 CRC-CCITT x 16 +x 12 +x 5 +1 Standardized CRC (2) Application CRC-12 for 6-bit character expression CRC-16 and CRC-CCITT for 8-bit character expression Detection Characteristics (CRC-16 and CRC-CCITT) all single- and two-consecutive-bit errors all odd-bit number errors burst errors less than 16-bit long 99.997% of burst errors less than 17-bit 99.998% of burst errors more than 18-bit There exist many other CRC standards. I / 3 17 I / 3 18
Error Correction Code Retransmission Error Correction Code hamming code distance between codes -bit error detection >a+1 b -bit error correction >2b+1 1 1 b a For error control Receiver-side frame error detection Sender has to send the same frame once more retransmission Many implementation methods ARQ (Automatic Repeat request) Fundamental protocols Stop-and-wait Go-back-N Selective-repeat I / 3 19 I / 3 20 Stop-and-wait ARQ (1) Stop-and-wait ARQ (2) Sender t 1 t 2 t 3 t 1 t 4 t 1 : Round Trip Time t 2 : Frame Transmission Time t 3 : Frame Processing Time t 4 : ACK Transmission Time t 5 : ACK Processing Time t 5 Receiver Procedure Waiting to receive ACK on each frame transmission Setting a sender timer greater than 2t 1 +t 2 +t 3 +t 4 Retransmission when sender timer times out. Characteristics Simple The buffer never contains more than one frame for the receiver and the sender Line usage rate is extremely bad I / 3 21 I / 3 22 Go-back-N ARQ (1) Procedure Improving Stop-and-Wait Protocol. Transmitting a frame in series. Error detection A frame in which an error has been detected is dropped until the frame is correctly received. Go-back-N ARQ (2) Time out for Frame3!! 1 2 3 4 5 3 4 5 6 No ACK is returned until the frame is correctly received. 1 2 4 5 3 4 5 6 I / 3 23 I / 3 24
Go-back-N ARQ (3) Characteristics Wastefulness : upon error detection, correct frames received after the error are also dropped. Especially, setting a bigger value to the retransmission timer is a disadvantage. On the sender side, a buffer is necessary for retransmission. For frames that did not receive an ACK, buffering is necessary to enforce retransmission. -back-n corresponds to the number of frames sent without receiving an ACK (on-the-fly frames) Buffer depends on the retransmission timer value. Selective-repeat ARQ (1) Methods Improving Go-back-N protocol. Only retransmitting necessary frames (erroneous frames). Characteristics Transmission efficiency is better than Go-back-N. Not dropping correct frames uselessly. Processing is complex. Needs a buffer on the receiver side. Frame sequence control is necessary. I / 3 25 I / 3 26 Selective-Repeat ARQ (2) Time out for Frame3!! 1 2 3 4 5 3 6 7 8 1 2 4 5 3 6 7 8 Flow control Stop-and-Wait and Go-back- processing on the receiver side. In Selective-Repeat, sequence control is enforced on the receiver side. Buffer on the receiver side When sender-side processing does not perform well, there is a possibility that an overflow occurs on the receiver side. Flow control Overflow control between the receiver and sender using some methods. I / 3 27 I / 3 28 Window Flow Control Window flow control W : window size Considering a same buffer size for the receiver. On sender side, let Nr be in (1)the number of already sent frames, (2) those that did not receive an ACK. Transmitting until Nr < W sliding window flow control Windows Flow Control Sender keep frame until ACK is received sent frame sendable frame maximum size W) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 already received ACK last sent frame if sent If ACK is received move to right move to right Receiver received frame receivable frame maximum size W) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 I / 3 29 already transmitted ACK last received frame if received if ACK is sent move to I right move / 3 to right 30
Fundamental functions of data link layer Providing fundamental functions for packet switching Using transmitting functions provided by the physical layer, enables packet level switching. Exchanging frames Identifying nodes by address Providing a data forwarding function that takes the characteristics of the physical layer into account. Stable data transmission. Propagation delay Errors Interface for network layer. Especially, when a common interface is provided, the difference of medium can be absorbed. IEEE802.2 and IEEE802.x From monolithic structure to sub-layered structure Network Layer Data link Layer Physical Layer Logical Link Control Sublayer Media Access Control Sublayer ISO/OSI Local Area Network Definitions (8802) 8802/3 CSMA/CD 8802/2 LLC 8802/4 Token Bus 8802/5 Token Ring CCITT Datalink Layer Definition CCITT X.25 (HDLC/LAPB) I / 3 31 I / 3 32 From monolithic structure to sub-layered structure Datalink basic concepts were formed from the technologies using point-to-point connection type datalink back in the 1960s. LAN standardization from the late 1970s moved to sub-layered structure. Architecture of ISO/OSI 8802 and IEEE802 groups. Constructing a common IEEE802.2 (ISO8802/2) Logical Link Control (LLC) IEEE802.x specialized for each medium Data link layer structure Divided into sub-layers Which function provided by which sub layer? http://standards.ieee.org/getieee802/ 802.3 CSMA/CD IEEE 802.2 LLC 802.11 WLAN 802.16 WMAN LLC: Logical Link Control MAC: Medium Access Control 802.3u 802.3ae 802.11a 802.11b 802.16a PHY: Physical Layer I / 3 33 I / 3 34 Data-link layer service model Unacknowledged Connectionless Service (LLC type1) Transmitting frame without synchronization between sender and receiver. No special processing, upon error detection. Enforcing error control in upper layers. Control method for high speed and errorless links. LAN, real-time traffic (voice/speech) Acknowledged Connection-oriented Service (LLC type2) Setting up a connection, before data transmission Enabling synchronized processing between sender and receiver Ensuring reliability (error and sequence) Processing is usually complex For low speed and error-prone links Data-link layer service model Acknowledged connectionless Service (LLC type3) Receiver sends ACK for each frame. Enforcing error control at data-link layer level Improving reliability Unacknowledged Connection-oriented Service Not ensuring reliability (error and sequence) Control method for high speed and errorless links. I / 3 35 I / 3 36
Role allocation with upper layers In which layer implementation is realized is up to design choices. Various solutions exist Transport Network Data Link sequence assurance flow control retransmission surveillance of network error detection and correction frame range I / 3 37 Conclusion Introduced fundamental technology of data-link layer Flow Control Fundamental protocols, ARQ Data-link layer structure Evolution from monolithic structure to sub-layered structure LLC, MAC Existing various forms of function redundancy/ assignment with upper layers. These technologies are used in another layers e.g. network layer, transport layer General technology I / 3 38