X.25 is used in a Packet Switched Network and in 1964 was designed
by Paul Baran of the RAND Corporation for use with the Public Data Network
(PDN) and unreliable analogue telephone services. The idea was to connect a dumb terminal to a packet-switched network.
In 1976 X.25 became a standard under the CCITT, now the International Telecommunications Union -
Telecommunication Standardization Sector (ITU-T).
The Physical Layer commonly uses X.21/X.21bis provides the handshaking and electrical
requirements at the Physical Layer. EIA/TIA-232/449/530 and G.703 can also be used.
X.21bis is the equivalent of RS232C and RS449/442. Most routers support X.21, V.35, RS232C
The Frame Layer (Layer 2) is Link Access Protocol Balanced (LAPB) and provides link setup, control,
sequencing and error recovery. It also provides a windowing mechanism. LAPB is very robust and can be applied
direct to serial links and is often found being used on satellite links.
Private X.25 networks can use LAPB but when connecting to Public X.25 networks you must use
the X.25 encapsulation only.
There is extensive error checking and recovery with buffering so that end stations can ensure that the
network is error free. The X.25 Layer 3 is called the Packet Layer Protocol (PLP)
and allows up to 4095 virtual circuits over one physical interface.
Layer 3 (Network layer) protocols are tunnelled in X.25 layer 3 packets. Network layer
addresses are mapped to the X.121 addresses. This is connection-oriented and forces sequencing.
X.75 is used to link different X.25 networks from other countries.
Link Access Protocol Balanced (LAPB)
Although Link Access Protocol (LAP) can be used with X.25, most commonly LAPB (a variation on
the HDLC frame
format) is used to provide balanced relationships where either device can send commands and
In the Address field, one side must be configured as a Layer 2 DTE and the other as a Layer 2
DCE (you must not
confuse this with the more familiar Layer 1 DCE and DTE designations). The Control field
indicates which of
three types of LAPB frames there are:
- Unnumbered: These establish and maintain communications and there are five types
Balanced Mode (Extended) (SABM or SABME) which establish the DTE to DCE link;
Unnumbered Acknowledgment (UA)
which confirms acceptance of a frame; Disconnect (DISC) which terminates the link;
Disconnect Mode (DM) which
indicates a disconnected state and Frame Reject (FRMR) which reports an error
- Supervisory: These allow the control of the flow of data and there are three
types of S-frames; Receiver Ready (RR)
which acknowledges the reception of a frame and indicates that the device is ready to receive
the next one in the sequence;
Receiver Not Ready (RNR) which acknowledges a received frame but it indicates that it cannot
receive any more I-frames
because it is still busy; and Reject (REJ) which requests the retransmission of
I-frames, the packet contains the
error frame so that the DTE will retransmit all packets since the error frame.
- Information: These contain data as well as Next Sent (NS) and Next
Receive (NR) counts. The sequencing
information of I-frames is piggybacked so streamlining the acknowledgment operation and a
timer T1 defines how long a device waits for a response.
Packet Layer Protocol (PLP) (X.25) Packet
A PAD is a Packet Assembler/Disassembler whilst a CPAD is a Character
Packet Assembler/Disassembler for use with a terminal. The PAD collects data from
asynchronous terminals and periodically outputs the data in X.25 packets.
Because a router acts as an X.25 host, it must be configured as a DTE and the X.25 switch is
the DCE. Layer 3 is concerned with DTE to DTE (router to router) connectivity.
This Layer 3 packet is encapsulated within the Information field of the LAPB layer 2 packet:
The header consists of the following:
- General Format Identifier (GFI): This defines the sequencing requirements and
contains; the Qualifier
(Q) bit which identifies information destined for PADs; the Delivery (D) bit which
calls for end to end
acknowledgment and the Sequence Number (SN) which describes whether the number sequence
used is modulo 8 or modulo
- Logical Channel Identifier (LCI): This identifies the virtual circuit
(whether Switched or Permanent) between the two end stations and is
made up of the 4-bit Logical Channel Group Number (LCGN) and the 8-bit Logical
Channel Number (LCN).
The virtual circuit is locally significant and can change from call setup to call setup.
- Packet Type Identifier (PTI): This describes the packet type as tabled below:
||DTE to DCE
||DCE to DTE
||DTE Clear Confirmation
||DCE Clear Confirmation
||DTE Reset Confirmation
||DCE Reset Confirmation
||DTE Restart Confirmation
||DCE Restart Confirmation
Using the above PTI types, PLP operates in five stages:
- Call Setup
- Data Transfer
- Idle - used once the SVC is up but no data transfer is occurring.
- Call Clearing
PVCs are permanently in Data Transfer mode.
Addressing X.121 and X.75
This International Data Number (IDN) is used for routing within the X.25 cloud and is
located just after the PTI.
It consists of 14 digits, the first four digits being the Data Network Identification Code
(DNIC) used when a packet
travels between PDNs, the first three describe the country and the fourth the PDN
The UK uses the range 234-237). The remaining ten digits describe
the National Terminal Number (NTN). An X.75 routing flag may be required by some PDNs, and
this is a '0' or a '1'
which sits just before the X.121 address to indicate the requirement for the use of X.75
The addresses are defined by the ITU-T and are detailed on their web site
Several network layer protocol addresses can be mapped to a single X.121 address as
described in RFC 1356
The PTI contains a '0B' to identify the packet as a Call Request, followed by two 4-bit fields
the lengths of the destination and source addresses. Next comes the 14 byte Call Address
followed by the Facilities
field which starts with the length of the requested facilities first (up to 109 bytes and
is often used for things like
fast select, credit card transactions, reverse charge etc.). The Protocol Identification
(PID) describes the
protocol which will cross the Switched Virtual Circuit (SVC) and this followed
finally by the Call User Data (CUD) which is 15 bytes and is used by some manufacturers
such as Nortel to pass the Connection ID parameter to the receiving router.
Call Setup is shown diagrammatically below:
The Call is accepted once the receiving DTE is sure that it can support the requested
During data transfer, the receiving device (which is the local switch) acknowledges the
packet, not the ultimate
destination, so that the sending device does not have to wait for the packet to travel the
whole network before sending the next one.
The Clear Request terminates the connection.
The X.25 provider will give you a range of VCs (out of the total range which is 1-4095)
that you can use and these must be configured the same
on the local switch as on the router. The following table details the type of circuit, the default
values on Cisco routers and the relevant IOS commands:
||x25 pvc circuit
|SVC Incoming Only
||x25 lic circuit
||x25 hic circuit
||x25 ltc circuit
||x25 htc circuit
|SVC Outgoing Only
||x25 loc circuit
||x25 hoc circuit
VC number assignments have to follow the following order: 1 <= PVCs < lic <= hic <
ltc <= htc < loc <= hoc <= 4095 where 'l' stands for 'low' and 'h' stands for 'high'.
An example of what a provider may give to a user is a range of VCs of say 1-15 where
the incoming SVCs can be from 1 (lic) to 5 (hic), the two-way SVCs from 6 (ltc) to 10 (htc)
and the outgoing SVCs from 11 (loc) to 15 (hoc).
There are two types of Virtual Circuits (Logical Circuits) between DTEs across a series of X.25
Permanent Virtual Circuit:
- Like a leased line, being statically configured between DTEs.
- No call setup is needed.
- Node addressing is not required.
- All packets follow a fixed path through the X.25 fabric.
Switched Virtual Circuit:
- Like a Voice call, disconnects when data transfer has finished.
- The path through the X.25 fabric may change during the call as links fail.
- Path may be different each call.
- For network protocols like IPX that provide higher layer resequencing, multiple SVCs
provide an effectively larger window size.
X.25 can be configured as a Public Data Network (PDN), complying with OSI and allowing
IP communication with other switches.
Local X.25 switching is where incoming calls on one interface are routed out of another
local interface. Remote switching is where incoming calls are sent to other switches
via tunnelling through TCP and the remote switch routes the call on to the destination.
Remote Switching is commonly called X.25 Over TCP (XOT) and provides the facility
to run X.25 over any medium and at much faster speeds.
X.25 can also be run over non-serial media using LLC2 using Connection Mode Network Service (CMNS).