Having played with AX.25 20 years ago  (Amateur Radio kludged version...) what are the differences?

And HDLC - Hmmm memories of T.30 fax, and Class 1 Modems!

Computer Networks / Andrew S. Tanenbaum gives a summary of X.25.



http://webdocs.numaq.ibm.com/docs/x25oaa01/ch_2.htm covers X.25 User Facilities

An Informal Overview of X.25...

Read Tananbaum


Disadvantages of X.25


Host is called DTE (Data Terminal Equipment) (VDU or PC).

Carrier's equipment which interacts with the DTE is called DCE (Data Circuit-terminating Equipment). X.25 defines the DTE/DCE interface.

There are 3 distinct phases:

Call Setup,
Data Transfer,
Call Clearing.

Call Setup has the following events.

Call Request,
Call Indicate,
Call Accept,
Call Confirm.

Data Transfer has the following events.

Data request,
Data indicate. (Connection oriented, guarantees delivery)

Call Clearing has the following events:

Clear Request,
Clear Indicate,
Clear Response,
Clear Confirm. (Note the 4-way clearing as well)


There used to be an explicit gizmo called the PAD (Packet Assembly and Disassembly) which waited for 128 bytes from the terminal before it sent off a packet, and likewise, broke the packet up at the receiver side to give the illusion of a stream.

Nowadays, the PAD's functionality is performed at the DTE.

Note, that the actual DTE/DCE interface is usually a modem.

An X.25 Phone Call

  1. Initiator punches in a number.
  2. The number is packetized and given to the DCE as a packet.
  3. The DCE establishes a LCN (Logical Channel Number) between itself and the DTE (LCN is a local channel number).
  4. The DCE establishes a "Virtual Circuit" through the carrier's network. Note, that the LCNs for each leg of the Virtual Circuit will be different.
  5. The Virtual Circuit is established at call time, and is call-specific (different calls may have different routes). It is therefore called a Switched Virtual Circuit (SVC) as opposed to a Permanent Virtual Circuit (PVC).
  6. The receiver DTE will eventually be contacted with the sender's phone number, its phone number and a LCN.
  7. Switching in the intermediate DCEs is Store-and-Forward, with acknowledgements between DCE-DCE links (to guarantee reliable delivery).
  8. It's called Virtual Circuit because the circuit is not physically made. Packets are stored and forwarded based on tables of LCN mappings.
  9. You can guess how slow this thing may end up being...
  10. Call clearing basically goes and destroys the table entries for the Virtual Circuit (except for PVC), and is a full 2-way exchange.


X.25 Cause and Diagnostic Codes


A cause code indicates an event that triggered an X.25 packet. The cause code can only appear in entries for CLEAR REQUEST, REGISTRATION CONFIRMATION, RESET REQUEST, and RESTART packets. Possible values for the cause code can vary, depending on the type of packet.


00 xx, DTE Clearing
01 xx, Number busy
03 xx, Invalid call (invalid facility request)
05 xx, Network congestion
09 xx, Out of order
0B xx, Access barred
0D xx, Not obtainable
11 xx, Remote procedure error
13 xx, Local procedure error
15 xx, RPOA out of order (Recognized Private Operating Authority)
19 xx, Reverse charging not subscribed to
21 xx, DTE incompatible call
29 xx, Fast select not subscribed to
39 xx, Ship absent


00 xx, DTE originated
01 xx, Out of order
03 xx, Remote procedure error
05 xx, Local procedure error
07 xx, Network congestion
09 xx, Remote DTE operational
0F xx, Network operational
11 xx, Incompatible destination
1D xx, Network out of order


00 xx, DTE restarting
01 xx, Local procedure error
03 xx, Network congestion
07 xx, Network operational
7F xx, Registration/cancellation confirmed


The X.25 diagnostic code provides an additional hint as to what went wrong. This code can only appear in entries for CLEAR REQUEST, DIAGNOSTIC, RESET REQUEST, and RESTART packets. Unlike the cause codes, the diag codes do not vary depending upon the type of packet.

