TFTP issues

I am using TFTP to load config inf for my Aastra 55i phones on the FreePBX 2.4 Server (pbxinaflash 1.3).
My Aastra phones do no seem to ‘see’ the tftp on the server. I have changed the aastra.cfg file, but the phone sdo not show updates.

I have wiped local profiles and reset phones to factory defaults. Then I go into the Web-GUi and setup user/pass and tftp info.

Phone registers, but NONE of the settings in the aastra.cfg seem to be ‘sticking’

Is there a way to make sure TFTP is working? I tried a manual update of Aastra Firmware (placed in tftpboot of freepbx server) from the phone’s web interface, and it could not find the file.

Any other hints?

Thanks!

Is your PBX your DHCP server? If not, then you’ll need to do one of three things:

  1. configure your existing DHCP server to pass the correct options to your phones, telling them where to find the tftp server.

  2. manually configure your phones to tell them where to find the tftp server (you would do this in web interface of each phone.)

  3. use Aastra’s auto-provisioning scripts.

Out of the three, the third one is the coolest, the second one is the easiest (but least desirable from a network administration standpoint) and the first may not even be supported by your DHCP server, but (before Aastra made their auto provision scripts available) used to be the “right” way.

HTH.

I started with option 2.
I am testing this on an different network than it will be installed…

I’ll look int the auto-provision for the future, but telling each phone what the TFTP Server is should work just fine for initial testing, right?

I guess I’m wondering how-to test the TFTP server to ensure it is working properly.

I even took all files and changed them to 777 (temporary of course) , just in case it was a permission prob.

Yes, setting the tftp server manually is fine.

Check the tftp log file (which I think is /var/log/atftpboot.log, but that’s from memory) and see if there’s anything in there at all.

Did you create your MAC.cfg files manually? If so, I believe the alpha components of the hex values must be in caps, ie “A0” not “a0”, etc. The log should tell you if the phones are even looking for a file, so check that first and we can go from there.

I just did a generic aastra.cfg file So, there was not a MAC.cfg.
I just made a quick MAC (two in case of case senstivity) … same result.

I see no TFTP Log…

root@pbx-mid:/var/log $ ls -l
total 2136
-rw------- 1 root root 356610 Jul 28 05:41 anaconda.log
-rw------- 1 root root 24990 Jul 28 05:41 anaconda.syslog
drwxrwxr-x 4 asterisk asterisk 4096 Aug 22 04:02 asterisk
drwxr-x— 2 root root 4096 Jul 28 05:42 audit
-rw------- 1 root root 0 Aug 17 04:02 boot.log
-rw------- 1 root root 162 Aug 12 19:20 boot.log.1
-rw------- 1 root root 80 Aug 7 12:36 boot.log.2
-rw------- 1 root root 0 Jul 28 05:42 boot.log.3
-rw------- 1 root utmp 1152 Aug 22 06:26 btmp
drwxr-xr-x 2 root root 4096 Nov 11 2007 conman
drwxr-xr-x 2 root root 4096 Nov 11 2007 conman.old
-rw------- 1 root root 12061 Aug 22 09:01 cron
-rw------- 1 root root 14803 Aug 17 04:02 cron.1
-rw------- 1 root root 14791 Aug 10 04:02 cron.2
-rw------- 1 root root 14565 Aug 3 04:02 cron.3
drwxr-xr-x 2 lp sys 4096 Aug 3 04:02 cups
-rw-r–r-- 1 root root 17799 Aug 22 06:57 dmesg
-rw------- 1 root root 3478 Aug 22 06:27 fail2ban.log
-rw------- 1 root root 2424 Jul 28 05:46 faillog
drwx------ 2 root root 4096 Aug 21 04:02 httpd
-rw-r–r-- 1 root root 29492 Aug 22 09:07 lastlog
drwxr-xr-x 2 root root 4096 Jul 28 05:38 mail
-rw------- 1 root root 110782 Aug 22 06:57 maillog
-rw------- 1 root root 360246 Aug 17 04:02 maillog.1
-rw------- 1 root root 45375 Aug 10 04:02 maillog.2
-rw------- 1 root root 38045 Aug 3 04:02 maillog.3
-rw------- 1 root root 169819 Aug 22 08:58 messages
-rw------- 1 root root 6670 Aug 17 01:35 messages.1
-rw------- 1 root root 7904 Aug 10 02:56 messages.2
-rw------- 1 root root 237281 Aug 3 02:09 messages.3
-rw-r----- 1 mysql mysql 5424 Aug 22 06:57 mysqld.log
-rw-r–r-- 1 root root 345 Jul 29 15:33 passwd-webmin.log
drwxr-xr-x 2 root root 4096 Jul 28 05:40 pm
drwx------ 2 root root 4096 Mar 14 2007 ppp
-rw-r–r-- 1 root root 18607 Aug 22 04:02 rpmpkgs
-rw-r–r-- 1 root root 18607 Aug 16 04:02 rpmpkgs.1
-rw-r–r-- 1 root root 18607 Aug 9 04:02 rpmpkgs.2
-rw-r–r-- 1 root root 18607 Aug 2 04:02 rpmpkgs.3
drwx------ 2 root root 4096 Dec 10 2007 samba
-rw------- 1 root root 7556 Aug 22 09:07 secure
-rw------- 1 root root 0 Aug 10 04:02 secure.1
-rw------- 1 root root 0 Aug 3 04:02 secure.2
-rw------- 1 root root 182990 Jul 29 16:10 secure.3
-rw------- 1 root root 0 Aug 17 04:02 spooler
-rw------- 1 root root 0 Aug 10 04:02 spooler.1
-rw------- 1 root root 0 Aug 3 04:02 spooler.2
-rw------- 1 root root 0 Jul 28 05:38 spooler.3
-rw------- 1 root root 0 Jul 28 05:38 tallylog
-rw-r–r-- 1 root root 98900 Jul 28 16:14 update-fixes.log
-rw-r–r-- 1 root root 4233 Jul 28 16:13 update-scripts.log
-rw-r–r-- 1 root root 0 Aug 17 04:02 vsftpd.log
-rw-r–r-- 1 root root 0 Aug 10 04:02 vsftpd.log.1
-rw-r–r-- 1 root root 0 Aug 3 04:02 vsftpd.log.2
-rw-r–r-- 1 root root 0 Jul 28 05:54 vsftpd.log.3
-rw-rw-r-- 1 root utmp 114048 Aug 22 09:07 wtmp
-rw-r–r-- 1 root root 390 Jul 28 15:35 yum.log

