0% found this document useful (0 votes)
77 views6 pages

HDLC Derived Protocols: High Speed Data Link Control Defined

Protocolos de alta velocidad

Uploaded by

Edgard Gopar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views6 pages

HDLC Derived Protocols: High Speed Data Link Control Defined

Protocolos de alta velocidad

Uploaded by

Edgard Gopar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

HDLC Derived Protocols

High Speed Data Link Control Defined


HDLC (High speed Data Link Con- model only. One must note that some
trol) is a common reference in most well known protocols such as TCP/IP
A Tutorial WAN products. The purpose of this and Signaling System 7 (SS7) were de-
paper is to define the variations and veloped before the OSI model, and
By Ben Dewey uses of protocols derviced from HDLC. therefore do not exactly align with the
Senior Product Manager defined OSI boundaries, where protocol
SBE Inc. The OSI Model stacks like IBM’s SNA have a very close
The Open Systems Interconnection relationship. However, when used as a
(OSI) is a seven-layer protocol stack reference, the OSI model gives us a
model used as a reference throughout general idea of what to expect from the
the computer industry. The ISO was various layers of a given protocol stack.
developed as a functional reference

The OSI Stack Protocol Model

Provides application services


Layer 7 APPLICATION such as file transfer, remote
file access

Masks format differences


Layer 6 PRESENTATION between applications while
preserving information content

Dialog management. Controls


Layer 5 SESSION basic communication facility
between applications

Rules for information


Layer 4 TRANSPORT exchange and reliable end-to-
end data delivery

Procedures for data transfer


Layer 3 NETWORK between computers; routing

Group bits into frames.


Layer 2 DATA LINK Synchronize and provide error
checking

Convert digital signals into a


Layer 1 PHYSICAL INTERFACE bit stream. Transmit across
physical circuit

www.sbei.com
HDLC Derived Protocols

Data Link Layer


Layer 2: Data Link Layer
Since all HDLC derived protocols reside in
the Data Link layer (a.k.a. layer 2), we will
only concern ourselves with this layer. The Secondary
Primary Station Command
Data Link layer is tasked to establish and (Master)
Station/s
Response (Slave)
maintain point-to-point Wide Area Net-
work (WAN) links. Each data link is actu-
ally two, and only two, entities communi- Normal Response Mode

cating at any one time through a physical


port. There are two basic types of data link
protocols, a master-slave interaction called Peer Station 1
Command
Peer Station 2
Normal Response Mode (NRM, also (DTE) (DCE)
Response
known as Unbalanced), and a peer to peer
relationship called Asynchronous Balanced
Asynchronous Balanced Mode
Mode. NRM has all connection initializa-
tion, configuration and control done by
the designated master (or Primary Station),
ABM allows either peer (“Balanced”) to Basic HDLC Frame1
initialize and control the link at any time
(“Asynchronous”). NRM may have more Flag Address Control Information CRC Flag
than one Secondary Station (multidrop,
multipoint), but they must communicate
Provided by hardware
by way of the Primary Station.
Provided by data link protocol software

HDLC Note 1: Except where indicated, all frames shown are transmitted from left most bit first

There are many non-HDLC protocols that


