TFTP not working?


Hoping someone can shed some light on this for me - I am testing a fresh install of FreePBX with the Schmoozecom iso, and can not seem to get tftp working (or I am really doing something wrong…). I am running it in a VM on VMWare Fusion on a mac host, I can get to the web configs, I set up 2 extensions, and loaded some Cisco firmware in the tftpboot directory, but when I set the phone to look at that server it will not pull anything from tftp. I am not sure how to test if tftp is running, can someone please assist? I am trying to upgrade from Trixbox with asterisk 1.4 to use the new Cisco firmware and phones which use SIP over TCP.



If the server can’t ping the phones it won’t work.

Certainly that’s a reason to upgrade but since trixbox is abandoned, unsupported and one accidental yum away from breaking would you rather not be on a platform going forward and not in a death spiral?

Scott, I want to upgrade primarily to support SIP over TCP because we want to use some of the CIsco 6900 and 8900 phones. That’s really my big reason to upgrade. Correct, I could tftp the box itself ok. I will try the same vlan tonight and let you know.

THanks again for all the help/advice.

Tonight I am going to try again and put the phones and server in the same vlan to simplify things. As far as I can see, there’s no reason not to have them all together. I will post results tonight. fingers crossed…thanks for all your help and patience with me!

discko is right this is a networking issue.

trixbox did not use the OS tftp, they used atftpd, the log file was /var/log/atftpd.log

You can change the log file location of tftp in the xinet file just like you could in trixbox.

What’s wrong with only using trixbox? It’s not that something is wrong it’s that it was not a distro, it was a fork. And a lousy one as they screwed everything up including the users. It’s not a wide spectrum of experience. “all” and I am sure I am forgetting some, of the other distro’s (PBX in a Flash, Elasix, Asterisk Now) use the native tftp package in Linux and not atftpd.

I am sure if you ran tftp on the box to itself it would work. Here is an example session, I just grabbed a file in my home directory. The first two commands show you where I am and that the directory was empty to start.

[[email protected] scott]# pwd
[[email protected] scott]# ls
[[email protected] scott]# tftp
tftp> get aastra.cfg
tftp> quit
[[email protected] scott]# ls
[[email protected] scott]#
[[email protected] scott]#

If you are using vlan’s then your eth0.n address space must be reflected in your dhcp and tftpd servers configurations, You will need to correctly identify the vlan’s they are listening on.

Something at is connecting, but it is not asking for any files. you will need to configure your phones correctly.

I tried all that and can’t get it working for some reason or another…yes, it is true I have never used another distro in production other than trixbox, perhaps my “all other distros” comment was not correct. Is it a bad thing that I’ve “only used Trixbox”? I just put my old tb server back in production and every phone came up with no problem. I guess I will have to compare configs from this to the new one. Nothing I seem to do makes any difference, phones all timeout with tftp, and nothing registers, regardless of settings.

I appreciate all the help so far but I seem to still be missing something really simple. I copied the tftpboot directory file for file but that didn’t help either.

I can put all the phones and server on one vlan if it would help. Right now the phones are and the server is at I would point to that as part of the issue, but again tb works fine with that setup.

Did you install and configure TFTP on the server? What is in the file /etc/xinetd.d/tftp?

What does the following command return?

rpm -q tftp-server

You can try to tftp a file. Do you have the tftp client installed on the server?

One more thing to try is to use Google to search for “Centos tftp” This might provide you with some info on how to setup and run a TFTP server.

Also, I assume you are not going to run the VMware environment in production?

One little note you can download the FreePBX bulk DID module from and install it on the trixbox using the module admin. Then you can export to the new install.

Also you can use the scp command line utility to move all the VM’s and greetings once you have the extensions and users created.

I am thinking it may be a NAT Issue with the VM and the way it handles networking - For now I have our DHCP server sending the TFTP address so I loaded the 9.3 SIP firmware to the production server, as well as the SEPMAC.cnf.xml file for the phone. It pulled down the firmware OK, and loaded the xml file ok as well. However it sits and says Registering, but nothing ever registers. I have NAT=Never in the extension, and transport=TCP in the extension as well. Is there something else I need to set somewhere? This is my first foray into the world of TCP SIP phones, and I’d like to get it working since I really need to move from Trixbox. I like the Freepbx/schmoozecom distro so far, and it does support SIP over TCP if I’m not mistaken, so Id like to try and get it working (especially as all newer Cisco SIP loads use TCP).

Can anyone shed light on the registration issue? I can post the xml file later if that will help, but I am using the same XML file that worked on the older cisco phones (non TCP).

