LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-27-2013, 10:12 AM   #1
vasis
LQ Newbie
 
Registered: Jul 2013
Posts: 7

Rep: Reputation: Disabled
TFTP Server: cannot get atftpd to work over the LAN


Hello All,

I run Debian 7.1 (wheezy) on my server and I am trying to set up a TFTP server in order to transfer some config files from a Cisco device I'm playing with recently.

I have installed atftpd as my TFTP server software and I changed the config file (/etc/default/atftpd) to look like this:

Code:
USE_INETD=false
OPTIONS="--tftpd-timeout 300 --no-blksize --retry-timeout 5 --mcast-port 1758 --bind-address 192.168.0.100 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /media/md1_storage/tftp"
I created the above directory with the following permissions:

Code:
...md1_storage$ ls -la
drwxrwxrwx  3 nobody  nogroup  4096 Oct 27 13:13 tftp
In order to test my TFTP server I also installed atftp as my client and I tested it with both 'put' and 'get' and I transfered/received the test files as expected. The logs were clean with no errors and the files in the correct TFTP directory with their contents. And that was locally.

However, transfer over the LAN gets a bit weird... I installed atftp on my laptop which runs Ubuntu 12.04 in order to give it a go before doing it from the Cisco device. Here is the result:

Client (laptop):

Code:
tftp> status
Connected:  192.168.0.100 port 69
Mode:       octet
Verbose:    on
Trace:      on
Options
 tsize:     enabled
 blksize:   enabled
 timeout:   enabled
 multicast: enabled
mtftp variables
 client-port:   76
 mcast-ip:      0.0.0.0
 listen-delay:  2
 timeout-delay: 2
Last command: trace
tftp> put test.pl 
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
timeout: retrying...
tftp: aborting
tftp>
Server Logs:

Code:
Oct 27 13:13:11 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:13:15 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:13:20 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:13:25 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:13:30 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:13:35 helios atftpd[2146]: Fetching from 192.168.0.249 to test.pl
The TFTP directory on the server looks like this:

Code:
ls -la /media/md1_storage/tftp/
drwxrwxrwx  3 nobody nogroup   4096 Oct 27 13:51 .
drwxr-xr-x 11 root   root      4096 Oct 25 13:53 ..
-rw-r--r--  1 nobody nogroup      0 Oct 27 13:51 test.pl
I can see the file, but it's empty!

Moving on, I thought that I could get this thing working by disabling ufw on my Ubuntu client. Now this is what I get:

Client:

Code:
tftp> put test.pl 
sent WRQ <file: test.pl, mode: octet <timeout: 300, blksize: disabled>>
tftp: error received from server <Failure to negotiate RFC1782 options>
tftp: aborting
tftp> mode netascii 
tftp> put test.pl 
sent WRQ <file: test.pl, mode: netascii <timeout: 300, blksize: disabled>>
tftp: error received from server <Failure to negotiate RFC1782 options>
tftp: aborting
tftp>
Server Logs:

Code:
Oct 27 13:57:47 helios atftpd[6602]: Fetching from 192.168.0.249 to test.pl
Oct 27 13:58:04 helios atftpd[6602]: Fetching from 192.168.0.249 to test.pl
The only difference I can see is that there are no retries (two line in the log, one for each attempt)...

I checked the RFC but I do not see how could I change the options on the client. The 'option' argument of the atftp client sets set RFC1350 options, not RFC1782 options, which is what the error indicates.

Can anyone see what is that I have missed? Thank you in advance!
 
Old 10-27-2013, 04:18 PM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,197

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
Does the client machine support scp (with keys) ?
 
Old 10-28-2013, 06:08 PM   #3
vasis
LQ Newbie
 
Registered: Jul 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hello,

Thanks for your reply.

Yes ofc it supports scp, rsync and all the rest... I also have SFTP working on the same server without any issues! However, the ultimate goal is to transfer files between the server and the Cisco device. So TFTP is my only option.

Any ideas? Thank you in advance!
 
Old 03-02-2014, 10:29 AM   #4
vasis
LQ Newbie
 
Registered: Jul 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
I got back to this after a while. I think I fixed the issue and I thought I should post it here in case someone else has similar problems...

The client assumes a block size but in the server config I had "--no-blksize". After reading the post again, I found the client logs a bit suspicious where it says "blksize: enable":

Code:
...
tftp> put test.pl 
sent WRQ <file: test.pl, mode: octet <tsize: 237, timeout: enable, blksize: enable, multicast: enable>>
...
I can see the test.pl file with its contents now. I might post back when I substitute the Ubuntu client with the Cisco PIX, if there is any problem. Solved for now!

Last edited by vasis; 03-02-2014 at 11:43 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
atftpd (v0.7) - tftp server on ubuntu. vrode Linux - Networking 1 12-12-2012 09:48 AM
tftp server on fedora does not work cricballa Linux - Server 2 12-04-2009 12:37 AM
Don't work tftp server msthing Linux - Enterprise 8 06-01-2008 09:21 PM
after re-create tftp dir, tftp doesn't work anymore lastguy Linux - Networking 2 11-16-2007 04:33 PM
RH 9 : Enable My LAN to Access TFTP Server Using NAT mr13stu Linux - Networking 0 02-19-2004 04:14 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration