As mentioned in OSI Article 2, Data Link layer (layer 2 of OSI model) provide a reliable link between two network entities. We will see at the concepts taking example of LAPD (ISDN Link Access Protocol for 'D' channel). LAPD is part of HDLC (High-level Data Link Control) group. Other protocols from HDLC group are LAPB (X.25 Link Access Protocol for 'B' channel in X.25), V.120 (ISDN Terminal Adaptors), PPP (Point-to-point protocol for Modem), LLC (GPRS Logical Link Control) etc.
Main functions of DL layer are establishing/maintaining/tearing down the link, flow control, and error detection.
To do above functions, DL layer works on chunk of data called Frames. In addition to L3 data, Frames contain addition data for Error Detection, Addressing, and Control as shown below:
|
Addressing
Receiving DL layer need to know to which L3 entity (TEI) and/or to which Queue (SAPI), L3 data need to be injected. Address field contain this information as shown below:
|
Error detection
FCS provide means for error detection. FCS is calculated based on L3, Control, and Address data that is to be sent. Receiving side calculates FCS based on received L3, Control, and Address data. Mismatch between calculated FCS and received FCS indicate error. If the error is detected, receiving side indicate it to sending side through Control means.
Note for LAPDm (L2 of GSM Air interface): LAPDm do not need FCS as GSM coding takes care of error detection (and correction).
Control
Control fields distinguish between types of frames: Information frame, Supervisory frames, and Unnumbered frames. Particular type frame is used for specific operation.
Let us take an GSM example of BTS-BSC connection setup and later teardown:
After Layer 1 is established, BSC sends SABME frame to BTS repeatedly. BTS too sends SABME frame to BSC. Upon receiving SABME from BTS, BSC sends UA, followed by another SABME. BTS responds back with UA for latest SABME. BSC now sends RR frame - which indicate to BTS that BSC is Ready to Receive. BTS also sends back RR frame indicating that Layer 2 link is now in service fully.
BTS | BSC |
|
Once Layer 2 is in service, I-frame is used for later transmission of Layer 3 data. Sequence numbers (part of Supervisory and Information frames) are used for flow control as shown below. Sequence numbers indirectly shows that link is in service.
BTS | BSC |
|
L3 data transfer
Layer 3 data has Length indicator at the beginning.
References: GSM Networks book by Heine, 3GPP 04.06 (LAPDm specification), ISDN user-network interface data link layer - Q.920, Q.921.
© Copyright Samir Amberkar 2010
. | Data Link layer concepts Index | » Part 2 - LAPD Frames |