Tftp

Allikas: Kuutõrvaja

Triviaalne failiedastusprotokoll UDP porti 69 kasutav ja väga vähe mäluruumi nõudev internetiutiliit failide edastamiseks aastast 1980. Seda on lihtsam kasutada kui FTP’d, kuid on ka väiksemate võimalustega (ei saa kasutada mitmest paketist koosnevate andmeüksuste edastamiseks).

TFTP protokollis puuduvad autentimis- ja krüpteerimismehhanismid ning leiab kasutuses peamiselt kahel juhul. Erinevate võrgu jms seadmete firmware uuendamiseks ja võrguboodil nn kõhnade klientide - terminalide startimiseks.

tftp server

Debianis paigaldamine

# apt-get install tftpd-hpa

Konfiguratsioonifail /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"

Change root directory on startup. This means the remote host does not need to pass along the directory as part of the transfer, and may add security. When --secure is specified, exactly one directory should be specified on the command line. The use of this option is recommended for security as well as compatibility with some boot ROMs which cannot be easily made to include a directory name in its request.

Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allowing anyone to read or write them, unless the --permissive or --umask options are specified.

Gerntoos on serveri konfigutatsoon failis /etc/conf.d/in.tftpd

Seal tuleb muuta parameetreid näiteks

INTFTPD_PATH="/srv/tftproot/"
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH} -a 192.168.1.10 -c"

Tftp kliendi kasutamine.

Kliendi installi Debianis

# apt-get install tftp

Faili saatmine tftp serverisse

$ tftp -v 192.168.1.1 -c put myfile

Faili küsimiseks

$ tftp localhost -c get pxelinux.0

Tftp serveris käskude käivitamine ja staatuse vaatamine.

$ tftp 192.168.1.2
tftp> status
Connected to 192.168.1.5.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get openbsd/pxeboot
Received 54234 bytes in 0.0 seconds
tftp> get openbsd/bsd.rd
Received 6465608 bytes in 0.5 seconds
tftp> quit

http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml cisco ruuterite konfiguratsiooni automaatne varundamine tftp abil.