TFTP installation and setup under Linux

Source: Internet
Author: User
Tags file transfer protocol

TFTP and NFS are an essential environment for learning linux+arm development. Here is a summary of some of the experience of installing and using TFTP and making a memo.

First, the principle of TFTP service

TFTP (trivial files transfer protocal, Simple File Transfer Protocol) is the implementation of the UDP protocol, using the UDP67 port, providing unreliable data streaming services, using the supermarket retransmission method to ensure data arrival.

Characteristics:

1. Tftp must not be disconnected during operation

2, TFTP default properties are uploaded and downloaded when the default override is not prompted.

3. tftp uploaded files may be added to the read-only attribute.

Second, TFTP installation

The TFTP development environment of embedded Linux includes two aspects: one is the support of tftp-server of embedded host, and the other is the tftp-client support of embedded Linux target machine.

The uboot itself supports tftpclient, so the target machine is not configured.

tftp-provides customer service,

Tftp-server provides service-side services.

The entire installation is divided into two steps: Installing TFTP-related packages and modifying configuration/etc/xinetd.d/tftp files.

1. Installing TFTP-related packages

(1), Rpm-q | grep tftp

(2), #rpm-IVH tftp-0.42-3.1.i386.rpm//Installation Tftp-client
(3), #rpm-IVH tftp-server-0.42-3.1.i386.rpm//Installation Tftp-server

Note: Packages may not be in these two versions, depending on their platform and requirements.

2. Modify the/etc/xinetd.d/tftp file

Service TFTP
{
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/tftpboot Note: Modify here,-S to specify the directory,/tftp for the TFTP shared directory you need,-C allow uploading
Disable = no
Per_source = 11
CPS = 100 2
Flags = IPV4
}

3. Restart the TFTP service

By default, the TFTP service is hit by a firewall, two ways: a direct shutdown firewall, two setup firewall configuration--"Customize--other port:69udp save.

To restart the TFTP service:

Service xinetd Restart

Third, tftp command

1. Command format:

TFTP [-i][host][{get|put}][source][destination]

Where:-I indicates that a binary file is being transmitted, at which time the file is transmitted in bytes. If this option is not added, the default is ASCII mode transfer, which is the default transfer mode, which is used when transferring text files. If the transfer succeeds, the transfer rate is displayed. host specifies a local or remote host, typically ip;put transfers the local destination to source on the remote host, noting that if the source exists overrides the default override; Get downloads the destination file on the remote host to the local hot search. SOURCE specifies the file to be transferred, destination specifies the location to which the file is transferred, and omitting destination will set her to the same name as source.

Cases:

T

TFTP installation and setup under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.