X.25 Packet Layer Protocol (PLP) OverviewPUBLIC PACKET-SWITCHED
NETWORKS (PPDNs) as well as private and hybrid packet networks have been
operational around the world for approximately 20 years. The architecture
for these networks is defined and redefined every 4 years by the CCITT
(now ITU) in a series of recommendations referred to as the X-standards.
X.25
Packet Layer Protocol
.=======================. || USER/HIGHER LAYER || LAYERS 4-7 || PROTOCOL DATA || `=======================' .===============================. || PKT ||.................... || LAYER 3 || HDR ||.................... || `===============================' |<- - - - - - PACKET - - - - ->| .==============================================. || FRM ||.............................|| FRM || LAYER 2 || HDR ||.............................|| END || `==============================================' |<- - - - - - - - - - FRAME - - - - - - - - ->| .==============================================. ||................... BIT .................|| LAYER 1 ||................... STREAM .................|| `==============================================' HDR=PROTOCOL HEADER PKT=PACKET LEVEL FRM=FRAME LEVEL In OSI terms, user
and protocol information is encapsulated inside PACKETS to be passed down
to Layer 2. Layer 2 encapsulates the packet contents inside an INFORMATION
FRAME and passes the result down to Layer 1 for transmission on the link.
The resulting bit stream is transported between the DTE and DCE by way
of a standard physical interface, such as RS-232. .------. | HOST | .------. .-----. .-----. /\ /\ .-----. |---. | | END |-----| DTE |=====| DCE |_/ \ / \_| DCE |=====|PAD| | | USER | ^ | PAD | `-----' \/ `-----' |---' | `------' | `-----' : PATH : `------' | : : `-- "NATIVE" `---- PACKET NETWORK ----' PROTOCOL Whereas simpler user
devices are often "front-ended" by an external PAD, many host
computers have PAD software with X.25 handling capabilities installed
for communications. Both DTE endpoints use X.25 PLP, but the activities
at each end of the VIRTUAL CIRCUIT (VC) between DTE and DTE are independent.
This independence is referred to as LOCAL SIGNIFICANCE.
To prevent loss and
improve throughput of PLP DATA PACKETS (user-layer and higher-layer protocol
information), the ability to send more than one DATA packet before requiring
an acknowledgment is included.
However, the similarity
of DTE and DCE packet procedures is not a complete one. There is no concept
of COMMAND and RESPONSE at the packet layer as there is in HDLC at the
Data Link Layer (covered in the HDLC/LAPB tutorial). The naming conventions
related to movement of a packet from one DTE-DCE interface to the other
include REQUEST, CONFIRMATION, INDICATION, among others.
(*) examples of optional features Virtual
Circuits SVC ACTIVATION DTE A PACKET NETWORK DTE B | | CALL REQUEST ------->|\....................| | |\---> INCOMING CALL | | |..................../|<----- CALL ACCEPT CALL CONNECTED <--- /| | The CALL REQUEST actually travels end-to-end between two DTE devices establishing the DTE-to-DTE connection. There are four varieties of CALL packets, although all four have the same format. Together the four CALL packets establish the SVC. During the call establishment procedure, the contents of the CALL packets may not all be identical. The DTE selects the LCN for outgoing calls, while the DCE selects the LCN for incoming calls. SVC DEACTIVATION DTE A PACKET NETWORK DTE B | | CLEAR REQUEST ------>|\....................| | |\-> CLEAR INDICATION CLEAR CONFIRMATION <-|---O | | X......./|<-- CLEAR | | CONFIRMATION A call is deactivated by one of the connected DTE devices asking for the call resources to be torn down via a CLEAR REQUEST packet. The CLEAR REQUEST travels through the network to the other connected DTE, but the local DCE finishes the local deactivation by confirming the CLEAR REQUEST. CLEARING packets carry a CAUSE and sometimes a DIAGNOSTIC code explaining why the call is being cleared. X.25
Packet Types |<---- PACKET ----->| .=========================================. || | | | || || FRAME | PACKET | OPTIONAL | FRAME || || HEADER | HEADER | DATA | TRAILER || || (INFO) | | | || `=========================================' ^ `-- PLP PROTOCOL INFO X.25 Packet Header Format4 4 8 8 NUMBER OF BITS .===================. || G | L || L || P || || F | C || C || T || || I | G || N || I || || | N || || || `===================' ^ ^ ^ ^ | | | | GENERAL FORMAT IDENTIFIER---' | | `-- PACKET TYPE | | IDENTIFIER LOGICAL CHANNEL GROUP NUMBER----' | | LOGICAL CHANNEL NUMBER---------------' General Format Identifier (4 Bits).=============================. FRAME LAYER || || || || LOGICAL CONTROL BYTE <--|| Q || D || X X ||--> CHANNEL || || || || IDENTIFIER `=============================' Q: QUALIFIED DATA BIT - 0 = Data for user 1 = Data for PAD D: DELIVERY CONFIRMATION BIT - 0 = For local acknowledgment 1 = For remote acknowledgment XX: PROTOCOL IDENTIFICATION - 00 = Reserved for future use 01 = Modulo 8 sequencing 10 = Modulo 128 sequencing 11 = Extended format Logical Channel Identifier (12 Bits)4 8 NUMBER OF BITS .=================================. || L | L || GFI <------ || C | C ||---> PTI || G | N || || N | || `================================='` |<- - - - - - - LCI - - - - - - ->| The LOGICAL CHANNEL IDENTIFIER (LCI) is composed of the 4-bit LOGICAL CHANNEL GROUP NUMBER (LCGN) plus the 8-bit LOGICAL CHANNEL NUMBER (LCN). When a CALL REQUEST is made, the DTE selects the LCI from a range of permitted values. For incoming calls, the DCE selects the LCI. The LCGN portion is sometimes used to separate call types: PVC, two-way SVC, etc. Twelve bits allow 4096 LOGICAL CHANNELS (0-4095), but LCN 0 is reserved and not available for end-user selection. Packet Type Identifier (8 Bits).=================================. || || || LCN <------ || M M M M M M || MX X0 ||---> PACKET || || || CONTENT `=================================' |<- - - - - - - PTI - - - - - - ->| M = MODIFIER BIT MX = MODIFIER/OTHER BIT X0 = 0 OR 1 BIT (MX,X0) SETTING PACKET TYPES --------------- --------------------------------------- (1,1) All CALLING/CLEARING, INTERRUPT, RESET, RESTART, and REGISTRATION packets (0,1) RECEIVER READY, RECEIVER NOT READY, REJECT, DIAGNOSTIC packets (X,0) DATA packets Packet TypesPACKET TYPE DIRECTION DESCRIPTION ------------- --------- ---------------------------------- CALL REQUEST DTE-->DCE Requests the DTE-to-DTE connection INCOMING CALL DCE-->DTE and the type of facilities for the call CALL ACCEPTED DTE-->DCE Confirms the establishment of the CALL CONNECTED DCE-->DTE DTE-to-DTE connection with facilities permitted CLEAR REQUEST DTE-->DCE Requests the tear down of network capacity assigned to a specified call CLEAR DCE-->DTE Informs DTE of teardown request INDICATION DTE CLEAR DTE-->DCE Informs network that DTE has ended CONFIRMATION specified call DCE CLEAR DCE-->DTE Informs DTE that network has ended CONFIRMATION specified call RESET REQUEST DTE-->DCE Requests reinitialization of DATA RESET DCE-->DTE packets sequence numbers on a INDICATION specified PVC or SVC LCN and informs DTE that network has reset its numbers DTE/DCE RESET DTE-->DCE Informs DTE or DCE that sequence CONFIRMATION numbering has been reinitialized DTE RESTART DTE-->DCE Requests clearing of all calls on REQUEST interface DTE RESTART DCE-->DTE Informs DTE that network will be INDICATION clearing all calls on this interface DIAGNOSTIC DCE-->DTE Network provided diagnostic information typically following error recovery DTE INTERRUPT DTE-->DCE Unsequenced, expedited, one-time, DCE INTERRUPT DCE-->DTE end-to-end information from DTE or DCE DTE INTERRUPT DTE-->DCE End-to-end response from DTE to CONFIRMATION the INTERRUPT packet DCE INTERRUPT DCE-->DTE End-to-end response from DCE passing CONFIRMATION on a DTE INTERRUPT packet DTE DATA DTE-->DCE User data or higher-layer protocol from the source DTE DCE DATA DCE-->DTE User data or higher-layer protocol passed from the remote DTE by way of the local DCE DTE RR DTE-->DCE Acknowledgment of DATA packets and permission to send more from DTE DCE RR DCE-->DTE Acknowledgment of DATA packets and permission to send more from DCE DTE RNR DTE-->DCE DTE request for DCE to shut off flow of DATA packets DCE RNR DCE-->DTE DCE request for DTE to shut off flow of DATA packets DTE REJECT DTE-->DCE Request to the DCE to retransmit DATA packets beginning from a specified sequence number REGISTRATION DTE-->DCE Request to the network from the REQUEST user to subscribe to specified network capabilities REGISTRATION DCE-->DTE Information regarding network action CONFIRMATION taken on user REGISTRATION REQUEST Because of the frequency
of occurrence and the importance of four packet types - CALLING, CLEARING,
DATA, and RECEIVER READY - complete formats and descriptions for these
types are covered here. Packet Types: Calling.====================================================. O 1 || 0 D || X X || L C G N || C C |====================================================| A T 1 || L C N || L E |====================================================| L T 1 || 0 0 0 0 1 0 1 1 || S |====================================================| R 1 || CALLED ADDR LENGTH || CALLING ADDR LENGTH || E |====================================================| Q 8 || C A L L E D A D D R E S S || U |====================================================| E 8 || C A L L I N G A D D R E S S || S |====================================================| T 1 || F A C I L I T I E S L E N G T H || |====================================================| P N || F A C I L I T I E S || K |====================================================| T 16 || C A L L U S E R D A T A || `====================================================' The format of all
CALL packets is essentially the same. The four types of CALL packets,
used in sequence, set up the end-to- end connection between two DTE devices. Packet Type: Clearing.====================================================. O 1 || 0 0 || X X || L C G N || C C |====================================================| L T 1 || L C N || E E |====================================================| A T 1 || 0 0 0 1 0 0 1 1 || R S |====================================================| 1 || C L E A R I N G C A U S E || I |====================================================| N 1 || C L E A R I N G D I A G N O S T I C || D |====================================================| I 17 || ADDRESSING IN CALL REQUEST FORMAT IF USED || C |====================================================| A N || FACILITIES IN CALL REQUEST FORMAT IF USED || T |====================================================| I 16 || C L E A R U S E R D A T A || O `====================================================' N The format of all four CLEARING packets is essentially the same. Some fields in CLEAR packets are the same as those in CALL packets. CLEAR packets, however, contain a CAUSE field and possibly a DIAGNOSTIC field. The Cause and Diagnostic fields inform the affected DTE as to the reason that a call is being ended. The most common X.25 problem causing calls to end prematurely is inappropriate FACILITIES in the CALL REQUEST sequence. Packet Types: Data.====================================================. O 1 || Q D || X X || L C G N || D C |====================================================| A T 1 || L C N || T E |====================================================| A T 1 || Pr3 Pr2 Pr1 M Ps3 Ps2 Ps1 0 || S |====================================================| P 1 || USER INFORMATION OR HIGHER-LAYER PROTOCOL || K `====================================================' T X.25 packet-layer
DATA packets carry user data and higher-layer protocol on an established
SVCs (CALL CONNECTED) or PVCs. The DTE and DCE side of the packet-layer
interface exchange DATA packets with 3-bit SEND SEQUENCE NUMBERS (Ps)
and 3-bit RECEIVE SEQUENCE NUMBERS (Pr) used for acknowledgment. The MORE
DATA bit (M) serves the function of informing the network as to whether
the incoming PACKETS are in a related sequence. Packet Types: Receiver Ready.====================================================. R O 1 || 0 0 || X X || L C G N || C C |====================================================| V T 1 || L C N || E |====================================================| R T 1 || Pr3 Pr2 Pr1 M 0 0 0 1 || D S `====================================================' Y Every DATA packet
contains both the sequence number of the DATA packet being sent (Ps value)
and the sequence number of the DATA packet expected to be received next
(Pr value). RECEIVER READY packets (RR) contain only the Pr value. Typical SVC CallDTE A DCE A NETWORK DCE B DTE B ===== ===== ======= ===== ===== CALL REQ ---> || || ---> || || ----> ||----> || || ----->|| ---> INCOMING CALL || || ------------> || || <--- CALL ACCEPT || <----||<------ <---||<----- || <-- CALL CONNECTED -- || || DATA (Pr=0,Ps=0) --> || || ----> ||-----> || || ----->||-- DATA (Pr=0,Ps=0) DATA (Pr=0,Ps=1) --> || || ------------> ----> || || ||----> || <---|| ----->|| ---- DATA (Pr=0,Ps=1) <-- RR (Pr=2) ----- || || ------------> || || DATA (Pr=0,Ps=2) --- || || <-- (Pr=2) RR ----> ||----> *<--||<-------- || ----->|| ---- DATA (Pr=0,Ps=2) DATA (Pr=0,Ps=3) --> || || -------------> ----> ||----> || || ----->|| ---- DATA (Pr=0,Ps=3) <---|| || ------------> <-- RR (Pr=4) ----- || || || || <--- (Pr=4) RR DATA (Pr=0,Ps=4) --> || *<--||<-------- ----> ||-----> || || ---->||-> <- DATA (Pr=4,Ps=0) || || || <----||<--- DATA (Pr=0,Ps=4) <- DATA (Pr=5,Ps=0) --||<----- || -------------> <---- || || || || <-- RR (Pr=5) -- || *<---||<------ || || <- CLEAR REQ --- RR (Pr=1) ---> || <----||<----- (CAUSE = 0) -------> ||<----- ||--- CLEAR CONF -> <- CLEAR IND ---- ||--->* || -----> <----- (CAUSE = 0) || || CLEAR CONF --> || || ---------> ||--->* ||
Typical SVC ProblemDTE A DCE A NETWORK DCE B DTE B ===== ===== ======= ===== ===== CALL REQUEST --> || || -------> || || -->||--->* || ---||<---* || <-- CLEAR IND --- || || <---- (CAUSE = LOCAL PROCEDURE ERROR) ||
|