LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-12-2011, 08:32 AM   #1
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Rep: Reputation: 0
using tftp - can't get image, but can ping both ways


I have created a /tftpboot directory and chmod it to 777.
I have put an image 'uImage' on my Debian box under /tftpboot

In directory /etc/xinetd.d/ I have created file tftp:

Service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = /tftpboot
log_type = SYSLOG daemon info
log_on_failure = HOST
log_on _success = HOST
}

I restart tftp server with:

/etc/init.d/xinetd restart


Now I can ping the debian box from my pc and vice versa.
Now when I try to do an ftp:

tftp 192.168.2.211 GET uImage

I keep geting timeouts although uImage is on the debian box and it appears the tftp server is running.
 
Old 04-12-2011, 10:18 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,860
Blog Entries: 36

Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Is the firewall blocking it?

Try on the server.
Code:
tftp 127.0.0.1 GET uImage
If that works then it is likely a firewall issue.

Last edited by sag47; 04-12-2011 at 10:21 AM.
 
Old 04-12-2011, 11:06 AM   #3
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sag47 View Post
Is the firewall blocking it?

Try on the server.
Code:
tftp 127.0.0.1 GET uImage
If that works then it is likely a firewall issue.
Started tftp. Typed connect 127.0.0.1 - seemed to connect ok.
The get uImage call got Transfer Timed out response.
 
Old 04-12-2011, 01:01 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Is the tftp server actually installed? The connect command does not actually create a connection.
What distribution are you running?
 
Old 04-12-2011, 01:07 PM   #5
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Is the tftp server actually installed? The connect command does not actually create a connection.
What distribution are you running?
I'n running Debian.I think tftp is installed as I can start it with

>tftp
from the tftp prompt connect successfully and then the get fails with timeout.

cheers
 
Old 04-12-2011, 01:34 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Does /usr/sbin/in.tftpd exist?
tftp is the client, in.tftpd is the server. The connect command only saves the hostname it does not actually create a connection.

In a nutshell when xinetd detects a packet on port 69 it will launch the server tftpd. The client is not detecting anything from the server and so times out.

Last edited by michaelk; 04-12-2011 at 01:42 PM.
 
1 members found this post helpful.
Old 04-13-2011, 06:28 AM   #7
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
ok, thanks MichaelK,
getting further now.
the file in.tftpd now exists.

Now on the linux box I can do 'tftp'.
I can connect to 127.0.0.1
I do the get uImage. It waits for a while before coming back with a 'Transfer Timed out' message.
uImage is definitley there in /tftpboot. I also get the same error if I try and do a non existent file.

If I go to a dos prompt on another pc and do an ftp then connect to the linux box I get weird errors about:

Can't exec "/usr/sbin/pure-ftpd": No such file or directory at /usr/sbin/pure-ft
pd-wrapper line 174.
/usr/sbin/pure-ftpd-wrapper: Cannot exec /usr/sbin/pure-ftpd: No such file or di
rectory at /usr/sbin/pure-ftpd-wrapper line 174.
Connection closed by remote host.


Not sure these are relevant but it does mean maybe that I will have issues doing an ftp

Last edited by adetheheat; 04-13-2011 at 06:30 AM.
 
Old 04-13-2011, 07:04 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Change the server_args to the following
Quote:
server_args = -s /tftpboot
 
Old 04-13-2011, 07:20 AM   #9
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
Same problem. What I'm doing is
1. #tftp
2. >connect 127.0.0.1
3. >get uImage
 
Old 04-14-2011, 05:08 AM   #10
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
anyone ? ftp not working on my pc
 
Old 04-14-2011, 08:30 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Lets get tftp working and then we can worry about ftp.
What are the permissions of /tftpboot and uImage?
 
Old 04-14-2011, 08:40 AM   #12
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
firsly thanks for your help Michael,
permissions on /tftboot 777 and uImage is 644 ie it has read access for everyone.
Aside: I was unaware that ftp and tftp were different tools. I'm using tftp as you know.
 
Old 04-14-2011, 08:58 AM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Try turning on trace and verbose to help. These are tftp commands.
So
1. #tftp
2. >connect 127.0.0.1
3. >trace
4. >verbose
5. >get uImage
Post any debug infomation.
 
Old 04-14-2011, 09:15 AM   #14
adetheheat
Member
 
Registered: Jun 2010
Posts: 49

Original Poster
Rep: Reputation: 0
getting from 127.0.0.1:uimage to uimage
sent RRQ <file=uimage, mode=netascii>
sent RRQ <file=uimage, mode=netascii>
sent RRQ <file=uimage, mode=netascii>
sent RRQ <file=uimage, mode=netascii>
Transfer timed out
 
Old 04-14-2011, 08:31 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,215

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
The client is not getting a response from the server. Make sure that xinetd is running. Is there any thing in the /etc/hosts.deny file?
 
  


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
PXE, DHCP, TFTP, Working - Bootable image not!?!? almcneill Linux - Networking 4 07-25-2008 04:06 PM
tftp issue, unable to transfer kernel image using tftp to boot ltsp-client noobs4linux Linux - Networking 1 02-07-2007 02:53 AM
boot kernel image through tftp muleypr *BSD 0 01-01-2007 05:26 AM
Can a TFTP image do the following? scoldog Linux - Networking 3 11-29-2006 07:55 PM
ways to log command 'ping' 'telnet' noelcantona Programming 3 09-28-2003 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration