[Ilugc] How to execute tftp to transfer file(s)

  • From: girish1729@xxxxxxxxx (Girish Venkatachalam)
  • Date: Tue Sep 19 15:40:31 2006

On Tue, Sep 19, 2006 at 02:58:09PM +0530, Deepak wrote:
|Hi,
|I need to transfer some files from remote PC using tftp (don't want to 
|use rsync/ftp/scp or more).
|I have enabled tftp in both PCs using 'ntsysv' and making "disable=no" 
|in /etc/xinetd.d/tftp file.
|Both PCs are reachable. But tftp is not working as i followed simple 
|syntax given in man page.
|
|Do i need to start any service? I tried 'service in.tftpd status' but it 
|is displaying error: Unrecognized servce.
|Pls reply the following queries:
Any particular reason why you want to use tftp? It is the stupidest protocol I 
have come across as it is a simple stop and wait protocol that does not even 
work properly sometimes across devices on the same LAN or thro' serial lines. 

Its rexmit mechanims and error detection mechanisms are all very very 
unsuitable for common use. 

Moreover being a UDP protocol, reliability is not guaranteed. Just try pingint 
your other remote machine and observe how many packets get lost due to timeout 
and various other reasons. Do you think tftp shud be different? Of course it 
will rexmit and if you are lucky you will get what you want.

I say, why torture yourself when you have so many other options?

I normally use scp. If you dont want that you can run a simple httpd server at 
the remote end using yaws or thttpd. Sorry , I know this is not what you want 
but I thought you changed ur mind after reading my mail? :-)
|i)  How can I use tftp?
Maybe your tftp files dir is not created or something, check the logs. You are 
better off using nc to check whether something is listening at UDP port 69 at 
the other end. You can also use nmap of course.
|ii) What is the maximum file size i can transfer?
Don't know. Normally tftp is used for downloading firmware. I guess there might 
not be a limit, but I might be wrong. I faintly remember there is a limit. As I 
told you embedded device with restrained mem and cpu use tftp since it is 
simple to deploy and just works in an error free environment. 

This is extracted from my OpenBSD tftpd man page.

<cut>
BUGS
     This implementation of tftpd does not support blocksize negotiation (RFC
      1783), so files larger than 33488896 octets (65535 blocks) cannot be
          transferred.

      Many TFTP clients will not transfer files over 16744448 octets (32767
           blocks).

<cut>

Octet is nothing but a byte.

Using it across the Internet is certainly not a good idea.
|iii) Any idea, How this mechanism works in UDP?
I didnt understand the question.
|iv) Some more practical inputs/usage/links/limitations.
I have given enuf above. :-)
|v) Any information about transfer speed and System load?
It uses a very simple flow control mechanism called stop and wait. No, it 
hardly causes any load on the system.

So I guess transfer speed is suboptimal as you have no concept of windows like 
TCP in which you can pipeline sends without receiving ACKs.

It just rexmits for I think five times if a packet gets lost. 

It has no user auth mechanism though you are somewhat safe since nobody can 
normally clobber your files. Everyone can read it however.

Best,
Girish

-- 
Whenever people agree with me I always feel I am wrong.

    - Oscar Wilde

Other related posts: