EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

TFTP

By Priya PedamkarPriya Pedamkar

Home » Software Development » Software Development Tutorials » Network Security Tutorial » TFTP

TFTP

What is TFTP?

TFTP stands for Trivial File Transfer Protocol. This protocol is used when users need to copy their files. In other words, it allows the user to store and access their files from the remote host. It is mainly used for the booting system. To understand this concept, let us take a simple example, Suppose you have a booted diskless system or router; for that, you need to download bootstrap files and configurations files. In that situation, you need a protocol to copy those files at a faster speed. Here the TFTP comes into the picture. It is designed to copy these types of files.

It requires only IP (Internet Protocol)  and UDP (User Datagram Protocol). It performs two operations, read and write, namely.  In a read operation, it copies files from server SIDE yo client SIDE, while in a write operation, it works exact oppoSIDE; it copies files from client-side to the server-side.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

It uses UDP services on the well-known port 69.

Types of TFTP Messages

There are five types of TFTP message listed below:

  • RRQ
  • WRQ
  • DATA
  • ACK
  • ERROR

1) RRQ message

RRQ stands for the read request message. The client uses this to create a connection For reading data from the server SIDE.  RRQ message has three fields OpCode, Filename and Mode. An OpCode is a 2 byte in size; It contains 1 to show the RRQ message. Filename defines the name of the file. Modes define the transmission mode. Transmission mode can be netascii for ASCII file or octet for binary files. The message format of RRQ is given as follows.

2) WRQ message

WRQ stands for the write request message. The client uses this to create a connection for writing data from the server SIDE. WRQ message has the same fields as RRQ, only difference because OpCode contains 2 to show the WRQ message. Here we can see the WRQ message format.

3) DATA message

Both client and server use data messages to send data blocks. Data contains three fields – OpCode,  Block number, and Data. OpCode contains 3 to show data messages. A Block number is a 2-byte field that contains a block number. All blocks are sequentially numbered from 1. The client and server use this field to send data sequentially so that the receiver will combine the whole message using this block number. Data is of 512 bytes. Data can be transferred in the form of netascii (ASCII file)  or octet (Binary file). The DATA message format is given as follows.

4) ACK message

ACK stands for Acknowledge message.  Both client and server use this ACK to acknowledge the receipt of the data block. This message is of 4 bytes. It contains two fields – OpCode and Block number. OpCode contains 4 to show the ACK message. Block number is of a 2-byte field that contains the number of data blocks received. ACK message can also respond to the WRQ message, which is sent by a server to the client for indicating that the server is ready to receive data from the client. ACK message format is given as follows.

Popular Course in this category
Cyber Security Training (12 Courses, 3 Projects)12 Online Courses | 3 Hands-on Projects | 77+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (6,002 ratings)
Course Price

View Course

Related Courses
CDN Training (2 Courses)OSPF Training Program (2 Courses)Penetration Testing Training Program (2 Courses)

5) ERROR message

Client and server use ERROR message when a connection between client and server cannot be established or when some error has occurred during data transmission. It sends a negative response to the RRQ message or WRQ message. This message contains three fields – Oe, Error number and Error data. OpCode contains 5 to show the ERROR message. The error number is of 2 byte that contains the error number and its meaning. The ERROR message format is given as follows.

Below is the list of error number with their meaning

0 – Not defined

1 – File not found

2 – Access violation

3 – Disk full or quota exceeded

4 – Illegal operation

5 – Unknown port number

6 – File already exists

7 – No such user

The error data field contains error data in text format. It is a 1-byte field and terminated by 0s.

TFTP Connections

It uses an RRQ message, WRQ message, ACK message, and ERROR message to establish connections. While to terminate connections, TFTP uses the DATA message.

1) Connection Establishment

The process of connection establishment for reading files is different from writing files.

  • Reading: The client sends the RRQ message to establish a connection for reading. This message contains the name of the file and the transmission mode of the file. Once the connection is established, the server sends a positive response with the DATA message if the server is able to transfer the file. Suppose it does not then send a negative response with an ERROR message.
  • Writing: The client sends WRQ messages to establish a connection for writing. This message contains the name of the file and the transmission mode of the file. Once the connection is established, the server sends a positive response with an ACK message if the server is able to copy the file. Suppose it does not then send a negative response with an ERROR message.

Here is the representation of reading and writing operation

2) Connection Termination

After the transmission of the file, the connection must be terminated. It does not use a special message to terminate the connection. Termination is done by sending the last data block, which is less than 512 bytes.

Recommended Articles

This is a guide to TFTP. Here we have discussed an overview of different types of TFTP messages, how the TFTP  connections established, and termination that made it easy to understand the concepts. You may also look at the following article to learn more –

  1. FTP vs TFTP
  2. FTP Commands
  3. Programming vs Web Development
  4. Types of Web Hosting

Cyber Security Training (12 Courses, 3 Projects)

12 Online Courses

3 Hands-on Projects

77+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Network Security Tutorial
  • Protocols
    • What is TCP Protocol
    • What is TCP/IP
    • How do IP Addresses Work?
    • Routing Protocols Types
    • What is Telnet
    • What is TFTP
    • What is DHCP
    • What is SFTP
    • Address Resolution Protocol
    • Internet Control Message Protocol
    • Simple Mail Transfer Protocol
    • Internet Security Protocols
    • SMTP Protocol
    • Types of Networking Protocols
    • User Datagram Protocol
    • Data Link Layer
    • Data Link Layer Services
    • Network Layer
    • Transport Layer Protocols
    • What Is Networking Protocols
    • TFTP
    • What is ARP
    • Basic Fundamental Of Networking
    • What is IPv4
    • What is IPv6
    • CIFS Protocol
    • What is SMB?
    • What is EIGRP
    • What is LLDP?
  • Basics
    • Security Consultant Definition
    • Security Policies
    • What is Network Security
    • What is Data Security?
    • What is Cryptography
    • Cryptography Techniques
    • Cryptography Tools
    • Data Security Techniques and Privacy
    • Digital Signature Cryptography
    • Java Cryptography
    • Basics of Cybersecurity
    • What is Network Topology
    • Algorithms and Cryptography
    • HTTP Methods
    • Security Technologies
    • Security Architecture
    • Network Topologies
    • What is a Physical Address?
    • Logical Address
    • What is Storage Area Network?
    • Mobile Ad Hoc Network
    • What is Computer Networks?
    • Security Principles
    • What is Remote Access?
  • Routing
    • What is Router
    • Types of Routers
    • Dynamic Routing
    • Routing Algorithms
    • Routing Protocol
    • What is Routing
    • What is Static Routing
    • Important Types of DNS Servers (Powerful)
  • Attacks
    • Types of Network Attacks
    • What is Trojan Horse Virus
    • What is DOS
    • Types of DOS Attacks
    • DDos Attack Mitigation
    • Ransomware Attack  
    • Types of Cyber Attack
    • What is a Brute Force Attack
    • What is a Phishing Attack
    • What is Cyber Attack
    • What is DDoS Attack
    • What is Man In The Middle Attack
    • What is Man In The Middle Attack
    • What is Ransomware
    • What is Pharming
    • What is Phishing
    • What is CSRF
    • DNS Amplification Attack
    • Denial of Service Attack
  • Algorithm
    • IDEA Algorithm
    • MD5 Algorithm
    • Symmetric Algorithms
    • Diffie Hellman Key Exchange Algorithm
    • Digital Signature Algorithm
    • Encryption Algorithm
    • Advanced Encryption Standard
    • Asymmetric Encryption
    • ElGamal Encryption
    • HMAC
    • DES Algorithm
    • Brute Force Algorithm
    • SHA Algorithm
    • RSA Algorithm
    • What is Digital Certificate?
    • Certificate Revocation
    • RC5
  • Encryption/ Decryption
    • Encryption process
    • Public Key Encryption
    • Symmetric Key Encryption
    • What is Encryption
    • What is Decryption
    • Types of Cipher
    • Transposition Techniques
    • What is Steganography
    • One Time Pad
    • Steganography Techniques
  • Hosting
    • Types of Web Hosting
    • Free Web Hosting Sites
    • What is Hosting
    • What is VPS Hosting
    • What is Web Hosting
    • Types of Domain
    • VPN Applications for PC
    • Why we use VPN?
    • What is Virtual Host?
  • Firewalls
    • What is a Firewall?
    • Types of Firewalls
    • Firewall Devices
    • Firewall Uses
  • Advanced
    • Cryptosystems
    • Configuring DHCP Server
    • Block Cipher modes of Operation
    • TCP/IP Model
    • Types of Network
    • Types of Network Devices
    • Types of Network Topology
    • Types of Intrusion Prevention System
    • Types of Proxy Servers
    • Types of Websites
    • Types of NAT 
    • Mobile IP
    • Career in Automobile Design
    • What is TFS
    • What is NAT
    • What is OSI Model
    • Data Link Layer OSI Model
    • What is Cross Site Scripting
    • Applications of Sensors
    • ARP Packet Format
    • Asymmetric Information
    • Autoencoders
    • What is FTP Server?
    • IPS Tools
    • IPv4 Header Format
    • IPv6 Header Format
    • Authentication Header
    • Kerberos
    • Network Mapper
    • Network Scanning Tools
    • Network Mapping Tools
    • Network Access Control
    • Vulnerability Assessment Tools
    • Network Sniffer
    • Networking Commands
    • Networking Devices
    • Networking Strategies
    • Digital Certificate
    • What is a Digital Signature?
    • Digital Signature Softwares
    • Digital Signature Types
    • Digital Signature vs Digital Certificate
    • PKCS
    • What is FTP
    • FTP Commands
    • What is MIME?
    • What is Smart Card?
    • Networking Ports
    • Mutual Authentication
    • Password Authentication
    • Data Masking 
    • Authentication Tokens
    • Biometric Authentication
    • What is IP?
    • IPSec
    • Secure Electronic Transaction
    • What is CIDR
    • Static Binding and Dynamic Binding
    • What is SSL
    • PKIX
    • Public Key Infrastructure
    • What is Wireshark
    • Daisy Chain Topology
    • Markov Logic Network
    • Security engineering
    • SNMP Monitoring Tools
    • Network Analysis Tools
    • Server Monitoring Tools
    • Network Discovery Tools
    • Network Management Tool
    • SIEM Tools
    • OSINT Tools
    • Multiple Ping Tool
  • Interview Questions
    • Network Security Interview Questions
    • Networking Interview Questions
    • EIGRP Interview Questions

Related Courses

CDN Training

OSPF Certification Training

Penetration Training Course

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Cyber Security Training (12 Courses, 3 Projects) Learn More