- 论坛徽章:
- 0
|
LAPB本质上是HDLC中的ABM方式。
Asynchronous Balanced Mode (ABM) is a
communication
mode of
HDLC
and derivative
protocols
, supporting
peer-oriented
point-to-point communications
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
reliable
synchronous
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
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 READYAcknowledges the current frames received and indicates which frame
is expected next.REJECTSignals rejection of frame by the receiver.RECEIVE NOT READYUsed 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.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/29291/showart_1272111.html |
|