You are on page 1of 10

X.

25 PROTOCOL
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

X.25 PROTOCOL

X.25 is a packet-switching wide area network developed by ITU-T in 1976; since


then it has undergone several revisions. According to the formal definition given in
the ITU-T standard, X.25 is an interface between data terminal equipment (DTE) and
data circuit-terminating equipment (DCE) for terminal operation in the packet mode
on public data network.

Although X.25 is an end-to-end protocol, the actual movement of packets through the
network is invisible to the user. The user sees the network as a cloud through which
each packet passes on its way to the receiving DTE.

X.25 defines how a packet-mode terminal can be connected to a packet network for
the exchange of data. It describes the procedures necessary for establishing,
maintaining, and terminating connections. It also describes a set of services, called
facilities, to provide functions such as reverse charge, call direct, and delay control.

X.25 is what is known as a subscriber network interface (SNI) protocol. It defines


how the user’s DTE communicates with the network and how packets are sent over
that network using DCEs. It uses a virtual circuit approach to packet switching (SVC
and PVC) and uses asynchronous (statistical) TDM to multiplex packets.

X.25 LAYERS

The X.25 protocol specifies three layers: the physical layer, the frame layer, and the
packet layer. These layers define functions at the physical, data link, and network
layer of the OSI model.

Physical Layer
At the physical layer, X.25 specifies a protocol called X.21 (or X.21 bis), which has
been specifically defined for X.25 by the ITU-T. X.21, however, is similar enough to
other physical layer protocol, like EIA-232, that X.25 is able to support them as well

BRBRAITT : March-2007 2
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

Frame Layer

At the frame layer, X.25 provides data link controls using a bit-oriented protocol
called link access procedure, balanced (LAPB), which is a subset of HDLC.

The flag, address, control, and FCS fields are exactly the same. However, because the
communication here is point-to-point and in asynchronous balanced mode, the only
two addresses are 00000001 (for a command issued by a DTE and the response to this
command) and 00000011 (for a command issued by a DCE and response to this
command).

Three Categories of Frames

HDLC (and is its derivation, LAPB) has three categories of frames: I-frames, S-
frames, and U-frames.

I-Frames I-frames are used to encapsulate PLP packets from the network layer.

S-Frames S-frames are for flow and error control in the frame layer.

U-Frames U-frames are used to set up and disconnect the links between a DTE and a
DCE. The three packets most frequently used by LAPB in this category are SABM
(or ESABM if the extended address mode is used ), UA, and DISC

Frame Layer Phases

In the frame layer, communication between a DTE and a DCE involves three phases:
link setup, packet transfer, and link disconnect.

Link Setup The link between DTE and DCE must be set up before packets from the
packet layer can be transferred. Either the DTE or the DCE can set up the link by
sending an SABM (set asynchronous balanced mode) frame; the responding party
sends a UA (unnumbered acknowledgment ) frame to show that the link is actually
set.

Transferring Data After the link has been established, the two parties can send and
receive network packets (data and control) using I-frames and S-frames.

Link Disconnect When the network layer no longer needs the link, one of the
parties can issue a disconnect (DISC) frame to request disconnection. The other party
can answer with a UA frame.

BRBRAITT : March-2007 3
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

Packet Layer
The network layer in X.25 is called the Packet layer protocol (PLP). This layer is
responsible for establishing the connection, transferring the data, the terminating the
connection. In addition, it is responsible for creating the virtual circuits (discussed
below) and negotiating network services between two DTEs. While the frame layer is
responsible for making a connection between a DTE and a DCE, the packet layer is
responsible for making a connection between two DTEs (end-to-end connection).
Note that X.25 uses flow and error control at two levels (frame layer and packet
layer). Flow and error control between a DTE and a DCE (link) are under the
jurisdiction of the frame layer. End-to-end flow and error control between two DTEs
(end-to-end) are under the jurisdiction of the packet layer.

Virtual Circuits
The X.25 protocol is a packet-switched virtual circuit network. Note that the virtual
circuits in X.25 are created at the network layer (not the data link layer as in some
other wide area networks such as Frame Relay and ATM). This means that a physical
connection established between a DTE and DCE can carry several virtual circuits at
the network layer with each circuit responsible for carrying either data or control
information, a concept called in-band signaling.

Virtual Circuit Identifiers

Each virtual circuit in X.25 should be identified for use by the packets. The virtual
circuit identifier in X.25 is called the logical channel number (LCN). When a virtual
circuit is established between two DTEs , there is always a pair of LCNs: one defining
the virtual circuit between the local DTE and the local DCE and the other one
between the remote DCE and the remote DTE: The reason for having two different
LCNs is to make the LCN domain local. This allows the set of LCNs for each local
connection to be small and consequently the LCN field to be short. A global LCN
would require a larger set of LCNs and consequently a longer LCN field. The local
LCN allows the same set of LCNs to be used by two different pairs of DTE-DCE
links without confusion.
X.25 uses both permanent and switched virtual circuits (PVCs and SVCs). PVCs are
established by the X.25 network providers. They are similar to the leased line in
telephone networks. The LCNs are permanently assigned by the network provider.

BRBRAITT : March-2007 4
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

SVCs are established at each connection is established, both DTE – DCE links are
assigned an LCN. After the data transfer, the virtual circuit is disconnected and the
LCNs are no longer valid.

Note that the virtual circuit establishment and release at the network layer are
different form link setup and disconnect at the frame layer. In a typical situation, the
following five events occur:

 A link is set up between the local DTE and DCE and also between the remote
DTE and DCE.

 A virtual circuit is established between the local DTE and the remote DTE.

 Data are transferred between the two DTEs.

 The virtual circuit is released.

 The link is disconnected.

LCN Assignment

X.25 allows up to 4096 (212 ) LCNs. The one-way LCNs are used for simplex
communication; the two-way LCNs are used for duplex communication.

PLP Packets

The general format of a PLP packet, has three or four bytes of header and an optional
information field.

The fields in the header are as follows:

BRBRAITT : March-2007 5
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

 General format identifier (GFI). The general format identifier (GFI) is a four
bit field. The first bit, called the Q (qualifier) bit, defines the source of control
information: 0 for PLP, 1 for other high-level protocols. The D (delivery) bit,
defines which device should acknowledge the packet: 0 for the local DCE, 1 for
the remote DTE. The last two bits of the GFI indicate the size of the sequence
number fields. If these bits are 01, the sequence numbers are only 3 bits – modulo
8 (0 to 7). If these bits are 10, the sequence numbers are 7 bits – modulo 128 (0 to
127).

 Logical Channel Number (LCN). The logical channel number (LCN) is a 12-bit
field that identifies the virtual circuit chosen for a given transmission. The
protocol originally defined a LGCN (logical group channel number) of 4 bits and
an LCN (logical channel number) of 8 bits to give a sense of hierarchy to the
virtual circuit identifier, but today, the combination is normally referred to as
LCN.

 Packet Type Identifier (PTI). The packet type identifier (PTI) defines the type of
packet. The content of this field is different for each packet. We will discuss them
in the next section.

Two Categories of Packets


Packets at the PLP level can be divided into two broad categories: data packets and
control packets. The control packets, in addition, have two formats: one used for RR,
RNR, and REJ packets and another for the remaining packets

Data Packets Data packets are used to transmit user data. The general format is
simple: a header and a use data field. The header, however, is complex and requires
discussion here. There are two formats for information packet: short and long. The
PTI field in the data packet consists of four sections. P(S) and P(R) carry the packet
sequence numbers for flow and error control. P(S) stands for packet send and
indicates the sequence number of the packet being sent. P(R) stands for packet receive
and is the sequence number of the next packet expected by receiver. This field is used
to piggyback acknowledgments to data packet when both parties have data to send. In
the short header, both the P(S) and P(R) fields are three bits long (sequence numbers
from 0 to 7). In the long header, each field contains seven bits (sequence numbers
from 0 to 127). The M (more) bit is used to define a set of packets belonging to the
same unit. This bit is set to 1 if there are more packets in the unit (for example, a
message); it is set to 0 if the packet is the last one. Data packets are differentiated
from control packets by a 0 in the least significant bit in the third byte.

