TFTP and FTP

Hi,

TFTP is just a connectionless version of FTP that uses UDP for reducing the overhead and increasing the reliability. Why does TFTP does not require 2 ports ? How does TFTP manage to do the activities done by FTP with only

1 port ?

That is, FTP (TCP based) use two ports (Port 20 and Port 21). Port 20 - For Data Stream . (data) Port 21 - For Control Stream (commands between FTP server and client) TFTP (UDP based) use only one port(Port 69) . Why ?

Thx in advans, Karthik Balaguru

Reply to
karthikbalaguru
Loading thread data ...

I love your scatter gun questioning. Sometimes well thought out, researched and insightful. Sometimes lazy. It has been asked before, but how many people are posting under the name Karthik Balaguru? Are you also responsible for doubling the traffic on the comp.sys.arm group?

Back to the point:

formatting link

--
Regards,
Richard.

+ http://www.FreeRTOS.org
14 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

Or perhaps

formatting link

;)

Maybe it's a whole bunch of wannabes trying to get their homework done ;)

pete

--
pete@fenelon.com "irk the purists - if you've never then you ought."
Reply to
Pete Fenelon

Yep, and using the same name, just to make sure. :--}

--
The most powerful Usenet tool you have ever heard of.
NewsMaestro v. 4.0.7 has been released.

* Bug fixes and improvements.

Note: In some previous releases some class files were missing.
As a result, the program would not run.
Sorry for the inconvenience.

Web page:
http://newsmaestro.sourceforge.net/

Download page:
http://newsmaestro.sourceforge.net/Download_Information.htm

Send any feedback, ideas, suggestions, test results to
newsmaestroinfo \at/ mail.ru.

Your personal info will not be released and your privacy
will be honored.
Reply to
Almond

Thx for that info Richard. The links were really useful and i walked through the RFC documents & Internet. Interesting :):)

I have collected some info from those links that i have shared here :

TFTP ===== TFTP uses a stop-and-wait-protocol (one connection). Maximum Packet size is 512 bytes. It sends 512 bytes and wait for the ack. Each data packet contains one block of data, and must be acknowledged by an acknowledgment packet before the next packet can be sent It has application based ACK. This slow back and forth process causes it to be slow.

Any transfer begins with a request to read or write a file, which also serves to request a connection. If the server grants the request, the connection is opened and the file is sent in fixed length blocks of 512 bytes.

  • TFTP supports five types of packets : opcode operation 1 Read request (RRQ) 2 Write request (WRQ) 3 Data (DATA) 4 Acknowledgment (ACK) 5 Error (ERROR)

FTP ===== FTP uses out-of-band control, which means it uses a separate connection for control and data FTP uses sliding windows and bigger packets. (2 connections) So FTP is faster.

The protocol requires that the control connections be open while data transfer is in progress. It is the responsibility of the user to request the closing of the control connections when finished using the FTP service, while it is the server who takes the action. The server may abort data transfer if the control connections are closed without command.

control connection The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol.

data connection A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be a part of a file, an entire file or a number of files. The path may be between a server-DTP and a user-DTP, or between two server-DTPs.

The control connection follows the Telnet protocol. At the initiation of the user, standard FTP commands are generated by the user-PI and transmitted to the server process via the control connection. (The user may establish a direct control connection to the server-FTP, from a TAC terminal for example, and generate standard FTP commands independently, bypassing the user-FTP process.) Standard replies are sent from the server-PI to the user-PI over the control connection in response to the commands.

The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.). The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters. It should be noted that the data port need not be in the same host that initiates the FTP commands via the control connection, but the user or the user-FTP process must ensure a "listen" on the specified data port. It ought to also be noted that the data connection may be used for simultaneous sending and receiving.

Interesting to find that FTP has vast features and hence designed like in that manner.

I came across the below info too which i suspect is not possible with TFTP !!!

A user might wish to transfer files between two hosts, neither of which is a local host. The user sets up control connections to the two servers and then arranges for a data connection between them. In this manner, control information is passed to the user-PI but data is transferred between the server data transfer processes. Following is a model of this server-server interaction.

Control ------------ Control ---------->| User-FTP |

Reply to
karthikbalaguru

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.