Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1656945
  • 博文数量: 230
  • 博客积分: 10045
  • 博客等级: 上将
  • 技术积分: 3357
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-30 20:40
文章分类

全部博文(230)

文章存档

2011年(7)

2010年(35)

2009年(62)

2008年(126)

我的朋友

分类: 系统运维

2008-10-03 22:48:10

LAPB本质上是HDLC中的ABM方式。

Asynchronous Balanced Mode (ABM) is a mode of and derivative , supporting between two nodes, where either node can initiate transmission.

For systems that work in the ABM (Asynchronous Balanced Mode), there is no master/slave relationship. Each station may initialize, supervise, recover from errors, and send frames at any time. The DTE (Data Terminal Equipment) and DCE (Data Circuit Terminating Equipment) are treated as equals. The initiator for Asynchronous Balanced Mode sends an SABM.


Link Access Procedure Balanced


Link Access Procedure, Balanced (LAPB) is a serial protocol used to manage packet framing between DTE and DCE stations. LAPB supports several protocols including X.25, Frame Relay and ATM. LAPB is capable of placing frames in the correct order, as well as checking packets for errors (error detection) and thus releives higher level protocols from having to perform these functions.

FRAME FORMAT

LAPB frames contian a header, encapsulated data, and a trailer. The diagram below shows the format of the of the LAPB frame and its relationship to the Protocol Layer Packet (PLP) and the X.21bis frame. The following descriptions summarize these fields:

 

FRAME FIELDS (Frame structure)
Flag
8-bits
The binary pattern 01111110 is used to mark the beginning of the LAPB frame. This pattern has to be be unique so the transmitter in a LAPB connection uses a bit stuffing technique to make sure that the flag pattern appears only in the flag fields.
Address
8-bits

This field can have two values:

Binary
Value
Transmission
Command Response
0000001 DTE->DCE DCE->DTE
0000011 DTE<-DCE DCE<-DTE

Neither of the two values is actually an address. Because communication is in balanced mode, the communication link is full duplex and either DTE or DCE may initiate or terminate communication. The point of including an address is to indicate whether DTE or DCE is in control of the communication.

You will recall that X.25 is a point-to-point communications technology. Its addresses are handled by the X.121 protocol so having an address here is, well, pointless.

Control
The control field is used to indicate command and response frames and indicates whether the frame is an I-frame, an S-frame, or a U-frame. In addition, this field contains the frame's sequence number and its function (for example, whether receiver-ready or disconnect). Control frames vary in length depending on the frame type.
Data
Contains upper-layer data in the form of an encapsulated PLP packet.
FCS
Handles error checking and ensures the integrity of the transmitted data.
Flag
8-bits
The binary pattern 01111110 is also used to mark the end of the frame. This pattern must be unique, so LAPB uses bit stuffing to make sure that the same pattern doesn't appear anywhere else except in the flags.

 

LAPB FRAME TYPES

LAPB uses three types of message frames, I-frames, S-frames and U-frames. Each frame type has a different purpose.

LAPB FRAME TYPES
Information
(I-Frame)
Informations carry upper layer information and some control information. Information frames pass sequencing, flow control, error detection, and recovery information to the receiver to assist in reconstructing the upper layer data stream.
Supervisory
(S-Frame)

Carries control information. Used to request and suspend transmission, report status, and Acknowledge receipt of I-Frames. The following messages are sent using s-frames.

RECEIVE READY
Acknowledges the current frames received and indicates which frame is expected next.
REJECT
Signals rejection of frame by the receiver.
RECEIVE NOT READY
Used for flow control. Indicates the receiver is not ready to receive additional data and the transmitter should wait until a RECEIVED READY message is sent.
Unnumbered
(U-Frame)
Used for link setup, link disconnection and error reporting. No sequence numbers used.
阅读(1189) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~