should I uninstall and reinstall?
I tried the script again from FreePBX… see below


Setup TFTP server

Loading “installonlyn” plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Parsing package install arguments
Nothing to do

Do:

rpm -qa | grep -i tftp

and post the results.

Also, learn about the bbcode “code” tags. It makes things much easier to read, ie:

root@pbx-mid:/var/log $ ls -l
total 2136
-rw------- 1 root root 356610 Jul 28 05:41 anaconda.log
-rw------- 1 root root 24990 Jul 28 05:41 anaconda.syslog
drwxrwxr-x 4 asterisk asterisk 4096 Aug 22 04:02 asterisk
drwxr-x--- 2 root root 4096 Jul 28 05:42 audit
-rw------- 1 root root 0 Aug 17 04:02 boot.log
-rw------- 1 root root 162 Aug 12 19:20 boot.log.1
-rw------- 1 root root 80 Aug 7 12:36 boot.log.2
-rw------- 1 root root 0 Jul 28 05:42 boot.log.3
-rw------- 1 root utmp 1152 Aug 22 06:26 btmp
drwxr-xr-x 2 root root 4096 Nov 11 2007 conman
drwxr-xr-x 2 root root 4096 Nov 11 2007 conman.old
-rw------- 1 root root 12061 Aug 22 09:01 cron
-rw------- 1 root root 14803 Aug 17 04:02 cron.1
-rw------- 1 root root 14791 Aug 10 04:02 cron.2
-rw------- 1 root root 14565 Aug 3 04:02 cron.3
drwxr-xr-x 2 lp sys 4096 Aug 3 04:02 cups
-rw-r--r-- 1 root root 17799 Aug 22 06:57 dmesg
-rw------- 1 root root 3478 Aug 22 06:27 fail2ban.log
-rw------- 1 root root 2424 Jul 28 05:46 faillog
drwx------ 2 root root 4096 Aug 21 04:02 httpd
-rw-r--r-- 1 root root 29492 Aug 22 09:07 lastlog
drwxr-xr-x 2 root root 4096 Jul 28 05:38 mail
-rw------- 1 root root 110782 Aug 22 06:57 maillog
-rw------- 1 root root 360246 Aug 17 04:02 maillog.1
-rw------- 1 root root 45375 Aug 10 04:02 maillog.2
-rw------- 1 root root 38045 Aug 3 04:02 maillog.3
-rw------- 1 root root 169819 Aug 22 08:58 messages
-rw------- 1 root root 6670 Aug 17 01:35 messages.1
-rw------- 1 root root 7904 Aug 10 02:56 messages.2
-rw------- 1 root root 237281 Aug 3 02:09 messages.3
-rw-r----- 1 mysql mysql 5424 Aug 22 06:57 mysqld.log
-rw-r--r-- 1 root root 345 Jul 29 15:33 passwd-webmin.log
drwxr-xr-x 2 root root 4096 Jul 28 05:40 pm
drwx------ 2 root root 4096 Mar 14 2007 ppp
-rw-r--r-- 1 root root 18607 Aug 22 04:02 rpmpkgs
-rw-r--r-- 1 root root 18607 Aug 16 04:02 rpmpkgs.1
-rw-r--r-- 1 root root 18607 Aug 9 04:02 rpmpkgs.2
-rw-r--r-- 1 root root 18607 Aug 2 04:02 rpmpkgs.3
drwx------ 2 root root 4096 Dec 10 2007 samba
-rw------- 1 root root 7556 Aug 22 09:07 secure
-rw------- 1 root root 0 Aug 10 04:02 secure.1
-rw------- 1 root root 0 Aug 3 04:02 secure.2
-rw------- 1 root root 182990 Jul 29 16:10 secure.3
-rw------- 1 root root 0 Aug 17 04:02 spooler
-rw------- 1 root root 0 Aug 10 04:02 spooler.1
-rw------- 1 root root 0 Aug 3 04:02 spooler.2
-rw------- 1 root root 0 Jul 28 05:38 spooler.3
-rw------- 1 root root 0 Jul 28 05:38 tallylog
-rw-r--r-- 1 root root 98900 Jul 28 16:14 update-fixes.log
-rw-r--r-- 1 root root 4233 Jul 28 16:13 update-scripts.log
-rw-r--r-- 1 root root 0 Aug 17 04:02 vsftpd.log
-rw-r--r-- 1 root root 0 Aug 10 04:02 vsftpd.log.1
-rw-r--r-- 1 root root 0 Aug 3 04:02 vsftpd.log.2
-rw-r--r-- 1 root root 0 Jul 28 05:54 vsftpd.log.3
-rw-rw-r-- 1 root utmp 114048 Aug 22 09:07 wtmp
-rw-r--r-- 1 root root 390 Jul 28 15:35 yum.log

result:

tftp-server-0.42-3.1.el5.centos

Better?

tftp-server-0.42-3.1.el5.centos

Do an yum install tftp-server
Edit /etc/xinetd.d/tftp and change disable to no
restart xinetd with service xinetd restart
Do an chkconfig xinetd on to set xinetd to start up at boot.

I think this will fix your issue.

Check in /etc/xinetd.d/tftp and see if it’s disabled. If it is, enable it and try again. It is disabled by default in centos.

I’m not sure, but I think that tftp server may just log to /var/log/messages, so you can also try:

grep tftp /var/log/messages

or even:

grep tftp /var/log/*

and see if you get any hits.

installl results

root@pbx-mid:/tftpboot $ yum install tftp-server
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Parsing package install arguments
Nothing to do

Verified: xinetd was already set properly for TFTP already.

RESULTS the SAME on reboot of phones. Could there be a firewall issue within the server? Loaded from pbxinaflash 1.3… nothing extra added aside from the aastra http scripts.

Thanks again.

root@pbx-mid:/var/log $ grep tftp messages
Aug 20 16:20:37 pbx xinetd[2325]: START: tftp pid=4343 from=10.0.2.92
Aug 20 16:35:37 pbx xinetd[2325]: EXIT: tftp status=0 pid=4343 duration=900(sec)
Aug 21 10:06:53 pbx xinetd[2325]: START: tftp pid=6932 from=10.0.2.92
Aug 21 10:36:55 pbx xinetd[2325]: EXIT: tftp status=0 pid=6932 duration=1802(sec)
Aug 21 10:39:39 pbx xinetd[2325]: START: tftp pid=7175 from=10.0.2.92
Aug 21 11:09:20 pbx-mid xinetd[2326]: readjusting service tftp
Aug 21 11:12:39 pbx-mid xinetd[2326]: START: tftp pid=3149 from=10.0.2.92
Aug 21 11:27:39 pbx-mid xinetd[2326]: EXIT: tftp status=0 pid=3149 duration=900(sec)
Aug 21 11:49:44 pbx-mid xinetd[2326]: START: tftp pid=3213 from=10.0.2.92
Aug 21 12:04:44 pbx-mid xinetd[2326]: EXIT: tftp status=0 pid=3213 duration=900(sec)
Aug 21 13:31:25 pbx-mid xinetd[2325]: START: tftp pid=3119 from=10.0.2.92
Aug 21 13:49:56 pbx-mid xinetd[2325]: EXIT: tftp status=0 pid=3119 duration=1111(sec)
Aug 21 14:12:00 pbx-mid xinetd[2325]: START: tftp pid=3204 from=10.0.2.92
Aug 21 14:27:00 pbx-mid xinetd[2325]: EXIT: tftp status=0 pid=3204 duration=900(sec)
Aug 22 06:57:57 pbx-mid xinetd[2329]: START: tftp pid=2802 from=10.0.2.92
Aug 22 07:50:04 pbx-mid xinetd[2329]: EXIT: tftp status=0 pid=2802 duration=3127(sec)
Aug 22 08:58:23 pbx-mid xinetd[2329]: START: tftp pid=4429 from=10.0.2.89
Aug 22 09:13:23 pbx-mid xinetd[2329]: EXIT: tftp status=0 pid=4429 duration=900(sec)
Aug 22 09:19:41 pbx-mid xinetd[2329]: START: tftp pid=4599 from=10.0.2.89
Aug 22 09:26:37 pbx-mid xinetd[2329]: readjusting service tftp

10.0.2.89 & 92 are the two AAstra phone IP’s

Do: nmap -sU localhost

and post the results.

If nmap isn’t installed, do:

yum install nmap


root@pbx-mid:/var/log $ nmap -sU localhost

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-08-22 10:03 MDT
Interesting ports on pbx-mid.local (127.0.0.1):
Not shown: 1481 closed ports
PORT      STATE         SERVICE
68/udp    open|filtered dhcpc
69/udp    open|filtered tftp
111/udp   open|filtered rpcbind
123/udp   open|filtered ntp
5060/udp  open|filtered sip
32768/udp open|filtered omad

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

Ok, so tftp is running, can you post your /etc/xinetd.d/tftp file?

# 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
{
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

Ok, well, hell. That looks right. What are the permissions on the /tftpboot directory itself?

Also, are you running a firewall on the server? Is port 69 udp open to the rest of the network?

My test aastra.cfg
The one I was trying to use was much more in depth

#aastra default config file
time server disabled: 0
time server1: 10.0.2.88
time server2: 0.pool.ntp.org

sip proxy ip: 10.0.2.88
sip proxy port: 5060
sip registrar ip: 10.0.2.88
sip registrar port: 5060

sip digit timeout: 6

xml application post list: 10.0.2.88

softkey1 type: speeddial
softkey1 label: "Voice Mail"
softkey1 value: *97

softkey2 type: speeddial
softkey2 label: "DND On"
softkey2 value: *78

softkey3 type: speeddial
softkey3 label: "DND Off"
softkey3 value: *79

the contents of TFTPBOOT

root@pbx-mid:/tftpboot $ ls -l
total 2948
-rw-r--r-- 1 root     root         480 Aug 22 09:18 00085D1AB8FB.cfg
-rwxrwxr-- 1 asterisk asterisk 2844128 Jun 27 22:58 55i.st
-rw-rw-rw- 1 asterisk asterisk     482 Aug 21 13:34 aastra.cfg
-rwxr-xr-- 1 root     root        3565 Aug 21 13:24 aastra.cfg.20080821
-rwxrwxr-- 1 root     root        3665 Jul 29 14:57 aastra.new2.cfg
-rwxrwxr-- 1 asterisk asterisk     547 Jul 29 06:59 aastra.new.cfg
-rwxrwxr-- 1 asterisk asterisk    3769 Jul 29 06:51 aastra.orig
drwxrwxr-- 5 asterisk asterisk    4096 Jul 28 14:08 polycom
-rwxrwxr-- 1 asterisk asterisk    1217 Jul 28 14:08 polycom_template.cnf
-rwxrwxr-- 1 asterisk asterisk     341 Jul 28 14:08 server.cfg
-rwxrwxr-- 1 asterisk asterisk  124678 Jul 28 14:08 sip.cfg

and the directory itself…

drwxrwxr--   3 asterisk asterisk  4096 Aug 22 10:17 tftpboot

Thanks for what you have done…