ISDN Data Link Layer Protocol - LAPD (Q.

921)
The purpose of LAPD is to convey user information between ISDN layer 3 entities across the ISDN network using the D channel. Two classes of service are defined. Unacknowledged information transfer service TE
DATA.request CONNECT.confirm CONNECT.indication CONNECT.response DATA.request DATA.indication DATA.indication DISCONNECT.request DISCONNECT.indication

Acknowledged information transfer service TE
CONNECT.request

NT

NT

ISDN network

ISDN network

ISDN Data Link Layer Protocol - LAPD (Q.921)
The ISDN layer 2, Data Link Layer, is used for communication between the terminal equipment and network termination over the D channel. Known as Link Access Protocol, type D (LAPD) is defined in standard Q.921 and the protocol is a subset of HDLC. Two classes of service are provided as shown above. The unacknowledged information transfer service provides for the transfer of data with no acknowledgement and no guarantee of delivery or flow control. The acknowledged information transfer service establishes a logical connection (virtual circuit) between two LAPD users, (an NT and TE for example). Once the connection is established, data is transferred over the circuit in an acknowledged manner with full flow control and error correction. Once the data has been transferred, the connection is formally terminated.

1

The RNR and REJ frames are used for flow control or to request the retransmission of frames respectively. These in turn. 2 . The UI frame is used to support the unacknowledged data transfer service. RR provides a positive acknowledgement of the correct receipt of I frames up to and including N(R)-1. The Command/Response bit differentiates messages as either commands or responses. TEI. which may or may not have already been transmitted but not yet acknowledged. DISC and DM for requesting and confirming the termination of a connection. The FRMR message is used to indicate the an improperly formatted frame has been received. For data transfer. These can be assigned automatically or by manual intervention. In other words N(R) indicates the sequence number of the next I frame in the sequence. Octets 4 and 5 comprise the control octets and can take the values as shown on the right.frame 8 bits 1 2 3 4 5 4 5 1 0 0 0 0 0 0 0 P F Flag 0 C/R 1 SAPI TEI Control (1) Control (2) Information N(R) Receive Ready Receive Not Ready Reject 01111110 4 5 1 0 1 0 0 0 0 0 P F N(R) 4 5 1 0 0 1 0 0 0 0 P F N(R) 4 4 1 1 1 1 P 1 1 0 1 1 1 1 F 0 0 0 1 1 0 0 P 0 0 0 1 1 0 0 P 0 1 0 1 1 0 0 F 1 1 0 1 1 1 0 F 0 0 1 1 1 1 1 F 1 0 1 SABME DM UI DISC UA FRMR XID n-2 n-1 n CRC(1) CRC(2) Flag X16+X12+X5+1 4 4 4 4 ISDN LAPD Frame Format The LAPD frame format is shown in this slide. Each user device is given a unique “Terminal Endpoint Identifier”. I frames are used to transfer data. Finally the XID message is used to negotiate certain performance parameters for the ISDN connection. Supervisory and Unnumbered frames defined within HDLC. The flag field is the standard bit combination of 01111110 and zero bit insertion or “bit stuffing” is used to ensure that the flag cannot naturally occur within the frame except at the designated positions as shown.ISDN LAPD Frame Format 4 5 0 P F N(S) N(R) I . contain the send sequence (N(S)) and receive sequence (N(R)) counts which keep track of the frame count. The next two octets (2 and 3) comprise the frame addressing. SAPI identifies the ISDN layer 3 user of the LAPD service. These follow the standard Information. The “Service Access Point Identifier”. These comprise the SABME and UA frames for establishing and confirming a connection.

