Detailed TFTP usage in Linux

Source: Internet
Author: User
Tags set time ftp protocol

Introduction to FTP protocol
TFTP is the simplest network protocol for downloading remote files, which is implemented in the UDP protocol .

Configuration of Linux server-side Tftp-server
1. Installing the TFTP server
Need to install xinetd (Guardian tftp), TFTP, and Tftp-server 3 software
1) If you have access to the Internet, install it via yum:
sudo yum installxinetd
sudo yum installTFTP
sudo yum installTftp-server
2. Configuring the TFTP server
Modify the/etc/xinetd.d/tftp file to change the Disable=yes to Disable=no. Enable TFTP service
The main is to set the root directory of the TFTP server to open the service. The modified file is as follows:
Service TFTP
{Socket_type =dgram
Protocol =UDP
Wait =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 Item server_args=- s <path>-C, where <path> can be changed to the root directory of your tftp-server

the-s parameter specifies that the CHROOT,-C can create a file .
3. Start the TFTP server and turn off the firewall

redhat7+

Systemctl Disable Firewall;systemctl Stop firewall

Systemctl Enable Xinetd;systemctl start xinetd

redhat7-
/etc/init.d/iptables Stop//firewall off
Sudo/sbin/service xinetd Start
or service xinetd restart
/etc/init.d/xinetd start
See boot [OK] on it.
4. Check if the TFTP service is turned on
netstat-a | grep tftp
Show results as
UDP 0 0 *:tftp *:*
Indicates that the service has been turned on, indicating that the TFTP configuration was successful.
5. TFTP use
Copy a file to the TFTP server directory, and then start the TFTP software on the host for a simple test.

Landing
TFTP 192.168.1.2
Tftp>get <download file>
Tftp>put <upload file>
Tftp>q
6. TFTP command usage is as follows
TFTP your-ip-address
"Go to TFTP operation"
Connect: Connecting to a remote TFTP server
Mode: File transfer modes
Put: Uploading Files
Get: Download file
Quit: Quit
VERBOSE: Show detailed processing information
Tarce: Show Package path
Status: Displays current status information
Binary: Binary transfer mode
Ascii:ascii Transfer Mode
REXMT: Set time-out for packet transfer
Timeout: Set the time-out for retransmission
Help: Helpful Information
?: Help Information
7. If "AVC denial, click icon to view" error appears, the file cannot be transferred
Modify the/etc/sysconfig/selinux to set SELinux to disable
Use the command Setenforce 0 to have the SELinux configuration file take effect

Reference:

Http://blog.sina.com.cn/s/blog_6e5e78bf0100qvmi.html

Detailed TFTP usage in Linux

Related Article

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.