Note These codes can be produced by any equipment handling a given virtual circuit. Thus, receipt of a diagnostic code may not indicate a problem with your DCE. 

xx 00,No additional information
xx 01,Invalid P(S) (Packet Send sequence number)
xx 02,Invalid P(R) (Packet Receive sequence number)
xx 10,Packet type invalid
xx 11,Packet type invalid for state R1 (Packet level ready)
xx 12,Packet type invalid for state R2 (DTE restart request)
xx 13,Packet type invalid for state R3 (DCE restart indication)
xx 14,Packet type invalid for state P1 (Ready)
xx 15,Packet type invalid for state P2 (DTE Waiting)
xx 16,Packet type invalid for state P3 (DCE Waiting)
xx 17,Packet type invalid for state P4 (Data Transfer)
xx 18,Packet type invalid for state P5 (Call Collision)
xx 19,Packet type invalid for state P6 (DTE clear request)
xx 1A,Packet type invalid for state P7 (DCE clear indication)
xx 1B,Packet type invalid for state D1 (Flow control ready)
xx 1C,Packet type invalid for state D2 (DTE reset ready)
xx 1D,Packet type invalid for state D3 (DCE reset indication)
xx 20,Packet not allowed
xx 21,Unidentifiable Packet
xx 22,Call on one way logical channel
xx 23,Invalid packet type on a permanent virtual circuit
xx 24,Packet on unassigned LCN (Logical Channel Number)
xx 25,Reject not subscribed to 
xx 26,Packet too short
xx 27,Packet too long
xx 28,Invalid GFI (General Format Indicator)
xx 29,Restart with non-zero in bits 1-4 of octet 1, or bits 1-8 of octet 2 (Non zero LCI)
xx 2A,Packet type not compatible with facility
xx 2B,Unauthorised interrupt confirmation
xx 2C,Unauthorised interrupt
xx 2D,Unauthorised reject
xx 30,Timer Expired
xx 31,Timer expired for incoming call
xx 32,Timer expired for clear indication
xx 33,Timer expired for reset indication
xx 34,Timer expired for restart indication
xx 40,Call set up, clearing or registration problem
xx 41,Facility code not allowed
xx 42,Facility parameter not allowed
xx 43,Invalid called address
xx 44,Invalid calling address
xx 45,Invalid facility length
xx 46,Incoming call barred
xx 47,No logical channel available
xx 48,Call collision
xx 49,Duplicate facility requested
xx 4A,Non zero address length
xx 4B,Non zero facility length
xx 4C,Facility not provided when expected
xx 4D,Invalid ITU-T specified DTE facility
xx 4E,Maximum number of call redirections or deflections exceeded
xx 50,Miscellaneous
xx 51,Improper cause code for DTE
xx 52,Octet not aligned
xx 53,Inconsistent Q bit setting
xx 54,NUI (Network User Identification) problem
xx 70,International problem
xx 71,Remote network problem
xx 72,International protocol problem
xx 73,International link out of order
xx 74,International link busy
xx 75,Transit network facility problem
xx 76,Remote network facility problem
xx 77,International routing problem
xx 78,Temporary routing problem
xx 79,Unknown called DNIC (Data Network Identification Code)
xx 7A,Maintenance action (clear x25 vc command issued)


D1 Flow control ready. (The normal ready state.)
D2 Data terminal equipment (DTE) reset request. 
D3 Data circuit-terminating equipment (DCE) reset indication. 
P1 Idle 
P2 DTE waiting for DCE to connect call. 
P3 DCE waiting for DTE to accept call. 
P4 Data transfer. 
P5 Call collision. 
P6 DTE clear request. 
P7 DCE clear indication. 
R1 Packet level ready. 
R2 DTE restart request. 
R3 DCE restart indication. 
X1 Non-standard state for a virtual circuit in hold-down. 


IBM have a PTX X.25 library. Here's the documentation for it: