X.25 basics tutorial
X.25 is developed by ITU-T and it is a packet switched wide area network. As shown in the figure below, it is a interface between DTE and DCE for operation on public data network in packet mode. DTE stands for Data Terminal Equipment and DCE stands for Data Circuit Terminating Equipment. X.25 is an end to end protocol. User usually will not be aware of packets passing between these terminals.
X.25 defines procedures and protocols needed to establish,maintain and terminate the connections. It also defines services to provide functions such as reverse charge,call direct and delay control. It is also referred as subscriber networks protocol. It uses virtual circuit approach to packet switching and uses asynchronous TDM to multiplex the packets.
As shown in the figure, X.25 protocol consists of three layers, viz. physical layer(X.21), frame layer(LAPB) ,packet layer(PLP).
Physical layer: At this layer, X.25 specifies X.21 protocol. It is similar to other physical layer
protocols e.g. EIA 232.
Frame layer: At this layer, X.25 provides data link control using LAPB, which is subset of HDLC protocol.
LAPB is a bit oriented protocol with frame structure as mentioned above.
The communication is point to point and in asynchronous balanced mode.There are two addresses defined here,
00000001 and 00000011. The first one is used for a command issued by DTE and in response frame to this command.
The second one is used by DCE and in response frame to this command.
There are three types of frames, viz. I-frame , S-frame and U-frame. I-frames are used to encapsulate PLP packets from the upper layer. S-frame is used for error control and flow control. U-frame is used to set up and disconnect the connection between DTE and DCE.
There are three phases to establish communication between DTE and DCE as described below.
• Link setup: First the link need to be setup between DTE and DCE before packet transfer takes place. Either DTE or DCE can set up the link by sending SABM frame and responding party sends UA frame to indicate that link has been established. SABM stands for Set Asynchronous Balanced Mode. UA stands for Unnumbered Acknowledgement.
• Transferring data: After the link is established both parties can send and receive data/control frames using I-frames and S-frames.
• Link Disconnect: When network layer no longer needs the connection, either parties can issue DICS frame to request for disconnection, the other party acknowledges by issuing UA frame.
The network layer in X.25 is called the packet layer protocol or PLP layer.
It is responsible to establish the connection,to transfer the data and to terminate the connection.
It is also responsible to create virtual circuit and to negotiate network services between two DTEs.
As mentioned frame layer takes care of connection between DTE and DCE while
packet layer takes care of connection between two DTEs.
PLP packets will have 3-4 bytes of header and optional information fields.
PLP Packet = Header + User data/control frame/No data
Header = GFI (4 bits) , LCN (12 bits), PTI (8 bits or 16 bits)
GFI or General Format Identifier is a 4 bit field.
The first bit (Q bit,Qualifier) defined source of control information. 0 for PLP and 1 for upper layer protocol.
The D bit(Delivery) defines which device should acknowledge the packet 0 for local DCE, 1 for remote DTE. The last two bits indicate size of sequence number fields.
LCN or Logical Channel Number is a 12 bit field which identifies virtual circuit chosen for the transmission.
PTI or Packet Type Identifier defines the type of packet,viz. data packet or control packet(RR,RNR,REJ etc.).