Finally. Note that either side could have issued the DISC. Here the process is initiated with the transmission of a SABME. The data exchange shown here illustrates the transmission of I frames from the TE to NT and from the NT to TE. N(R)=1. These I frames are in effect transferring data in one direction and providing an acknowledgement in the opposite direction. N(R)=2. N(R)=2.P/F=0} I{N(S)=2. any I frames that have been transmitted and are numbered above this value are not acknowledged yet .LAPD Protocol Operation TE SABME I{N(S)=1.this DOES NOT mean that such frames are rejected! A maximum number of I frames can be transmitted without an acknowledgement (known as the acknowledgement window size). This is achieved by the transmission of a DISC frame which is acknowledged with a DM frame. each I frame contains a Poll/Final bit whose operation is shown in the next slide. N(R)=0. Note that the N(R) field would acknowledge the correct reception of all I frames numbered up to an including N(R)-1 however. The is the call establishment request. With regard to the data transfer phase.P/F=0} I{N(S)=3. this is achieved with the transmission of I frames. N(R)=4. N(R)=0. Should a connection not be accepted then a DM would be issued in response to the SABME as shown. On completion of the data transfer phase the connection must be terminated.P/F=0} I{N(S)=4.P/F=0} Data Transfer DISC DM Partial ack Full ack Failed connection request I{N(S)=1. N(R)=1. If the call can be achieved then the NT will respond with a UA. Acknowledgements can be full in that they acknowledge all I frames that have been transmitted at a particular point in time or partial in that only some of the transmitted I frames are acknowledged. Each I frame contains a send sequence number N(S) which indicates the number of the frame being transmitted (0-127-0.P/F=0} UA Full ack Normal connection establishment.P/F=0} I{N(S)=5. Should this number be transmitted without having received an acknowledgement then transmission must stop until an acknowledgement is received.P/F=0} I{N(S)=2. data transfer and connection termination phases I{N(S)=0. N(R)=6.P/F=0} NT TE NT I{N(S)=0. N(R)=1. On the left had side is shown the connection establishment phase. At this point the data transfer phase is entered (shown on the right).P/F=0} SABME DM LAPD Protocol Operation This slide illustrates the basic operation of the LAPD protocol. a receive sequence number N(R) which indicates the number of the next I frame expected to be received. 3 .

Whilst acknowledging all I frames transmitted. P/F=1} LAPD Protocol . On the right hand side is shown how flow control can be implemented.P/F=1} RR{N(R)=45. The NT therefore issues a reject REJ frame which has an N(R) field equal to the I frame number from which retransmission must commence. the NT responds with a receive not ready RNR frame. N(R)=17.LAPD Protocol .Error Recovery and Flow Control TE I{N(S)=23. This immediately forces an acknowledgement to be issued. Also shown here is the case where transmission of I frames is about to stop. In this slide an example of an I frame which fails to arrive is shown on the left.P/F=0} I{N(S)=24. N(R)=17. The last I frame to be sent has the P/F bit set to 1.P/F=1} Transmission can resume I{N(S)=45.P/F=0} I{N(S)=25. N(R)=17. N(R)=33. N(R)=33. Transmission can only resume when a RR frame is received.P/F=0} I{N(S)=26. after the one that did not arrive. However. In this case a receive ready RR frame is issued. N(R)=33. Having transmitted I frame N(S)=44. 4 .Error Recovery and Flow Control Should an I frame be subjected to errors and either fail to arrive or arrive with a CRC error then a recovery procedure is followed. When the next I frame. In this case it sends an RR (also with the P/F set to 1) and transmission can resume.P/F=0} Mismatch in sequence I{N(S)=44. should a RR frame not be forthcoming then a poll can be issued by transmitting a RR frame with the P/F bit set to 1. N(R)=17.P/F=0} NT *** Transmission must stop Timer Retransmissions RNR {N(R)=45} RR{N(R)=33. P/F=1} RR{N(R)=27. this frame forces the TE to stop transmission. In this case the retransmission begins with I frame N(S)=24 and continues as normal. is received then the sequence number of this frame will not be one greater than the other most recently received I frame. This forces the NT to issue a response. N(R)=17. N(R)=17.P/F=0} NT TE I{N(S)=42.P/F=0} I{N(S)=25.P/F=0} I{N(S)=43. N(R)=33. This frame not only acknowledges all I frames transmitted but also has the P/F bit set to show that it is in response to the I frame that had its P/F bit set to 1.P/F=0} REJ {N(R)=24} I{N(S)=24.

5 .

Firstly. Hence.LAPD Addressing TEI Value User Type 0-63 64-126 127 Non-automatic TEI assignment user equipment Automatic TEI assignment user equipment Used during automatic TEI assignment SAPI Value 0 16 32-61 63 All others Related Protocol Call control procedures Packet communication conforming to X. These SAPI values must be unique within a TEI. a service access point identifier (SAPI) is used to indicate the corresponding layer 3 protocol entity.25 level 3 Frame Relay communication Layer 2 management procedures Reserved Terminal Equipment Terminal Equipment Layer 3 SAPI(a) Layer 3 Layer 3 SAPI(b) LAPD TEI(1) SAPI(a) LAPD TEI(2) NT TEI + SAPI = Data Link Connection Identifier (DLCI) LAPD Addressing Two types of addressing are provided for within LAPD. 6 . This can be achieved either automatically upon powering-up the terminal equipment or by manual intervention. Within a given piece of terminal equipment there could be a number of layer 3 protocol users of the LAPD service. The value range indicates the type of service being supported as shown in the table. Taken together the TEI and SAPI are known as a Data Link Connection Identifier (DLCI). each piece of terminal equipment is given a unique terminal endpoint identifier (TEI).

then further XIDs must be exchanged until this condition is met. the receiver of it is forced to respond with its own XID. the value used in practice is subject to negotiation between two LAPD entities. This XID contains a parameter list within the information field with the desired value for each parameter. In the diagram above it is the TE that issues the XID however. This XID contains a parameter list with values that can be supported.requested value LAPD Parameter Negotiation The LAPD protocol defines certain key parameters as shown in the table above.LAPD Parameter Negotiation Parameter Default Value T200 T201 T202 T203 N200 N201 N202 k 1 second = T200 2 seconds 10 seconds 3 260 octets 3 1 for 16kbps signalling 3 for 16 kbps packet 7 for 64 kbps Definition Time to wait for an acknowledgement Minimum time between TEI identity check messages Minimum time between TEI identity request messages Maximum time with no frames exchanged Maximum number of retransmission of a frame Maximum length of the frame’s information field Maximum number of retransmissions of TEI identity requests Maximum number of outstanding I frames TE NT XID {parameter list with desired values} XID {parameter list with values than can be supported} Values should be in the range: default value . Each value for these parameters must therefore be in the range between the default value and the requested value. If not. 7 . it could just as easily have been the NT that initiated the XID. Each parameter is assigned a default value by the standard however. To negotiate (change) a parameter from the default value a LAPD entity issues an “Exchange Identification” XID frame. Having issued an XID.

Sign up to vote on this title
UsefulNot useful