mirror of
https://github.com/vyos/vyos-documentation.git
synced 2025-10-26 08:41:46 +01:00
tftp-server: use new cfgcmd/opcmd syntax
This commit is contained in:
parent
e4467feb34
commit
1d22387f43
@ -1,44 +1,54 @@
|
|||||||
.. _tftp-server:
|
.. _tftp-server:
|
||||||
|
|
||||||
|
####
|
||||||
TFTP
|
TFTP
|
||||||
----
|
####
|
||||||
|
|
||||||
Trivial File Transfer Protocol (TFTP_) is a simple lockstep File Transfer
|
:abbr:`TFTP (Trivial File Transfer Protocol) is a simple, lockstep file transfer
|
||||||
Protocol which allows a client to get a file from or put a file onto a remote
|
protocol which allows a client to get a file from or put a file onto a remote
|
||||||
host. One of its primary uses is in the early stages of nodes booting from a
|
host. One of its primary uses is in the early stages of nodes booting from a
|
||||||
local area network. TFTP has been used for this application because it is very
|
local area network. TFTP has been used for this application because it is very
|
||||||
simple to implement.
|
simple to implement.
|
||||||
|
|
||||||
Example
|
Configuration
|
||||||
^^^^^^^
|
=============
|
||||||
|
|
||||||
.. code-block:: none
|
.. cfgcmd:: set service tftp-server directory '/config/tftpboot'
|
||||||
|
|
||||||
# If you want to enable uploads, else TFTP server will act as read-only (optional)
|
Enable TFTP service by specifying the directory which will be used to serve
|
||||||
set service tftp-server allow-upload
|
files.
|
||||||
|
|
||||||
# Directory for TFTP server content
|
.. hint:: Choose your ``directory`` location carefully or you will loose the
|
||||||
set service tftp-server directory '/config/tftpboot'
|
|
||||||
|
|
||||||
# On which addresses we want to listen for incoming TFTP connections? (mandatory)
|
|
||||||
set service tftp-server listen-address '2001:db8:ffee::1'
|
|
||||||
set service tftp-server listen-address '10.10.1.1'
|
|
||||||
|
|
||||||
.. note:: Choose your ``directory`` location carefully or you will loose the
|
|
||||||
content on image upgrades. Any directory under ``/config`` is save at this
|
content on image upgrades. Any directory under ``/config`` is save at this
|
||||||
will be migrated.
|
will be migrated.
|
||||||
|
|
||||||
|
.. cfgcmd:: set service tftp-server listen-address '<address>'
|
||||||
|
|
||||||
|
Configure the IPv4 or IPv6 listen address of the TFTP server. Multiple IPv4 and
|
||||||
|
IPv6 addresses can be given. There will be one TFTP server instances listening
|
||||||
|
on each IP address.
|
||||||
|
|
||||||
.. note:: Configuring a listen-address is essential for the service to work.
|
.. note:: Configuring a listen-address is essential for the service to work.
|
||||||
|
|
||||||
|
.. cfgcmd:: set service tftp-server allow-upload
|
||||||
|
|
||||||
|
Optional, if you want to enable uploads, else TFTP server will act as read-only
|
||||||
|
server.
|
||||||
|
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
|
||||||
|
Provide TFTP server listening on both IPv4 and IPv6 addresses ``192.0.2.1`` and
|
||||||
|
``2001:db8::1`` serving the content from ``/config/tftpboot``. Uploading via
|
||||||
|
TFTP to this server is not allowed!
|
||||||
|
|
||||||
The resulting configuration will look like:
|
The resulting configuration will look like:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
vyos@vyos# show service
|
vyos@vyos# show service
|
||||||
tftp-server {
|
tftp-server {
|
||||||
allow-upload
|
|
||||||
directory /config/tftpboot
|
directory /config/tftpboot
|
||||||
listen-address 2001:db8:ffee::1
|
listen-address 2001:db8::1
|
||||||
listen-address 10.10.1.1
|
listen-address 192.0.2.1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user