Olivier
2008-Jul-27 09:00 UTC
[asterisk-users] OT - How to test tftp for phones provisioning
Hi, I don't understand why a SIP hardphone can't provision itself using tftp. I'm very suspicious about my tftp daemon but I lack basic knowledge of Linux CLI to pinpoint what's going wrong and separate what belongs to SIP phone configuration from what comes from tftp server. What I would like to do is to add a given file in current /srv/tftp directory and test by hand that tftpd would serve this file when asked. Googling and reading man pages, I could find command that starts tftp server but I couldn't find any command asking for a given file (please, note I don't imply such commands don't exist but maybe, some more general network tools (netcat, ...) are the one to use for basic tftp testing). So let's say, you've got : a perfectly running tftp server somewhere on your LAN, it holds foo.txt file in its /srv/tftp directory. Which command could you type in for a LAN workstation to receive this foo.txt ? Regards PS1: I'm using Debian etch PS2: With nestat -a, I've got this : Proto Recv-Q Send-Q Local address Remote address Status udp 0 0 *:tftp *:* So, I think my tftp daemon is not listening but that's another topic. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080727/49602027/attachment-0001.htm
Sigma Networks
2008-Jul-27 14:42 UTC
[asterisk-users] OT - How to test tftp for phones provisioning
Olivier wrote:> Hi, > > I don't understand why a SIP hardphone can't provision itself using tftp. > I'm very suspicious about my tftp daemon but I lack basic knowledge of > Linux CLI to pinpoint what's going wrong and separate what belongs to > SIP phone configuration from what comes from tftp server. > > What I would like to do is to add a given file in current /srv/tftp > directory and test by hand that tftpd would serve this file when asked. > > Googling and reading man pages, I could find command that starts tftp > server but I couldn't find any command asking for a given file > (please, note I don't imply such commands don't exist but maybe, some > more general network tools (netcat, ...) are the one to use for basic > tftp testing). > > So let's say, you've got : > a perfectly running tftp server somewhere on your LAN, > it holds foo.txt file in its /srv/tftp directory. > > > Which command could you type in for a LAN workstation to receive this > foo.txt ? > > Regards > > PS1: I'm using Debian etch > PS2: With nestat -a, I've got this : > > Proto Recv-Q Send-Q Local address Remote address Status > udp 0 0 *:tftp *:* > > So, I think my tftp daemon is not listening but that's another topic. > ------------------------------------------------------------------------ > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2008 - September 22 - 25 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-usersyou'll want to turn on logging for tftpd so you can monitor the messages: tail -f /var/log/messages to test tftp if the daemon is running on the local server: tftp localhost get foo.txt good luck.
Ex Vito
2008-Jul-27 14:46 UTC
[asterisk-users] OT - How to test tftp for phones provisioning
> > So let's say, you've got : > a perfectly running tftp server somewhere on your LAN, > it holds foo.txt file in its /srv/tftp directory. > > Which command could you type in for a LAN workstation to receive this > foo.txt ? >tftp is the client, do you have it installed ?... example: # tftp hostname tftp> get /srv/tftp/foo.txt tftp> ^D # cat foo.txt ... Things to check: is /srv/tftp the "tftp" directory or is it the os filesystem directory where the tftp root resides ? Also, the tftp daemon in CentOS is started by xinetd and can be invoked with extra -v flags so as to increase logging verbosity. Check your dist. This may help... Cheers, -- exvito
Tzafrir Cohen
2008-Jul-27 17:27 UTC
[asterisk-users] OT - How to test tftp for phones provisioning
On Sun, Jul 27, 2008 at 11:00:51AM +0200, Olivier wrote:> Hi, > > I don't understand why a SIP hardphone can't provision itself using tftp. > I'm very suspicious about my tftp daemon but I lack basic knowledge of Linux > CLI to pinpoint what's going wrong and separate what belongs to SIP phone > configuration from what comes from tftp server. > > What I would like to do is to add a given file in current /srv/tftp > directory and test by hand that tftpd would serve this file when asked. > > Googling and reading man pages, I could find command that starts tftp server > but I couldn't find any command asking for a given file (please, note I > don't imply such commands don't exist but maybe, some more general network > tools (netcat, ...) are the one to use for basic tftp testing).First and foremost, netstat -lup | grep tftp or (probably faster): netstat -lnup | grep 69 This will show you the name of the process that listens on the standard TFTP (UDP) port, if any. Debian includes 3 (or maybe 4) tftp servers: tftpd - Old and probably less maintained version tftpd-hpa - A newer version. Slightly larger but this is probably the one to use. atftpd - Yet another tftpd. Likewise, better than tftpd . Both atftpd and tftpd-hpa can run either as stand-alone daemons or from inetd. Check /etc/default/<package-name> and the docs directory for the details. IIRC the scripts of the package already run update-inetd for you. Another option is to use dnsmasq. If you already happen to use it as a DNS and/or DHCP server, then you might have noticed the extra TFTP serving it has added in its latest versions. It only supports read-only access. But you don't really want to support that insecure tftp upload, right? Logs from all the above go to /var/log/daemon.log . -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir