Difference between revisions of "TFTP"

From ArchWiki
Jump to: navigation, search
(update default path)
m (Added phone on examples, anyone with a Cisco Phone has to use TFTP for instance.)
 
(37 intermediate revisions by 17 users not shown)
Line 1: Line 1:
 
[[Category:File Transfer Protocol]]
 
[[Category:File Transfer Protocol]]
The [[Wikipedia:Trivial File Transfer Protocol|Trivial File Transfer Protocol]] (TFTP) provides a minimalistic means for transferring files. It is generally used as a part of [[PXE]] booting or for updating configuration and firmware on devices which have limited memory such as routers and printers.
+
[[ja:TFTP]]
 +
The [[Wikipedia:Trivial File Transfer Protocol|Trivial File Transfer Protocol]] (TFTP) provides a minimalistic means for transferring files. It is generally used as a part of [[PXE]] booting or for updating configuration and firmware on devices which have limited memory such as routers, IP phones and printers.
  
This article describes how to set up a tftpd server under Arch Linux using the {{Pkg|tftp-hpa}} package.
+
== Server ==
  
== Installation ==
+
There are several TFTP server implementations, some are listed below and {{Pkg|iputils}} also includes a version of tftp.
[[pacman|Install]] the package {{Pkg|tftp-hpa}} which can be found in the [[Official Repositories|official repositories]].
 
  
== Configuration ==
+
{{Note|Make sure not to start different TFTP implementations at the same time. They will  fail with an error {{ic|got more than one socket}}, because only one may listen to the default TFTP port {{ic|69}}.}}
The configuration for tftpd is in {{ic|/etc/conf.d/tftpd}}
 
  
The default configuration is:
+
=== tftp-hpa ===
#
 
# Parameters to be passed to TFTPD
 
#
 
TFTPD_ARGS="-l -s /srv/tftp/"
 
  
The directory {{ic|/srv/tftp}} is created automatically when {{Pkg|tftp-hpa}} is installed.
+
[[Install]] {{Pkg|tftp-hpa}} and then [[start]] {{ic|tftpd.service}}.
  
For a complete list of parameters:
+
To modify service parameters edit {{ic|/etc/conf.d/tftpd}}.
$ man in.tftpd
 
  
== Run ==
+
=== atftp ===
To start the daemon at boot, add {{ic|tftpd}} to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.
 
  
To start the daemon manually:
+
[[Install]] {{Pkg|atftp}} and then [[start]] {{ic|atftpd.service}}.
# /etc/rc.d/tftpd start
 
  
To start the daemon without a configuration file:
+
To modify service parameters edit {{ic|/etc/conf.d/atftpd}}.
# /usr/sbin/in.tftpd -l -s path/to/folder/to/export
 
  
== Troubleshooting ==
+
=== dnsmasq ===
=== tftpd startup fails if ipv6 is disabled ===
 
If tftpd startup fails without leaving error messages, it might be because ipv6 is disabled and you are not explicitly telling tftpd not to use ipv6. You can make tftpd start by enabling ipv6 or by telling tftpd to only use ipv4, adding the '-4' switch to /etc/conf.d/tftpd
 
  
{{hc|/etc/conf.d/tftpd|<nowiki>
+
See [[dnsmasq#TFTP server setup]].
TFTPD_ARGS="-l -4 -s /srv/tftp/"
+
 
</nowiki>}}
+
== Client ==
 +
 
 +
[[Install]] {{Pkg|tftp-hpa}} and then tftp your day away!
 +
$ tftp

Latest revision as of 23:47, 15 May 2017

The Trivial File Transfer Protocol (TFTP) provides a minimalistic means for transferring files. It is generally used as a part of PXE booting or for updating configuration and firmware on devices which have limited memory such as routers, IP phones and printers.

Server

There are several TFTP server implementations, some are listed below and iputils also includes a version of tftp.

Note: Make sure not to start different TFTP implementations at the same time. They will fail with an error got more than one socket, because only one may listen to the default TFTP port 69.

tftp-hpa

Install tftp-hpa and then start tftpd.service.

To modify service parameters edit /etc/conf.d/tftpd.

atftp

Install atftp and then start atftpd.service.

To modify service parameters edit /etc/conf.d/atftpd.

dnsmasq

See dnsmasq#TFTP server setup.

Client

Install tftp-hpa and then tftp your day away!

$ tftp