Home >Common Problem >tftp execution process

tftp execution process

(*-*)浩
(*-*)浩Original
2020-01-08 10:28:273262browse

tftp execution process

TFTP (Trivial File Transfer Protocol) is a protocol in the TCP/IP protocol suite used for simple file transfer between the client and the server. Protocol that provides uncomplicated and inexpensive file transfer services. The port number is 69. (Recommended learning: PHPSTORM )

TFTP is a simple protocol for transmission files. It is implemented based on the UDP protocol, but we cannot determine that some TFTP protocols are based on other transmission protocols. Completed.

This protocol is designed for small file transfer. Therefore it does not have many of the features of the usual FTP, it can only get or write files from the file server, it cannot list directories, it does not authenticate, and it transfers 8-bit data.

There are three modes in transmission: netascii, which is an 8-bit ASCII code form, and the other is octet, which is an 8-bit source data type; the last mail is no longer supported, and it will return Data is returned directly to the user rather than saved to a file.

TFTP is the simplest network protocol used to download remote files. It is implemented on the UDP protocol. The tftp development environment of embedded Linux includes two aspects: one is tftp-server support on the Linux server side, and the other is tftp-client support for the embedded target system.

Because u-boot itself has built-in support for tftp-client, there is no need to configure the embedded target system. The following will introduce the configuration of tftp-server on the Linux server side in detail.

1. Install tftp server

You need to install xinetd, tftp and tftp-server 3 software

If you can access the Internet, use yum Installation:

yum 
 xinetd
yum install tftp
yum install tftp-server

If you cannot access the Internet, you can directly install the provided rpm package:

rpm -ivh xinetd-2.3.14-18.fc9.i386.rpm
rpm -ivh tftp-0.48-3.fc9.i386.rpm
rpm -ivh tftp-server-0.48-3.fc9.i386.rpm

2. Configure tftp server

Modify the /etc/xinetd.d/tftp file and change disable=yes to disable=no. The main thing is to set the root directory of the TFTP server and start the service. The modified file is as follows:

 tftp
{
       socket_type           =dgram
       protocol              =udp       
                  =yes
       user                  =root
       server                =/usr/sbin/in.tftpd
       server_args           =-s  /home/mike/tftpboot -c
       disable               =no
       per_source            =11
       cps                   =100 2
       flags                 =IPv4
}

Description: Modify the item server_args= -s 98953a78f52873edae60a617ec082494 -c, where 98953a78f52873edae60a617ec082494 can be changed to the root directory of your tftp-server, parameters -s specifies chroot, and -c specifies that files can be created.

3. Start the tftp server and turn off the firewall

/etc/
.d/
 stop        //关闭防火墙
 /sbin/service xinetd start

or

service xinetd restart
/etc/init.d/xinetd start

Just see Start [OK]

4. Check whether the tftp service is enabled.

 -a | 
 tftp

The displayed result is udp 0 0 *:tftp *:*, indicating that the service has been enabled, which indicates that the tftp configuration is successful.

5. tftp uses

to copy a file to the tftp server directory, and then start the tftp software on the host for a simple test.

tftp 192.168.1.2
tftp>get <download 
> 

tftp>put <upload file>
tftp>q

The above is the detailed content of tftp execution process. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn