The Wayback Machine - https://web.archive.org/web/20241110204749/https://www.geeksforgeeks.org/xmodem-file-transfer-protocol/
Open In App

XMODEM File Transfer Protocol

Last Updated : 29 May, 2020
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

XMODEM is a file transfer protocol which enables users to transmit files between different computers.

History :
XMODEM was developed by Ward Christensen in 1977 and since then the method of sharing files has changed. It became extremely popular in the early bulletin board system (BBS) market because of its simple implementation. However it became inefficient as the modem speeds increased. The solution to this led to the development of several modified versions of XMODEM to improve the performance and resolve other issues with the file sharing protocol. XMODEM is the most modified computer program in history.

Functioning :
XMODEM breaks up the original data into a series of “packets” which are sent to the receiver. It also contains additional information which allows the receiver to determine whether that packet was correctly received or not. The packet is resent after requested by the receiver if an error encounters. The transfer is aborted because of a string of bad packets.

Following table displays the various symbols used during transfer and their meaning –

Symbol Description
SOH Start of Header
EOT End of Transmission
ACK Acknowledge
NAK Not Acknowledge
ETB End of Transmission Block
CAN Cancel

Packet Structure :
The original packet structure of XMODEM is given below –

Checksum is the sum of all bytes in the packet modulo 256. In other words it can be computed by discarding all but the eight least significant bits of the result of summation. In this way. For example, if this checksum method is used on a tiny data packet containing only two bytes carrying the values 130 and 130, the summation of these codes is 260, and the resulting checksum is 4. This ensures that the checksum is stored in 8 bits only.

Method of transfer :
Transfers are receiver-driven, i.e., the transmitter will not send any data until an initial NAK is sent by the receiver. The transmitter waits until the receiver sends a NAK byte. The NAK byte is the signal that the receiver is ready to start. This is the initial byte which displays that the file transfer is ready to begin.  If the receiver takes too long or an error occurs then the transmitter will stop waiting or “Time Out”.

The file transfer will restart if it gets timed out. A NAK is also sent if the receiver does not receive a valid packet within ten seconds while still expecting data due to the lack of a EOT character.

Receiver performs the following tasks and transfers one packet at a time –

  1. It checks that the packet number sent matches the actual packet number i.e., 2nd byte is checked in the packet. In case of any discrepancy it sends a CAN byte to cancel the transfer.
  2. It adds the 1’s compliment and the packet number that is the 3rd and the 2nd bit to check if they add up to 255. In case of any discrepancy it sends a CAN byte to cancel the transfer.
  3. Packet’s checksum is calculated after retrieval and is compared to the one received from the sender at the end of the packet. If the condition SUM = CHECKSUM is true then the receiver sends an ACK byte to the transmitter which is an indication to send the next packet in sequence. If the condition is not satisfied then a NAK byte is sent which indicates the transmitter to again send the byte.

Transfer completion :
If the transmitter sends an EOT byte instead of a SOH byte, the receiver sends a NAK byte.

If the transmitter sends another EOT immediately after that,the receiver sends an ACK byte and the transfer is complete. The receiver has the ability to can cancel the transfer at any time by sending a CAN byte whereas the transmitter can only cancel between blocks by sending a CAN byte.