fall within the data link spectrum, from
Monosync and Bisync to the IEEE 802.2
LLC and MAC layers. This paper is only 7809, etc.). A second, more common meaning is some data en-
concerned with HDLC derived protocols, capsulated in HDLC framing that includes frame delimiters
commonalities and differences. Non- (“flags”), zero bit insertion (“bit stuffing”) and CRC generation.
HDLC protocols will be covered in future The last is better known because it is a common part of several
documentation. different data link protocols, and is designed into a wide array of
The full HDLC protocol is defined in ISO WAN controller chips (hardware implementation). A sample of
3309 and related ISO standards. HDLC protocols that use HDLC framing include:
was the result of an effort by the interna-
tional community to develop a standard for LAPB Link Access Protocol (Balanced), Data link level
data link communication. HDLC has its for X.25
roots in the ISO protocol stack model, a LAPD Link Access Protocol (D channel) used for ISDN
framework also defined by the interna- D channel and other telco signaling
tional standards bodies. Frame Relay An independent data link protocol
It should be noted that the term “HDLC” SDLC The template for HDLC, used in IBM’s System
can be taken a couple of ways based on the Network Architecture (SNA) stack
target applications. One interpretation MTP-2 Data link Signaling layer of SS7
(rare) is a complete ISO documented data PPP Point-to-Point Protocol.
link protocol (e.g., ISO 3309, 4335,

2 SBE, Inc. © 2001


HDLC Derived Protocols

The basic HDLC frame consists of two frame


Address and Control Fields
delimiters, address, control and information
fields, and a CRC.
HDLC Address Field
• The frame delimiters (8 bits), also known Primary station issues command frames with secondary station address.
as flags, mark the end points of the Secondary station issues responses with secondary station address.

HDLC frame. The binary flag pattern is HDLC Address:


X X X X X X X X
always 01111110, or 7E hex. Always secondary station address
• The address section (8 bits or multiple of
8) of the frame contains the destination HDLC Control Fields
address, which is either 01 (DTE) or 03
0 N(S) P/F N(R) Information
(DCE). HDLC is a point to point (one
on one) link there are only two possibili-
ties. 10 SS P/F N(R) Supervisory
• The control field (8 bits or multiple of 8)
is where bits of information about the
frame itself and some link status, are 11 MM P/F MMM Unnumbered

passed to the destination. The destina- 1 2 3 4 5 6 7 8


tion system will take action depending
on the value of these bits. N (S) Number of this frame (last frame sent) by source (0-7)
• The information field (variable length, N (R) Number of last frame received by source (0-7)
P/F Poll/Final bit. If Poll, system soliciting a response. If Final, system
not used in some types of frames) is the response frame
actual payload of the frame. Usually the I S Supervisory function bit
M Modifier function bit
field is an encapsulated upper layer pro-
tocol packet (or partial packet), but it Values for S and M Command/Response bits can be found in ISO 4335.
may also be raw data.
• The Cyclic Redundancy Code (16 or 32
bits), is a mathematical pattern check of LAPB Frame
the complete frame (sans the flags and
CRC). The frame is checked on its way
Flag Address Control Information CRC Flag
out of the source system, and the CRC is
added. At the destination, the same
mathematical algorithm in again per-
formed as the frame is received, and is Same as HDLC
then compared against the transmitted
CRC for the sake of data accuracy.
• Bit stuffing or zero insertion, is done by
0 0 0 0 0 0 1 1 DTE Address (A)
the hardware, and can happen anywhere
within the frame. The purpose of bit 0 0 0 0 0 0 0 1 DCE Address (B)
stuffing is to mask any data that may be
construed as a frame delimiter
DTE issues command frames with address B, response frames with address A
(01111110). As the data arrives from the DCE issues command frames with address A, response frames with address B
protocol layer (before the flags are
added), the frame is monitored for con-
secutive ones. When five consecutive ones are found in the
data stream, a zero is inserted immediately following the fifth
one (1). On receive, the stuffed zeros are removed before the
data is passed up to the protocol handler.
SBE, Inc. © 2001
3
HDLC Derived Protocols

Address and Control Fields


LAPD Frame
The address and control fields are where
most HDLC derived protocols differ. Even
in a standard HDLC frame the address Flag Address Control Information CRC Flag
octet(s) may differ depending on the
configuration of the link. In unbalanced
or NRM mode, the address always con-
tains the secondary station address. In
Balanced Mode where either end point
can control the link, the address field
contains the destination address. The SAPI C/R EA TEI EA
control field also differs within HDLC
depending on the frame type, Informa-
tion, Supervisory, or Unnumbered. DLCI

LAPB Frame
Linked Access Protocol (Balanced) is the
data link layer used with X.25. The ad-
Frame Relay
dress field can contain only one of two
fixed (DTE or DCE) addresses. The con-
trol fields are identical with HDLC. Flag Address/Control Information CRC Flag

LAPD Frame
Linked Access Protocol (D Channel) is the
data link layer used with ISDN. The
control field is identical to HDLC, but
the address field differs. The address field
DLCI C/R EA DLCI FECN BECN DE EA
contains the Service Access Point Identifier
(SAPI), Terminal Endpoint Identifier 6 1 1 4 1 1 1 1
(TEI), a Command/Response bit and two Octet 1 Octet 2
address field extender bits. The SAPI and
TEI together make up the Data Link
Connection Identifier (DLCI). The SAPI DLCI Data Link Connection Identifier
C/R Not used in Frame Relay
identifies the type of service (Signaling, EA Extended Address bit
Packet Data, or Management) required of FECN Forward Explicit Congestion Notification
BECN Backward Explicit Congestion Notification
the layer 3 (Network Layer) protocol. The DE Discard Eligibility bit
TEI is the address of the remote endpoint.

Frame Relay
Frame Relay was developed to overcome confirmation. Frame Relay is similar to other HDLC protocols,
the multiple layer handshaking overhead but it does not have a separate address and control fields. The
used in X.25. Frame Relay takes advantage address and control fields are combined. ISPs will often use Frame
of the fact that phone lines in North Relay over a clear channel T1 for high speed WAN connections.
America are relatively error free. Frame
Relay relies on some upper layer protocol Frame Relay does not have a designated upper level protocol. It is
to provide the necessary data transport often used by Internet Service Providers (ISPs) to encapsulate

4 SBE, Inc. © 2001


HDLC Derived Protocols

TCP/IP, but is also defined by


SDLC
ITU-T and ANSI as part of the ISDN
Control and User planes. See ITU-T
Flag Address Control Information CRC Flag Q.921, Q.922 and Q.931, and ANSI
T1.601, and T1.602, for additional infor-
mation.
Same as HDLC
SDLC
Synchronous Data Link Control (SDLC)
is the data link protocol designated by
X X X X X X X X Secondary Station Address IBM’s System Network Architecture
(SNA), and is very closely related to
HDLC. SDLC is primarily an unbalanced
NRM protocol using Primary Stations
connected to Secondary Stations in various
configurations such as Point to Point,
MTP-2 Multipoint, Loop (ring), and Hub Go-
Bit transmission order
ahead.

Message Signal Unit MTP-2


F B Message Transfer Part 2 (MTP-2) is the
F CRC SIF SIO LI I FSN I FSN F
B B data link layer for Signaling System 7
8 16 8n, n>2 8 7 9 1 3 12 1 3 12 8 (SS7) the protocol stack that is the main-
stay of the public telephone network.
MTP-2 is a point-to-point data link pro-
Link Status Signal Unit tocol in the same genre as HDLC al-
F B
F CRC SF LI I
B
FSN I
B
FSN F though not a direct derivative. Similarities
include flags, a checksum, frame sequence
8 16 8 or 16 7 9 1 3 12 1 3 12 8
numbering, and status. MTP-2 is unique
in that it has three distinct frame types,
Fill-in Signal Unit Fill In Signal Unit (FISU), Link Status
F B
F CRC LI I FSN I FSN F Signal Unit (LSSU) , and Message Transfer
B B
Unit (MSU). ITU-T Q.703 (07-96) de-
8 16 7 9 1 3 12 1 3 12 8
scribes MTP-2 and the frame formats.

PPP
Blank Spaces are spare or reserved. Numbers show bits count for each field. Point to Point Protocol (PPP) is found
BIB Backward Indicator Bit LI Length Indicator most often in the internet world. PPP,
BSN Backward Sequence Number n Number of octets in SIF defined in RFC 1661, is often used to
CRC Cyclic Redundancy Code SF Status Field
F Flag SIF Signaling Information Field encapsulate TCP/IP or some other LAN
FIB Forward Indicator Bit SIO Service Information Octet Protocol Data Unit (PDU) for transmis-
FSN Forward Sequence Number
sion over Wide Area Networks for the
purposes of linking networks (LAN to
LAN), remote workstations to a corporate
LAN (Remote Access), and internet access
to an ISP. Open source OSs such as Linux,

SBE, Inc. © 2001


5
HDLC Derived Protocols

FreeBSD, and NetBSD, all offer PPP as a


PPP
WAN protocol, as does Solaris. PPP differs
slightly from the basic HDLC frame. The
flags and CRC are the same, but the ad- Flag Address Control Protocol Info CRC Flag
dress bits are all set to 1 (hex FF), the
control field is fixed at hex 03 (HDLC UI
frame), and a protocol field is added to
11111111
identify the data contained in the infor-
mation field (a specific LAN PDU, link
00000011
control PDU, or network control PDU).
LAN PDU
Summary identifier, 16 bits
HDLC is the basis for a wide variety of
data link layer protocols. Regardless of the Encapsulated
PDU
data link protocol, most HDLC framing,
bit stuffing, and CRC generation is per-
formed by the serial controller chips with Address Field All ones (hex FF) “All stations” address.
Control Field 00000011 (Hex 03) HDLC Unnumbered Information (UI)
the specific protocol stack software sup- frame
plying the rest of the necessary fields (see Protocol Field LAN PDU identifiers are listed in latest RFC for
“assigned numbers”.
Layer 2 diagram on page two). This means Protocol field values:
that most WAN cards can be adapted to “0***” to “3***” range identify the network-layer protocol
of specific packets.
any HDLC derived protocol. All that is “4***” to “7***” range are used for protocols with low
needed is a little study of the desired volume traffic which have no associated NCP
“8***” to “b***” range identify packets belonging to the
protocol to see if it fits within the HDLC associated Network Control Protocols (NCPs), if any.
ISO 3309 framing rules, and a look at the “c***” to “f***” range identify packets as Link-layer Control
Protocols (such as LCP).
serial controller chip attributes for HDLC Information field Here resides an encapsulated LAN, LCP or NCP PDU
support. ■ as identified by the Protocol field

HDLC Protocols with a WAN Adapter

Linux Server with


Upper Layer Protocols

TCP encapsulated
into IP datagrams

IP encapsulated into
data link protocol
SBE
wanADAPT-1T1E1 PCI Bus
adapter

HDLC framing, bit stuffing


CRC generation

T1 Line

T1 Cloud
925/355-2000
www.sbei.com
For additional information, please contact SBE Inc. All brands, products and logos are trademarks
of their respective holders. 11/01 M/MH-302
6 SBE, Inc. © 2001

You might also like