X.25 Protocol Tutorial : Exploring X.25 Protocol Layers, Frame Structure and Physical Layer (X.21)

X.25 is a standard protocol suite widely used for packet-switched networks. It defines how data is transmitted across the network using different layers, namely the physical layer, frame layer, and packet layer. The physical layer (X.21) handles the hardware connections, while the frame layer (LAPB) ensures data link control, and the packet layer (PLP) manages end-to-end communication between devices. This tutorial delves into each layer of the X.25 protocol, the X.25 frame structure, and the roles and functionalities these layers play in enabling robust communication across networks.

Introduction:
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 basics
Figure-1: X.25 connection

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.

X.25 Protocol Stack

As shown in the figure, X.25 protocol stack consists of three layers, viz. physical layer(X.21), frame layer(LAPB) ,packet layer(PLP).

X.25 protocol layers
Figure-2: X.25 protocol stack

Physical layer: At this layer, X.25 specifies X.21 protocol. It is similar to other physical layer protocols e.g. EIA 232.

X.25 frame structure
Figure-3: X.25 Frame structure

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.

Packet layer: 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.).

Conclusion

Understanding the X.25 protocol and its layered structure is crucial for anyone working with packet-switched networks. The physical, frame and packet layers work together to ensure reliable data transmission. By exploring the details of the X.25 frame structure and its layered functionality, network engineers can effectively design, troubleshoot, and optimize X.25 networks for various communication applications.
➨Also refer advantages and disadvantages of X25 protocol stack >>.

Switching and X25 protocol related links

IoT Wireless Technologies

WLAN    THREAD    EnOcean    LoRa    SIGFOX    WHDI   
Zigbee   6LoWPAN   Zigbee RF4CE   Z-Wave   NFC   RFID   INSTEON  

RF Wireless Tutorials