Google Custom Search     

Link Layer

LayGO® currently supports LAPB, LAPD and Frame Relay link layer protocols.

LAPB

In the ISO layered protocol model, the LAPB link layer provides a full duplex error-free point-to-point connection through a physical line. LAPB detects lost or corrupted frames and requests retransmission.

Advanced Relay's implementation conforms to the Frame Level CCITT X.25 Recommendation, 1988 ("Blue Book") and the European CEPT Net Certification Standard. Configurable LAPB parameters: T1, T2, T3, N1, N2, DTE, DCE, Loop-Back, modulo 8/128, window size. LAPB normally uses HDLC framing. LAPB can also be used on ISDN B-channel and if supported, on ISDN D-channel and may also be used in IEEE 802.2 LLC.

LAPB Function Mapping
ConnectRequest

Sends a SABM/P=1 (Set Asynchronous Balanced Mode). If a UA/F=1 is received the Link enters the Data Transfer State. If a DM/F=1 is received the Link returns to the Open-state. If a SABM (SABM collision) is received, a UA response is issued and the Link enters the Data Transfer State. If modulo 128 sequence numbering is used, SABME (Set Asynchronous Balanced Mode Extended) is used instead of SABM in this and all other instances.

To ensure that the Link is in a Disconnect State, LAPB can also be configured to start with a DISC/P=1 (Disconnect frame with Poll-Bit) every T1 seconds up to Max Retransmissions times. When and if a DM/F=1 (Disconnected Mode with Final-Bit) or UA/F=1 (Unnumbered Response) is received, a SABM/P=1 is then sent.

ConnectAccept Not used. Since there is no negotiation, the link layer protocol rather than the API issues appropriate response to establish connection. If a SABM/P=1 is received, the Link Layer will respond with a UA/F=1 (see above), and inform the API that the Link Layer is connected.
ConnectReject Not used. Since there is no negotiation, the link layer protocol rather than the API issues appropriate response to reject a connection. A DM/F=1 will be sent as response if the Link can not enter the Data Transfer State.
Listen Sends a DM/F=1 (Unsolicited Response) every T1 seconds until a command is received from the remote, or lgo_ListenCancel() is used to return the service to the Open State. This unsolicited DM is a signal for the remote end to initiate Link Setup when it is ready. While in Listen State, if the remote sends unsolicited DMs of its own, sets up the link by sending a SABM/P=1.
DisconnectRequest Sends a DISC frame every T1 seconds up to Max Retransmissions times. When and if a DM or UA response is received or if there is no response, the link will be shut down and returned to the Open State.
DisconnectConfirm Not used.
Write Sends an I-frame (Information-Frame) containing the data buffer passed.
WriteSpecial Not used. Could be used for XID or V.25 bis synchronous dialing.
Xoff Sends an RNR (Receiver Not Ready) frame. This asks the remote to stop sending I-frames until an RR (Receiver Ready) or REJ (Reject) frame is sent. The remote can still receive any frame (including I-frames), and can still send frames other than I-frames. RNR frames can be sent automatically if the system buffer pool starts to run out of buffers.
Xon Sends an RR to indicate cancellation of the previous RNR.
ResetRequest Sends a SABM/P=0 to reset the link. Unacknowledged I-frames can be lost in any reset whether user initiated or automatically initiated due to Link problems.
Reopen Immediately returns the link to the open state. Link sends a DISC frame, but does not wait for any response. This should be used only as the last resort.

Go to top

LAPD

Like X.25, LAPD allows for multiple virtual connections to be made over a single physical line (or "Major Device"). In LAPD, each virtual circuit is associated with a unique Terminal Endpoint Identifier (TEI).

LAPD Major Device Function Mapping
Connect Request Responds with EVENT_CONNECTED.
ConnectAccept Not used.
ConnectReject Not used.
Listen Waits for first frame.
DisconnectRequest Responds with EVENT_DISCONNECTED.
DisconnectConfirm Not used.
Write Not used.
WriteSpecial Not used.
Xoff Not used.
Xon Not used.
ResetRequest Responds with EVENT_RESET_COMPLETE.
Reopen Purges buffer queues and blocks all TEIs.

Go to top

LAPD TEI Function Mapping
Connect Request Sends SABME and waits for UA.
ConnectAccept Not used.
ConnectReject Not used.
Listen Not used.
DisconnectRequest Sends DISC and waits for UA.
DisconnectConfirm Not used.
Write Sends an I-frame.
WriteSpecial Not used.
Xoff Sends an RNR.
Xon Sends an RR.
ResetRequest Sends SABME and waits for UA.
Reopen Sends DISC.

Go to top

Frame Relay

As in X.25, Frame Relay allows for multiple virtual connections to be made on a single physical line. Virtual connections are either Permanent Virtual Circuits (PVCs) or Switched Virtual Circuits (SVCs).

A PVC is set up at subscription time and is agreed upon by both sides. You know beforehand who is on the other end of a PVC. SVCs, on the other hand, are set up as needed like a telephone call.

Advanced Relay's Frame Relay does not currently support SVCs.

Frame Relay is a link layer protocol which is not error free. Three styles of management signaling are supported:

No Management Signaling - PVC
Connect Request Responds with EVENT_CONNECTED.
ConnectAccept Not used.
ConnectReject Not used.
Listen Waits for first frame, then responds with EVENT_CONNECTED.
DisconnectRequest Responds with EVENT_DISCONNECTED.
DisconnectConfirm Not used.
Write Sends a frame.
WriteSpecial No special flags recognized.
Xoff Sets the BECN bit on all frames sent.
Xon Clears the BECN bit on all frames sent.
ResetRequest Responds with EVENT_RESET_COMPLETE.
Reopen Purges buffer queues.

Go to top

LMI - PVC
Connect Request Responds with EVENT_CONNECTED if the PVC has been reported to be ACTIVE by the major device, otherwise responds with EVENT_DISCONNECTED.
ConnectAccept Not used.
ConnectReject Not used.
Listen Waits for first frame, then responds with EVENT_CONNECTED.
DisconnectRequest Responds with EVENT_DISCONNECTED.
DisconnectConfirm Not used.
Write Sends a frame.
WriteSpecial No special flags recognized.
Xoff Sets the BECN bit on all frames sent.
Xon Clears the BECN bit on all frames sent.
ResetRequest Resets the congestion control parameters to their configured values and responds with EVENT_RESET_COMPLETE.
Reopen Purges buffer queues.

Go to top

Annex D - PVC
Connect Request Responds with EVENT_CONNECTED if the PVC has been reported to be ACTIVE by the major device, otherwise responds with EVENT_DISCONNECTED.
ConnectAccept Not used.
ConnectReject Not used.
Listen Waits for first frame, then responds with EVENT_CONNECTED.
DisconnectRequest Responds with EVENT_DISCONNECTED.
DisconnectConfirm Not used.
Write Sends a frame.
WriteSpecial No special flags recognized.
Xoff Sets the BECN bit on all subsequent frames.
Xon Clears the BECN bit on subsequent frames.
ResetRequest Resets the congestion control parameters to their configured values and responds with EVENT_RESET_COMPLETE.
Reopen Purges buffer queues.

Go to top