Scott - no, I will not be using the VM in production, it will go on a dedicated box. Just wanted to test the new feature set with the new phone loads.

THanks again all.


By the way, I can SFTP to the server and dump files in the TFTPBOOT foler but there is no atftpd.log file in the logs folder.

Googling CentOS TFTP did not reveal any useful information other than looking at the xinetd.d/tftp file, which is identical to the production server (other than the new IP).

the rpm is showing as being there.

add the -s to server_args in /etc/xinetd.d/tftp to get logging.

    server_args             = -v -s /tftpboot

Restart xinitd with the following

service xinitd restart

Slight correction suggested:-

add the -vvv to server_args in /etc/xinetd.d/tftp to get quite verbose logging. (in /var/log/messages ) add the -s too as that will prepend /tftpboot to any tftpd requested files.


tailf /var/log/messages|grep -i tftp

to see why it’s broken.

Still nothing - I have done a completely fresh install on a new server (dedicated) and again have no tftp service. I can use a client (Cyberduck), to copy files to the /tftpboot directory, but there is no /var/log/tftpd.log file to speak of, I am stumped.

Take a look:

[[email protected] tftpboot]# tail /etc/xinetd.d/tftp
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4

[[email protected] tftpboot]# nmap -sU localhost

Starting Nmap 4.11 ( ) at 2012-09-18 23:48 EDT
Interesting ports on freepbx.local (
Not shown: 1480 closed ports
53/udp open|filtered domain
69/udp open|filtered tftp
111/udp open|filtered rpcbind
123/udp open|filtered ntp
670/udp open|filtered unknown
673/udp open|filtered unknown
5060/udp open|filtered sip

Nmap finished: 1 IP address (1 host up) scanned in 1.468 seconds

[[email protected] ~]# tail -f /var/log/tftpd.log
tail: cannot open `/var/log/tftpd.log’ for reading: No such file or directory
tail: no files remaining

[[email protected] tftpboot]# rpm -qa |grep -i tftp
[[email protected] tftpboot]# yum install tftp-server
Loaded plugins: fastestmirror, kmod
Loading mirror speeds from cached hostfile
Setting up Install Process
Package tftp-server-0.49-2.el5.centos.i386 already installed and latest version
Nothing to do

Here are the permissions of the /tftpboot directory:

drwxr-xr-x 6 asterisk asterisk 12288 Sep 18 23:29 tftpboot

Once again with feeling add -vv to your server_args, this will increase the verbosity by two levels above “none” and the logs will appear in /var/log/messages not, as you have done, by not adding -vv and looking in the wrong file, also tail will, by default, print the last 10 lines of a file, you could better use cat to read the whole file.

Added -vv to this newest fresh install, look in /var/log/messages for anything tftp related - nothing there. Rebooted 2 phones that should now ask for their files, they do, but dont get them, and then fail to register.

Why is there no /var/log/tftpd.log file? That is the file to look in every other distro I’ve used. Is this just something in the freepbx distro that they append all the tftp messages to the /log/messages file?

Forgive my ignorance, and please have a little more patience with me, this is a fresh install, not the one I initially posted about.

FYI: This log was taken at Sept, 19, 12:56AM.

[[email protected] ~]# cat /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -vv -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }

and the messages log:

[[email protected] ~]# grep tftp /var/log/messages
Sep 18 22:48:55 freepbx xinetd[2616]: START: tftp pid=2925 from=
Sep 18 22:58:50 freepbx xinetd[2636]: START: tftp pid=3563 from=
Sep 18 23:43:47 freepbx xinetd[5214]: START: tftp pid=5306 from=
Sep 19 00:12:40 freepbx xinetd[11303]: START: tftp pid=11413 from=
Sep 19 00:18:22 freepbx xinetd[2641]: START: tftp pid=3714 from=
Sep 19 00:19:52 freepbx yum: Installed: tftp-0.49-2.el5.centos.i386
[[email protected] ~]#

I might add that the phone is reporting TFTP timeouts…

6:56:19p TFTP Timeout : ram/SEP0022555EF31D.cnf.xml 6:56:19p TFTP Timeout : SEP0022555EF31D.cnf.xml 6:56:19p DNS Timeout ccm-beta-5-1 6:56:46p TFTP Error : dialplan.xml

Ignore the timestamp, it is wrong on the phone until it registers.

The tftpd.log hasn’t been there in a while and was probably only in there for trixbox. Please stop saying “every other distro” we all know you’ve only used Trixbox and FreePBX and the FreePBX distro has never had tftp installed.