cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2734
Views
5
Helpful
6
Replies

Using TFTP for file download

ranga2002
Level 1
Level 1

Hi All,

 

In most of the Cisco devices, we load IOS images from TFTP servers. Provided that TFTP is UDP, an unreliable protocol there is a chance we miss some packets during the file transfer and encounter checksum-related issues.

 

My question is why people prefer to use this unreliable TFTP to download files?

 

Thanks,

 

1 Accepted Solution

Accepted Solutions

I have several observations:

- yes the tftp protocol itself as a UDP protocol does not have a reliability mechanism. Interestingly the Cisco implementation of tftp for copying to/from a Cisco device does have a mechanism to check for packet delivery and if a packet were to be dropped the Cisco tftp would detect this and generate an error.

- The original post asks this question "why people prefer to use this unreliable TFTP to download files?" I believe that there are several possible answers

+ tftp is a more simple protocol as compared to ftp etc and especially in the early days the lower overhead was attractive.

+ tftp requires less memory than ftp which in the early days was attractive.

+ the files being transmitted were generally pretty small which reduces the opportunity for errors and makes recovery from error pretty easy.

+ tftp was generally regarded as "good enough". It frequently ran in environment where packet loss was rare and if there was a problem it was easy enough to run it again. If failure is rare and recovery is easy then why would you want a more complicated protocol?

 

Many people do continue to use tftp and I agree that "habit" is likely a major part of why this continues. I also observe that in modern networking devices performance is much better, memory is much less of an issue, file sizes are larger, and now packet drops are more common (especially over WAN connections) and so many of us are preferring to use more reliable, and sometimes faster, protocols like ftp.

HTH

Rick

View solution in original post

6 Replies 6

Exonix
Level 1
Level 1

Hi,

because file transfer is not a very important task and does not require "reliability".

If you want you can use SFTP (link) but you have to pay attention, that it will consume more performance, for example, for encrypting traffic.

Joseph W. Doherty
Hall of Fame
Hall of Fame

UDP is unreliable but TFTP is not unreliable.

The problem with TFTP is it doesn't "window" data transmissions, it's slows as end-to-end latency increases.

FTP, on the other hand, in theory, can maintain "wire speed" even when there's high latency.

TFTP is often still used, because on "local" connections it's, more-or-less, just as fast and reliable as FTP.  Yet, both it's server and client are "smaller".

However, I've often seen network engineer continue to use it across WANs where something based on TCP, like FTP, would be much, much faster.  This, I suspect, it more due to "habit".

BTW, in ye olden times, many Cisco platforms didn't support FTP, but they supported TFTP.

I have several observations:

- yes the tftp protocol itself as a UDP protocol does not have a reliability mechanism. Interestingly the Cisco implementation of tftp for copying to/from a Cisco device does have a mechanism to check for packet delivery and if a packet were to be dropped the Cisco tftp would detect this and generate an error.

- The original post asks this question "why people prefer to use this unreliable TFTP to download files?" I believe that there are several possible answers

+ tftp is a more simple protocol as compared to ftp etc and especially in the early days the lower overhead was attractive.

+ tftp requires less memory than ftp which in the early days was attractive.

+ the files being transmitted were generally pretty small which reduces the opportunity for errors and makes recovery from error pretty easy.

+ tftp was generally regarded as "good enough". It frequently ran in environment where packet loss was rare and if there was a problem it was easy enough to run it again. If failure is rare and recovery is easy then why would you want a more complicated protocol?

 

Many people do continue to use tftp and I agree that "habit" is likely a major part of why this continues. I also observe that in modern networking devices performance is much better, memory is much less of an issue, file sizes are larger, and now packet drops are more common (especially over WAN connections) and so many of us are preferring to use more reliable, and sometimes faster, protocols like ftp.

HTH

Rick

"yes the tftp protocol itself as a UDP protocol does not have a reliability mechanism. Interestingly the Cisco implementation of tftp for copying to/from a Cisco device does have a mechanism to check for packet delivery and if a packet were to be dropped the Cisco tftp would detect this and generate an error."

BTW, my understanding of TFTP, as documented in rfc1350, is that it does appear to define reliability mechanisms.  Blocks are numbered and ACKed.  Timeouts and re-transmissions can occur.  Data transfers can "error" out.

Interestingly, although TFTP expects to be used on UDP, the RFC also notes it can run over other datagram protocols.

What I believe is unique to the implementation, such as Cisco's, is how many errors to allow before giving up.

Of course, any application using UDP needs to provides its own transmission assurance methods (beyond bit changes to the packet), if desired, as UDP does not.

Also BTW, because of the slowness of TFTP on high latency paths (e.g. WANs), before Cisco devices supported FTP, they also sometimes supported RCP, which is also based on TCP.  I recall being one of the few that bothered using RCP (for "fast" WAN file transfers between Cisco devices).

Again, regarding file transmission reliability, I see no real difference between TFTP using UDP and FTP using TCP.  TFTP provides the data transfer reliability features UDP does not while TCP provides data transfer reliability so that FTP does not.  The forgoing, though, does not exclude all the other pluses and minuses of TFTP/UDP vs. FTP/TCP or others.

You are welcome. I am glad that our explanations have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

ranga2002
Level 1
Level 1

Thank you Joseph and Richard.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco