Difference between revisions of "TFTP"

From ArchWiki
Jump to: navigation, search
(Configuration)
(Server: add dnsmasq)
 
(25 intermediate revisions by 13 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 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}}.}}
  
Create a copy of the {{ic|tftpd.service}} unit, and modify {{ic|ExecStart}} with the appropriate directory to use as the tftp root.
+
=== tftp-hpa ===
  
{{hc|# vim /etc/systemd/system/tftpd.service|2=
+
[[Install]] {{Pkg|tftp-hpa}} and then [[start]] {{ic|tftpd.service}}.
[Unit]
+
Description=hpa's original TFTP daemon
+
  
[Service]
+
To modify service parameters edit {{ic|/etc/conf.d/tftpd}}.
ExecStart=/usr/sbin/in.tftpd -s /srv/tftp/
+
StandardInput=socket
+
StandardOutput=inherit
+
StandardError=journal}}
+
  
[[Systemd#Editing_provided_unit_files]] talks in more detail about customizing unit files.
+
=== atftp ===
  
== Run ==
+
[[Install]] {{Pkg|atftp}} and then [[start]] {{ic|atftpd.service}}.
  
Start tftpd:
+
To modify service parameters edit {{ic|/etc/conf.d/atftpd}}.
  
# systemctl start tftpd.socket tftpd.service
+
=== dnsmasq ===
  
To start tftpd on boot:
+
See [[dnsmasq#TFTP server setup]].
  
# systemctl enable tftpd.socket
+
== Client ==
  
See [[Systemd#Using_units]] for more information on manipulating services.
+
[[Install]] {{Pkg|tftp-hpa}} and then tftp your day away!
 +
$ tftp

Latest revision as of 14:53, 6 May 2016

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 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