Layer 2 - Data Link Layer

Previous Layer 1 Protocols Index Layer 3 Protocols Next

The ISDN Data Link Layer is specified by the ITU Q-series documents Q.920 through Q.923. All of the signaling on the D channel is defined in the Q.921 spec.

LAP-D

Link Access Protocol - D channel (LAP-D) is the Layer 2 protocol used. This is almost identical to the X.25 LAP-B protocol.
Here is the structure of a LAP-D frame:

Flag Address Control Information CRC Flag

Flag (1 octet) - This is always 7E16 (0111 11102)

Address (2 octets)
1 2 3 4 5 6 7 8
SAPI (6 bits) C/R EA0
TEI (7 bits) EA1

SAPI (Service access point identifier), 6-bits (see below)
C/R (Command/Response) bit indicates if the frame is a command or a response
EA0 (Address Extension) bit indicates whether this is the final octet of the address or not
TEI (Terminal Endpoint Identifier) 7-bit device identifier (see below)
EA1 (Address Extension) bit, same as EA0

Control (2 octets) - The frame level control field indicates the frame type (Information, Supervisory, or Unnumbered) and sequence numbers (N(r) and N(s)) as required.
Information - Layer 3 protocol information and User data
CRC (2 octets) - Cyclic Redundancy Check is a low-level test for bit errors on the user data.
Flag (1 octet) - This is always 7E16 (0111 11102)

SAPIs

The Service Access Point Identifier (SAPI) is a 6-bit field that identifies the point where Layer 2 provides a service to Layer 3.
See the following table:

SAPI Description
0 Call control procedures
1 Packet Mode using Q.931 call procedures
16 Packet Mode communications procedures
32-47 Reserved for national use
63 Management Procedures
Others Reserved for Future Use

TEIs

Terminal Endpoint Identifiers (TEIs) are unique IDs given to each device (TE) on an ISDN S/T bus. This identifier can be dynamic; the value may be assigned statically when the TE is installed, or dynamically when activated.

TEI Description
0-63 Fixed TEI assignments
64-126 Dynamic TEI assignment (assigned by the switch)
127 Broadcast to all devices

Establishing the Link Layer

The Layer 2 establishment process is very similar to the X.25 LAP-B setup, if you are familiar with it.
  1. The TE (Terminal Endpoint) and the Network initially exchange Receive Ready (RR) frames, listening for someone to initiate a connection
  2. The TE sends an Unnumbered Information (UI) frame with a SAPI of 63 (management procedure, query network) and TEI of 127 (broadcast)
  3. The Network assigns an available TEI (in the range 64-126)
  4. The TE sends a Set Asynchronous Balanced Mode (SABME) frame with a SAPI of 0 (call control, used to initiate a SETUP) and a TEI of the value assigned by the network
  5. The network responds with an Unnumbered Acknowledgement (UA), SAPI=0, TEI=assigned.
At this point, the connection is ready for a Layer 3 setup.


Previous Layer 1 Protocols Index Layer 3 Protocols Next
[RSACi-rated]
Updated December 5, 2006
Copyright © 1996-2006 by Ralph Becker < > send me Feedback!