Documente Academic
Documente Profesional
Documente Cultură
Objective: - To install and configure TFTP service and transfer file using TFTP protocol
Relevance:- TFTP is useful for booting computers such as routers which did not have any data
storage devices. It is still used to transfer small files between hosts on a network
Theory:-
Trivial File Transfer Protocol (TFTP) is an Internet software utility for transferring files that is
simpler to use than the File Transfer Protocol (FTP) but less capable. It is used where user
authentication and directory visibility are not required. TFTP uses the User Datagram Protocol
(UDP) rather than the Transmission Control Protocol (TCP).
Like FTP, TFTP uses client and server software to make connections between two devices. From
a TFTP client, individual files can be copied (uploaded) to or downloaded from the server. In
other words, the server hosts the files while the client requests or sends them.
FTP uses TCP port numbers 20 and 21, TFTP uses UDP port number 69.
FTP is a complete, session-oriented, general purpose file transfer protocol. TFTP is used
as a bare-bones special purpose file transfer protocol.
FTP can be used interactively. TFTP allows only unidirectional transfer of files.
FTP depends on TCP, is connection oriented, and provides reliable control. TFTP
depends on UDP, requires less overhead, and provides virtually no control.
FTP provides user authentication. TFTP does not.
Use of TFTP
TFTP is mainly used during device bootstrap process for downloading device
OS/firmware and configuration files. It is typically used for copying bootstrap and
configuration files between nodes belonging to the same LAN.
TFTP is used in situations where all the features of a full file transfer protocol like
FTP are not needed.
It is used along with boot protocols like BOOTP and DHCP to initialize devices.
Whenever an IP enabled node boots up, it gets its IP address and other device and
network related parameters through BOOTP or DHCP. As part of these parameters,
the client also receives the TFTP server address, bootstrap file and configuration file
details (file name and directory location). The client then uses the TFTP protocol to
download the bootstrap image and configuration files from the TFTP server.
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
5.. Create a file named test with some content in /tftpboot path of the tftp server
$ cd /tftpboot
/tftpboot $ cat >a.txt
this is file from server to client
press ctrl +c
/tftpboot $ ls
tftp> quit
$ ls
(we will get the file in home folder of user which get trasfer from server end to cilent)
tftp> put