`

HDLC Framing

阅读更多

Quote: http://www.erg.abdn.ac.uk/users/gorry/eg3567/dl-pages/hdlc-framing.html


HDLC Framing

The High Level Link Control (HDLC) protocol defined by the International Standards Organisation (ISO) provides a transparent transmission service at the data link layer of the OSI reference model . Many protocol suites use an HDLC (or HDLC-based) link layer, including X.25, the IP point-to-point protocol (PPP) and SNA.


The users of the HDLC service provides PDUs which are encapsulated to form data link layer frames. These frames are separated by HDLC "flags" and are modified by "zero bit insertion" to guarantee transparency. These terms are defined below:

Flags

HDLC is a data link protocol which uses a unique bit sequence to delimit the start and end of each PDU transported by the data link layer service. In HDLC, frames are delimited by a sequence of bits known as a "flag". The flag sequence is a unique 8-bit sequence of the form 0111 1110. The way in which this is performed is described in the text and diagrams which follow.


The flags before and after an HDLC frame indicate the start and end of the frame

Transparency

The flag sequence must never occur within the content of a frame otherwise it could be confused with an intentionally sent flag. A technique known as 0-bit insertion is used to prevent random data synthesising a flag. The technique is said to make HDLC transparent, since any stream of bits may be present between the open and closing flag of a frame. The transparency is achieved by encoding the data by inserting a 0-bit after any sequence of 5 consecutive 1's within the payload, as shown:


Insertion of a "zero-bit" into the content of a frame to ensure transparency

Hunt Mode

Normally a HDLC receiver starts in the idle state, waiting for the start of a frame. This is called "Hunt" mode, since the receiver is said to be hunting for a non-flag sequence. This may be achieved through a shift register and combinational logic as shown (a Finite State Machine (FSM) is usually used to implement this):


Detection of a start of frame

Abort & Idle Patterns

Valid frames are terminated by a closing flag. If the link layer protocol needs to transmit a higher priority frame before the current frame has been fully sent, it may "Abort" the frame. An "aborted" frame is terminated by an "abort sequence": 0111 1111 instead of the normal "flag sequence". Abort sequences may also be caused by bit errors which occur while the frame is travelling from the transmitter to the receiver. (For instance a flag may suffer a 1-bit inversion of the least significant bit, resulting in a bit sequence identical to an "abort").


A frame which is terminated by an abort is received by the receiver in the normal way, but marked as being "aborted". The frame is then discarded without further processing.


This is shown below:

An HDLC frame terminated by an "abort" is discarded by the HDLC receiver


An abort sequence is often followed by a series of 1's. The sequence of all 1's may be used to fill the gaps between frames (or alternatively a continuous series of flags may be transmitted). The all 1's sequence is known as the "idle" sequence, since the line becomes idle (N.B. represented at the physical layer by 0 Volts). This is useful for applications requiring half duplex operation (also known as Two Way Alternate (TWA) operation).


分享到:
评论

相关推荐

    serial-framing-protocol-rs:类似于HDLC的适用于串行传输的成帧协议,以rust实现

    本文将深入探讨一个名为"serial-framing-protocol-rs"的开源项目,这是一个用Rust编程语言实现的类似于HDLC(高级数据链路控制)的串行帧协议。 首先,我们需要理解什么是串行帧协议。帧协议是数据通信中的一个重要...

    PPP DESIGN,IMPLEMENTATION,and DEBUGGING》 ppp 设计和实现

    PPP Framing 16 Standard Encapsulations 29 Statistics and Management 35 Auto-Detecting 36 AHDLC Start-Up Issues 42 Switched Circuit Integration 44 Null-Modem Connection to Windows NT 44 General ...

    t38协议栈实现,完全代码

    x_InStrm.e_framing_mode = MT_FR_FRAMING_HDLC; /* set frame exit */ x_InStrm.uxByteStream.pfnGetHdlcByte = MT_T38_GetOutHdlcByte; /* HDLC flags */ px_T38id->ui_FlagsFillsThreshold = sttblun_T38_...

    rfc1662协议(中英文)

    《RFC1662:HDLC-like Framing for PPP》是一份标准性文档,它规定了如何在点对点链路上使用类似于高密度唇同步(High-Level Data Link Control, HDLC)的帧格式来封装点对点协议(Point-to-Point Protocol, PPP)的...

    GFP技术分析与应用.pdf

    GFP,全称为Generic Framing Procedure,是一种数据封装协议,主要用于在SDH(同步数字体系)/SONET(同步光网络)环境中承载各种类型的数据流。GFP协议提供了一种通用的数据传输机制,能够有效地将以太网、千兆位...

    基于SDH的IP数据传输协议的分析.pdf

    GFP(Generic Framing Procedure)协议是最近提出的基于SDH的链路层映射协议。GFP协议是将口数据报分组后,然后使用通用成帧规程对其进行封装,最后将其映射到基于字节的SDH虚容器中。GFP协议提供链路初始化控制、...

    路由器配置大全---华为2621.doc

    配置串口IP地址,如`interface Serial0`,然后`ip address 2.2.2.2 32`,根据需求选择封装方式,如`framing ppp`或`framing hdlc`。 5. 配置静态路由 静态路由是手动设定的路径,适用于简单网络环境。例如,`ip ...

    信息通信网络概论课件:Chapter5-DataLinkLayer-3.ppt

    本章“信息通信网络概论”第五部分主要探讨了点对点协议(Peer-to-Peer Protocols)和数据链路层(Data Link Layer)的功能,特别是帧的构建(Framing)和数据链路控制。 在数据链路层,帧(Frame)是数据传输的...

    高速专用GFP处理器的FPGA实现

    标题《高速专用GFP处理器的FPGA实现》和描述中提到的内容揭示了本篇论文主要研究的是如何利用现场可编程门阵列(Field Programmable Gate Array, FPGA)技术来实现通用帧协议(Generic Framing Procedure, GFP)...

    数据链路层

    这一层的主要任务包括成帧(framing)、物理寻址、错误检测和纠正、流量控制以及链路管理等。 在数据链路层,协议扮演着至关重要的角色。常见的协议有以下几种: 1. **以太网协议(Ethernet)**:以太网是最广泛...

    EOS的封装协议.pdf

    5. GFP (Generic Framing Procedure):通用帧协议,用于在SDH或OTN(Optical Transport Network)上传输各种不同类型的数字业务信号。GFP提供了将不同协议的数据封装为SDH或OTN帧的机制。 6. PPPoE (PPP over ...

    网络故障处理手册大全丨第2弹.doc

    在处理串行线路故障时,HDLC封装是关键,它是Cisco路由器串行接口的默认封装方式。确保两端设备使用相同封装类型是基础,可以通过`show interface`和`clear counters`命令来检查接口状态和复位计数器。 当遇到接口...

    计网第三章复习-数据链路层.pdf

    1. 帧封装(Framing):将网络层的数据封装成帧,以便在链路上传输。 2. 错误检测和纠正(Error Detection and Correction):使用错误检测码和纠正机制来检测和纠正传输过程中的错误。 3. 流量控制(Flow Control)...

    CISCO 技术大集合

    HDLC是CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用HDLC封装。 1. 有关命令 端口设置 任务 命令 设置HDLC封装 encapsulation hdlc 设置DCE端线路速度 clockrate speed 复位一个硬件接口 ...

    高速专用GFP处理器的FPGA实现.pdf

    《高速专用GFP处理器的FPGA实现》这篇文章探讨了如何使用FPGA(Field-Programmable Gate Array,现场可编程门阵列)技术实现一种高速的专用GFP(Generic Framing Procedure,通用帧规程)处理器,该处理器主要用于非...

Global site tag (gtag.js) - Google Analytics