Similar Reads

Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
Data transfer is the most common task in network and system communications, and they involve transfer of files using two means i.e the File Transfer Protocol (FTP) and the Secure File Transfer Protocol (SFTP). FTP is a commonly applied protocol that enables files to be transferred through a network from one computer to another, but FTP is unsecure
5 min read
What is Anonymous FTP (File Transfer Protocol)?
AFTP (Anonymous File Transfer Protocol) is a network protocol used for transmitting files using TCP-based networks. Anonymous file transfer protocol lets a user move files anonymously from one computer to another. Anonymous FTP operates at layer 7; anonymous FTP permits anonymous external computer users without any designated password or user ID to
3 min read
SFTP File Transfer Protocol
SFTP (Secure File Transfer Protocol) is the advanced version of FTP(file transfer protocol) which ensures security while transferring files between the organizations/computer. It is also known as SSH(Secure Shell). It works on port no. 22 and uses the client-server model. Features of SFTP : It encrypts the data.It executes the command.It secures an
3 min read
File transfer protocol server configuration using cisco packet tracer
In this article we are going to design a file transfer protocol server configuration in cisco packet tracer and checking the connectivity for uploading and downloading the file from remote PC. Objectives: To Configure FTP Services on Server.To Upload a File into the FTP Server from Remote PC.To Download a File from the FTP Server from Remote PC.Pro
3 min read
What is TFTP (Trivial File Transfer Protocol)?
The network is made up of various devices. These devices are either connected by ethernet or by any wireless means. The communication for transferring files takes place between these connected devices. Therefore network protocols are required. Network protocols are defined as rules that describe the format of data, sending and receiving of data bet
5 min read
File Transfer Protocol (FTP) in Application Layer
FTP or File Transfer Protocol is said to be one of the earliest and also the most common forms of transferring files on the internet. Located in the application layer of the OSI model, FTP is a basic system that helps in transferring files between a client and a server. It is what makes the FTP unique that the system provides a reliable and efficie
12 min read
Principle Of Reliable Data Transfer Protocol
Transport Layer Protocols are central piece of layered architectures, these provides the logical communication between application processes. These processes uses the logical communication to transfer data from transport layer to network layer and this transfer of data should be reliable and secure. The data is transferred in the form of packets bu
3 min read
Network News Transfer Protocol (NNTP)
Network News Transfer Protocol (NNTP) is the underlying protocol of UseNet, which is a worldwide discussion system which contains posts or articles which are known as news. Network News Transfer Protocol is used to transfer news from one network to another. It is designed specifically to transfer news/articles. A NNTP client is included in browsers
2 min read
What is ESMTP (Extended Simple Mail Transfer Protocol)?
Due to emerging computer science technology and connecting the world through the internet and to have communication between different computers SMTP protocol is being used. Email is widely used by users all over the internet whether to share information in text format or in different multimedia forms. There is a certain set of rules defined for sen
4 min read
Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer mechanism (SMTP) is a mechanism for exchanging email messages between servers. It is an essential component of the email communication process and operates at the application layer of the TCP/IP protocol stack. SMTP is a protocol for transmitting and receiving email messages. In this article, we are going to discuss every point
8 min read
Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the receiver whereas in the sliding wi
5 min read
Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
When dealing with network routing, it's crucial to understand the various protocols that help direct traffic across complex networks. Two significant protocols in this space are the Border Gateway Protocol (BGP) and the Routing Information Protocol (RIP). Each serves different purposes and operates under different principles. This article explores
5 min read
Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), are designed to avoid network loops in Ethernet. It provide loop-free logical topology. They were both designed to provide network reliability and particularly avoid broadcast radiation, but the major differences are on the rate, functionality and versatility. In this article we
5 min read
Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
SLIP and PPP, which are the widely used serial connection techniques, help to connect the distant devices of the network. The fullform of SLIP is Session Layer Internetworking Protocol. SLIP being a primitive protocol put into use during the early connections to the Internet, when there was not much overhead. PPP is slightly more complex as the pro
6 min read
Asynchronous serial data transfer
In most computer asynchronous mode of data transfer is used in which two component have a different clock. Data transfer can occur between data in two ways serial and parallel. In case of parallel multiple lines are used to send a single bit whereas in serial transfer each bit is send one at a time. To tell other devices when the character/data wil
2 min read
Asynchronous Transfer Mode (ATM) in Computer Network
Why ATM networks? Driven by the integration of services and performance requirements of both telephony and data networking: "broadband integrated service vision" (B-ISON). Telephone networks support a single quality of service and are expensive to boot. Internet supports no quality of service but is flexible and cheap. ATM networks were meant to su
5 min read
Reliable Data Transfer (RDT) 2.0
Reliable Data Transfer (RDT) 2.0 protocol works on a Reliable Data Transfer over a bit error channel. It is a more realistic model for checking bit errors that are present in a channel while transferring it may be the bits in the packet are corrupted. Such bit errors occurs in the physical components of a network when a packet is transmitted, propa
4 min read
Reliable Data Transfer (RDT) 1.0
Reliable Data Transfer (RDT) 1.0 works on a perfectly reliable channel, that is, it assumes that the underlying channel has: No bit errors andNo loss of packets This transfer of data is shown by using FSM (finite state machine). In RDT 1.0, there is only one state each for sender and receiver. Sender Side: When the sender sends data from the applic
1 min read
Various Types of Transfer Modes in HDLC
High-Level Data Link Control (HDLC) is basically data link control protocol that is capable of supporting range of various models of operation or data transfer. A mode in HDLC generally represents relationship among two devices that are involved in an exchange. A mode basically describes who actually controls data link. HDLC communications session
3 min read
Cable TV for Data Transfer
In this era, cable companies are competing with telephone companies for residential customers who want high-speed data transfer. To provide high-speed data transfer, the use of a cable TV network is used. To understand this technology following points needs to be considered: Bandwidth: As we have also studied in the HFC system, that it uses the fib
4 min read
How to Transfer Files using SFTP?
SFTP (Secure File Transfer Protocol) or SSH (Secure Shell) File Transfer Protocol) is a file transfer protocol used to transfer files between client and server. It uses SSH(Secure Socket Shell) and is also known as Secure Socket Shell File Transfer Protocol. It provides secure access to a remote server for the secure transfer of files. Secure FTP a
3 min read
Reliable Data Transfer (RDT) 2.2
The reliable data transfer protocol 2.2 is the successor of RDT 2.1. The prominent change in the RDT 2.2 is the exclusion of Negative acknowledgment. In RDT 2.2 a new field is added to the packet at receiver side acknowledgment with the sequence of the packet sent, This enables the sender to compare the sequence number. If the sequence number doesn
3 min read
How Fast Ethernet Can Transfer the Data?
Answer: Fast Ethernet is the standard Ethernet Network which supports a data transfer rate of up to 100 megabits per second (Mbps). Steps demonstrating data transfer using Fast EthernetStep 1: EncodingFast Ethernet uses Manchester Encoding, In this each bit is mainly represented by the transition from the high to the low voltage, and also vice vers
2 min read
Reliable Data Transfer (RDT) 2.1
RDT 2.1 protocol is the successor of RDT 2.0. While transmitting data in the transport layer, the issue of reliable transfer of data persists, the reliability issue is not only in the transport layer but also in the application layer. When a reliable protocol is used over an unreliable layer, reliability issues can arise, like TCP is a reliable pro
3 min read
Reliable Data Transfer (RDT) 3.0
RDT 3.0 is the last and best version of the Reliable Data Transfer protocol. Before RDT 3.0, RDT 2.2 was introduced, to account for the channel with bit errors which bit errors can also occur in acknowledgments. As the design of RDT 2.2 is a stop-and-wait for protocol. If there is a network issue and the acknowledgment/packet is lost. The sender wa
4 min read
MAC Protocol Used in Wireless Sensor Networks
Pre-requisites: Classification of MAC Protocols In Wireless Sensor Networks (WSNs), the Medium Access Control (MAC) protocol is a set of guidelines that dictate how each node should transmit data over the shared wireless medium. The primary objective of the MAC protocol is to minimize the occurrence of idle listening, over-hearing, and collisions o
6 min read
Hot Standby Router Protocol (HSRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, which provides redundancy for a local subnet. In HSRP, two or more routers gives an illusion of a virtual router. HSRP allows you to configure two or more routers as standby routers and only a single router as an active router at a time. All the routers in a single HSRP group share
4 min read
What is DCCP (Datagram Congestion Control Protocol)?
Congestion in a network means deterioration of network or services which are caused due to overloading of network nodes, basically, this problem is primarily associated with large networks, in which a large amount of data and information is being transmitted. Congestion can be caused by several reasons: either the routers which are being used are n
6 min read
Article Tags :
three90RightbarBannerImg