tftp server timeout problem CentOS5.5 Linux

Posted on 2010-09-09
Medium Priority
Last Modified: 2013-12-16
I want to setup PXE boot using tftp.  Well, TFTP never worked.  There are two computer connected by a switch.  DHCP seems to be working fine.  I used net.  Server has IP and client has IP of  I was constantly getting TFTP TIMEOUT error message.  I started looking at /var/log/messages and found the following:

Sep  9 18:24:59 localhost in.tftpd[6372]: tftpd: read(ack): No route to host
Sep  9 18:25:04 localhost in.tftpd[6373]: tftpd: read(ack): No route to host

I added the following route
route -add netmask gw

Noting works for me
Here is the routing table.

[root@localhost ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   UG    0      0        0 eth0   U     0      0        0 eth0   U     0      0        0 virbr0     U     0      0        0 eth0

What do I need to do?  I thought that if you were in the same subnet you didn't need a gateway.  What am I not thinking right?
Question by:farzanj
  • 4
  • 2
  • 2
LVL 13

Accepted Solution

WizRd-Linux earned 1600 total points
ID: 33642562
You do not need the route entry so this can be deleted, you only need a route if the computer you are trying to connect to is outside of your subnet.

If you are able to ping this indicates that you have connectivity, can you post the output of:

iptables -nvL

just to make sure your not blocking udp or anything like that?
LVL 31

Author Comment

ID: 33642575
Sorry, forgot to tell you that I disabled IPTABLES AND SELINUX.
LVL 13

Assisted Solution

WizRd-Linux earned 1600 total points
ID: 33642610
Are you able to ping between them?

The computer that has the TFTP server can you post the output of netstat -al | grep tftp and the ifconfig of both machines please.
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

LVL 81

Assisted Solution

arnold earned 400 total points
ID: 33644183
Does your DHCP server set the bootp option 66,67,68 that deals with which server/file it should request via TFTP to load?

The below is more on point for you and seems to deal with a different set of DHCP options.

can you run

ls -l /etc/tftpboot
add a file there test.txt

then run tftp server:/test.txt
or tftp server
get test.txt
What happens?
LVL 31

Author Comment

ID: 33646363
Dear WizRd-Linux:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:F1:FB:83:E1  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::20c:f1ff:fefb:83e1/64 Scope:Link
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:7924 (7.7 KiB)

# netstat -al | grep tftp
udp        0      0 *:tftp                      *:*


eth0      Link encap:Ethernet  HWaddr F4:CE:46:84:3C:D0  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::f6ce:46ff:fe84:3cd0/64 Scope:Link
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:64 (64.0 b)
          Interrupt:138 Memory:f8000000-f8012800
netstat -al | grep tftp
LVL 31

Author Comment

ID: 33646429
Hi arnold:

I have not set bootp at all, just trying DHCP.

There is not file /etc/tftpboot. However I do have the following
# ls -ld /tftpboot/
drwxr-xr-x 4 root root 4096 Sep  9 10:13 /tftpboot

# ls -l /tftpboot/
total 40
-rw-r--r-- 1 root root     0 Sep  9 17:20 boot.msg
drwxr-xr-x 2 root root  4096 Sep  9 12:21 centos5.5
-rw-r--r-- 1 root root 13148 Sep  8 16:00 pxelinux.0
drwxr-xr-x 2 root root  4096 Sep  9 12:51 pxelinux.cfg

When I did
tftp localhost -c get boot.msg

It worked fine and I received the file without a problem

LVL 81

Assisted Solution

arnold earned 400 total points
ID: 33648290
now try the same from the other system

tftp -c get pxelinux.cfg
boot.msg is a zero length file so tried the other.

Are you getting any tftp errors when you try this?

LVL 31

Author Closing Comment

ID: 33650062
Thank you guys.  I think I figured it out.  I had multiple problem, I did have client firewall enabled after reboot.  DHCP had an error in it too.

I appreciate your time.  I passed this phase but still have problems that I would post shortly.

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question