X.25 Packet Layer Protocol (PLP)
PUBLIC 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.
These recommendations provide a common network-to-subscriber (or network-to-user) interface which is standard enough to allow data transport between two end-users anywhere in the world. This network- to-user interface is described primarily in the 25th recommendation in the X-series books, so that networks based on this architecture are generally referred to as X.25 NETWORKS.
The protocol referred to as X.25 encompasses the first three layers of the OSI 7-LAYERED ARCHITECTURE as defined by the INTERNATIONAL STANDARDS ORGANIZATION (ISO).
The OSI 7-layered architecture is a “template” which describes in general terms the functional design of data communications protocols. The purpose of this template is to simplify all protocol interfaces when changes are required because of new technologies or because of requirements to internetwork between vendors or national administrations.
X.25 as defined by the CCITT is considered to be a close implementation of the first three layers of the OSI 7-layered architecture:
Layer 1:
PHYSICAL LAYER includes several well-known standards:V.35
RS-232
X.21bis
Layer 2:
Commonly referred to as HIGH-LEVEL DATA LINK CONTROL (HDLC), it is actually an implementation of the ISO HDLC standard called LINK ACCESS PROCEDURE BALANCED (LAPB). HDLC/LAPB is explained in a separate tutorial.
Layer 3:
This is simply referred to as the PACKET LAYER PROTOCOL (PLP) which is covered in this tutorial.
X.25 Packet Layer Protocol
X.25 PLP is an implementation of the NETWORK layer, Layer 3, of the OSI architecture. As such, X.25 PLP is primarily concerned with network routing functions pertaining to end-user entities of public and private PACKET networks.
X.25 PLP provides a standard Layer 3 networking interface between the SUBSCRIBER or LOGICAL DTE and the network entry point called either the DATA SWITCHING EXCHANGE (DSE) or LOGICAL DCE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
.=======================. || 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.
The passage of information between two DTE devices attached to the PACKET network is dependent on X.25 PLP. The PLP layer communicates between DTE devices in units called PACKETS, whereas the DATA LINK layer communicates across a link in units called FRAMES. User devices and host computers may or may not be capable of handling X.25 protocol procedures. They are attached to a device which performs protocol conversion, multiplexing, and X.25 protocol handling. The device playing the role of DTE is called a PACKET ASSEMBLER/DISASSEMBLER (PAD).
1 2 3 4 5 6 7 8 9 |
.------. | 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.
The paths set up between network DCE units may be shared by many DTE-to-DTE connections, one reason for the term “VIRTUAL CIRCUIT.” The protocols used inside PACKET networks are not specified by X.25, since X.25 is a network-access protocol only.
The unit of communication on the VC is the PACKET. The identification of the VC at each local interface is the LOGICAL CHANNEL IDENTIFIER (LCI) or LOGICAL CHANNEL NUMBER (LCN).
X.25 PLP provides the means for two end users to intelligently share limited network communication capacity. The protocol allows end users of the network to:
Communicate with remote DTE devices and remote end users “attached” to DTE devices
Temporarily or permanently own a piece of network capacity of determined quality and type
Recover from severe or mild errors at the network level
Flow control information on a VC
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.
A set of sequence numbers provides the acknowledgment, flow- control, error-recovery, and “window” functions. The window function allows the network-layer transmitter to send more than one message before a response is required.
The normal method of sequencing uses a 3-bit counter which rotates the count from 0 to 7 then restarts at 0. The normal method is referred to as Modulo 8 (MOD 8) sequencing. The maximum window size (number of unacknowledged DATA packets) permitted using the normal mode is 7. Most networks have a default window size of 2 at the PACKET layer.
The extended mode uses a 7-bit counter which rotates the count from 0 to 127 and is referred to as Modulo 128 (MOD 128). The maximum window size using the extended mode is 127.
X.25 PLP is nearly balanced in the sense that:
Many types of packets can be sent by either the DTE or DCE.
DTE and DCE procedures are often identical.
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.
X.25 PLP provides the following features:
DTE multiplexing (VIRTUAL CIRCUITS)
Virtual Circuit initialization and reinitialization
Virtual Circuit termination
Data transfer
Network-level error detection, recovery, and information
Flow control
Local control of DTE PAD setup parameters (X.3 and X.28)
Remote control of DTE PAD setup parameters (X.29)
Data integrity
Virtual Circuit type and quality
DTE and DCE interface initialization
Delivery confirmation (*)
Cost information (*)
(*) examples of optional features
Virtual Circuits
There are two types of Virtual Circuits: PERMANENT (PVC) and SWITCHED (SVC). A PVC is established by user subscription and is always available to the DTE as a permanent resource.
The SVC needs to be established each time the DTE needs the network communication resource. Some of the qualities of the SVC are determined each time the DTE establishes the SVC (makes a logical X.25 CALL REQUEST). Other qualities of the SVC are determined by user subscription to network offerings.
When a DTE makes a CALL REQUEST, a LOGICAL CHANNEL NUMBER is independently assigned at each end of the DTE-to-DTE VC. There are some similarities between establishing an SVC and making a voice call; hence, the term “CALL REQUEST.”
1 2 3 4 5 6 7 8 9 |
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.
1 2 3 4 5 6 7 8 9 |
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
X.25 packet types are divided into categories according to function: CALL SETUP and CLEARING; DATA and INTERRUPT; FLOW CONTROL; and RESET, RESTART, DIAGNOSTIC, and REGISTRATION packets. Packet types and functions are indicated by specific bit patterns at the beginning of each packet in the PACKET HEADER.
1 2 3 4 5 6 7 8 9 |
|<---- PACKET ----->| .=========================================. || | | | || || FRAME | PACKET | OPTIONAL | FRAME || || HEADER | HEADER | DATA | TRAILER || || (INFO) | | | || `=========================================' ^ `-- PLP PROTOCOL INFO |
X.25 Packet Header Format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
4 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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
.=============================. 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)
1 2 3 4 5 6 7 8 |
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
.=================================. || || || 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 Types
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
PACKET 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.
In all of the diagrams to be discussed, each row represents fields in the packet format. Fields are transmitted from top to bottom and left to right on the data link. Numbers to the left represent the maximum number of OCTETS (8-bit units) in a field. N implies any length in octets (including zero), so long as the maximum PACKET SIZE is not exceeded. The right vertical label names the packet format in the diagram. All packets occur inside of X.25 Layer 2 INFORMATION FRAMES. (Refer to the HDLC/ LAPB Tutorial for more information on X.25 Layer 2.)
Packet Types: Calling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
.====================================================. 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.
The CALLED and CALLING ADDRESS represent the permanent global identification of the two DTE devices. The LOGICAL CHANNEL NUMBERS assigned at each interface identify the shared network communication resource (SVC) allocated for the duration of a call. An example of an address in the United States would be 31109090006300, where 3110 identifies a specific network in North America.
The FACILITIES field identifies facilities which must be requested in each call, i.e., Reverse Charging. Some facilities are subscribed to permanently and may not appear in a CALL REQUEST packet, such as nondefault PACKET SIZES.
The CALL USER DATA field is generally not checked by the network, although the first 4 octets may be a “protocol ID” of interest to a receiving PAD.
Packet Type: Clearing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
.====================================================. 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
1 2 3 4 5 6 7 8 9 |
.====================================================. 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.
In NORMAL MODE, 3 bits are used to provide sequence numbers which count from 0 to 7 and roll back to 0. This mode is also known as Modulo 8 (XX=01 in the GFI). In EXTENDED MODE, 7 bits are used to provide sequence numbers which count from 0 to 127 and roll back to 0. This mode is also referred to as Modulo 128 (XX=10 in the GFI).
Packet Types: Receiver Ready
1 2 3 4 5 6 7 |
.====================================================. 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.
PACKET WINDOW refers to the number of packets which can be sent without awaiting acknowledgment (by way of a Pr, typically in an RR packet). In most PUBLIC PACKET NETWORKS, the default size of the Packet Window is two, so that a typical packet exchange permits two DATA packets to flow before a Pr acknowledgment must be received.
RR acknowledgment packets are carried inside of LINK-LAYER INFORMATION FRAMES and should not be confused with link-layer RR frames.
Typical SVC Call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
DTE 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 Problem
1 2 3 4 5 6 7 8 |
DTE A DCE A NETWORK DCE B DTE B ===== ===== ======= ===== ===== CALL REQUEST --> || || -------> || || -->||--->* || ---||<---* || <-- CLEAR IND --- || || <---- (CAUSE = LOCAL PROCEDURE ERROR) || |