Get started !
online LTE test
online C test

Updated or New
5G NR Data Rate calculator New
5G NR TBS calculator New
5G NR UE Registration New
Python programming
C++ programming
MIMO for 3GPP Developer - 2
Uplink power control
MIMO for 3GPP Developer
NR ARFCN and GSCN
5GS Interfaces



About
Feedback
Information Theory
Modulation
Multiple Access
DSP (wip)
OSI Model
Data Link layer
SS7
Word about ATM
GSM
GPRS
UMTS
WiMAX
LTE
CV2X
5G
Standard Reference
Reference books
Resources on Web
Miscellaneous
Mind Map
Magic MSC tool
Bar graph tool
C programming
C++ programming
Perl resources
Python programming
Javascript/HTML
MATLAB
ASCII table
Project Management

another knowledge site

3GPP Modem
Simulator


Sparkle At Office comic strip

Data Link layer concepts (LAPD) - 1

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:

LAPD Frame
(module 128) 
  Flag  
  (8 bit)  
 0111 1110 
  Frame Check Sequence  
  (16 bit) 
  L3 data  
  (0 to 260 bytes) 
  Control field  
  (16 bit) 
  Address field  
  (16 bit) 
  Flag  
  (8 bit)  
0111 1110 

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:

Address field    Terminal End Identifier  
(TEI)
 EA bit 
  1  
  Service Access Point Identifier  
(SAPI)
  C/R bit    EA bit 
  0  

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

-

SABME frame

SABME frame

SABME frame

UA frame

SABME frame

UA frame

RR frame

RR frame

-

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

-

I-frame, Sent=0, Received=0

RR-frame, Received=1

I-frame, Sent=0, Received=1

RR-frame, Received=1

I-frame, Sent=1, Received=1.
.
.

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