RR, RNR, and REJ Packets RR (receive ready), RNR (receive not ready), and REJ
(reject packets consists of just a header with the two least significant bits in the third
byte set to 01. The header is essentially the same as the data packet’s with only one
difference; because these packets are used solely for flow and error control, they do
not carry data and therefore do not have a P(S) field. Instead, they contain a new field,
the packet type field, which carries a code that describes the purpose of the packet.

BRBRAITT : March-2007 6
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

These packets can be one of three types: receive ready (RR), receive not ready (RNR),
and reject (REJ). They are described as follows:

 RR (000). Receive ready (RR) means that the device (DTE or DCE) is ready to
receive more packets. It also acknowledges the receipt of a data packet by
indicating the number of the next packet expected in the P(R) field.

 RNR (001). Receive not ready (RNR) means that the device cannot accept
packets at this time. The other party must stop sending packets as soon as this
packet is received.

 REJ (010). Reject (REJ) means that there was an error in the packet identified by
the P(R) field. The other party must resend all packets including and following the
packet indicated (go-back-n error recovery).

Other Control Packets The other types of control packets may carry information in
addition to the header. However, the information is only for control and does not
contain user data. There is only header size in this category because these packets do
not carry sequence numbers. In these packets the two least significant bits in the third
byte are set to 11. General format of the header, which is essentially the same as the

information packet, except that there are no P(R) of P(S) fields.


The packet type field in these control packets is six bits long and can be used to
specify up to 64 different functions. As of this writing, however, only a handful of the
possible codes have been assigned meaning.
 Call request/ incoming call. The call request and incoming call packets are used
to request the establishment of a connection between two DTEs. Call request goes
form the local DTE to the local DCE. Incoming call goes from the remote DCE to
the remote DTE. In addition to the header, each of these packets includes fields
specifying the length of the address, the addresses of the DTEs, the length of any
facilities, and optional information such as log-on codes and database access
information. Facilities are optional services that can be included on a contractual
or per call basis. Facilities are made available by agreement between the users and
network providers. Contractual options can include such services as incoming
calls barred, outgoing calls barred, flow control parameter negotiation, fast select
acceptance, and D-bit modification. Per call options can include flow control
negotiation, fast select, and reverse charging.

 Call accepted/call connected. The call accepted and call connected packets
indicate the acceptance of the requested connection by the called system. They are
sent in response to the call request and incoming call packets. Call accepted is sent

BRBRAITT : March-2007 7
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

by the remote (called) DTE to the remote DCE. Call connected is sent by the local
(calling) DCE to the local DTE.

Clear request/clear indication. The clear request and clear indication packets are
used at the end of an exchange to disconnect (clear) the connection. Either DTE or
DCE can initiate the clearing. These packets also can be used by a remote DTE to
respond negatively to an incoming call packet when it is unable to accept the
requested connection.
 Clear confirm. The clear confirm packet is sent in response to the clear indication
packet described above.

 Interrupt. The interrupt packet is used under unusual circumstances to break into
an exchange and get attention. It can be sent by either of the DTEs or DCEs
involved in the exchange and acts as an alert. For example, imaging that a local
DTE waits a long time without receiving either a positive or negative
acknowledgment from the remote DCE. Its window has reached the end. It cannot
send more packets and it cannot quit. It sends an interrupt message to get
attention.

 Interrupt confirm. The interrupt confirm packet confirms the receipt of the
interrupt packet described above.

 Reset request/reset indication. The reset request and reset indication packets are
used to reset the sequence numbers in an exchange over a particular virtual circuit.
Reset packets are used when a connection has been damaged to the point where
the virtual circuit must be reinitialized. The virtual circuit remains active, but the
transmission begins again from a predetermined point; all packets from that point
on are renumbered, starting from 0.

 Reset confirm. The reset confirm packet confirms the reset process.
 Restart request/restart indication. The restart request an restart indication
packets restart all virtual circuits created by a DTE. This process is different from
the reset process. Reset packets activate a new set of sequence number on an
existing virtual circuit. Restart packets start up a new virtual circuit. Restart

BRBRAITT : March-2007 8
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

terminates and reestablishes a call by establishing a new virtual circuit for


transmission. Any packets on the original pathway are lost an new packets are
renumbered starting with 0. An analogy to this process is a phone call where the
connection becomes so bad that you hang up and dial again.
 Restart confirm. The restart confirm packet confirms the restart request.
 Registration request. The registration request packet allows on-line registration
of new users to the network.
 Registration confirm. The registration confirm packet confirms a registration.

OTHER PROTOCOLS RELATED TO X.25

There are other protocols in the X-series that are related to X.25. We discuss some of
these protocols here.

X.21 Protocol

Since X.25 does not explicitly define what type of global addressing should be used
during call setup to access a remote DTE (before the establishment of a virtual
circuit), ITU-T has created X.121 to globally address DTEs connected to a public or
private network. Most X.25 networks today use the X.121 addressing scheme.
The address is made of 14 digits. The first four digits, called the Data Network
Identification Code (DNIC), define one specific network. Three digits define a
country and on digit defines a network inside that country. The next 10 digits are the
called the National Terminal Number (NTN) and define DTEs inside a particular
network.

Triple-X Protocols

Three protocols, X.3, X.28 and X.29, collectively called Triple-X protocols, are used
ot connect a dumb terminal (instead of a DTE that can understand X.25 protocol) to
an X.25 network. We discuss each protocol briefly.

X.3

The X.3 protocol defines a packet assembler/dissembler (PAD).A PAD is needed to


connect a character-oriented (dumb) terminal to an X.25 network. On a terminal, we
may use different character keys that are not necessarily sent over the network (such
as arrow keys and delete keys). A PAD buffers all of these characters and assembles
them into X.25 packets. When a packet arrives from the network, the PAD
disassembles them so that they can be displayed on the screen or printed on the
printer. X.3 defines 22 parameters that can be used by a PAD. For example, one
parameter specifies that the PAD should echo characters sent from the terminal to the
PAD.

X.28

The X.28 protocol defines the rules for communication between a dumb terminal and
a PAD. It defines different commands that can be used by the terminal or the PAD.

BRBRAITT : March-2007 9
“DATA NETWORKS” FOR JTOs PH-II - X.25 Protocol

For example, a command can be typed on the dumb terminal to request the
establishment of a virtual connection between the PAD and the remote DTE.

X.29

The X.29 protocol defines the relationship between a PAD and the remote terminal.
Using this protocol, the remote terminal can set some of the parameters in the PAD.
For example, the remote terminal can set the echo parameter in the PAD.

BRBRAITT : March-2007 10

You might also like