TFTP (Trivial file Transfer Protocol, simple Document Transfer Protocol), is a UDP-based protocol implementation
protocol for simple File transfer between client and server, and is suitable for applications where there is little overhead and complexity.
The TFTP protocol is designed for small file transfers and can only fetch files from the server or write files to the server, not
Directories are listed and cannot be authenticated.
Based on the above introduction to TFTP, we need to build a TFTP server, iTOP-4412
The Development Board as a client.
Using our virtual machine Ubuntu as a server, let's first explain the server-side configuration.
Based on the above introduction of TFTP, the implementation of TFTP eventually requires a TFTP server to build, iTOP-4412
The Development Board as a client.
Using our virtual machine Ubuntu as a server, let's first explain the server-side configuration.
8.3.2 Building a server
Open the terminal on our virtual machine Ubuntu:
First enter the command: sudo apt-get install xinetd, installing XINETD,:
After installing XINETD,:
Next enter the command to install TFTP and Tftpd:sudo apt-get install TFTP tftpd:
After the installation is complete,:
Then create a TFTP configuration file using the command: vi/etc/xinetd.d/tftp to create the file:
Write the following content:
Service TFTP
{
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/var/tftpboot/
Disable = no
Per_source= 11
CPS = 100 2
Flags = IPV4
}
:
Note: As shown, this file must be strictly aligned in the format described above after pasting the content.
Exit and save. Where Server_args set the/var/tftpboot directory is the TFTP server directory, the TFTP guest
The client is the one that gets the files on the server from this directory. Use the command mkdir/var/tftpboot to create a TFTP service
Directory of the service,:
Then set the access permission for/var/tftpboot to 777:
Input: sudo/etc/init.d/xinetd Restart command to restart the XINETD service:
The server is set up in this step and is tested later.
8.4 Server Testing
Native test: Create a file test under/var/tftpboot, enter Hello World inside, then save the
File:
At the start of another terminal,:
Then enter: TFTP 127.0.0.1,:
Enter the get test to get the test file:
After we see the information obtained to test 13 bytes, then enter Q to exit TFTP:
Then we enter LS to see if there is a test file in the current directory, and by viewing it, we find that the current directory should have test
File, which is the test file in the/var/tftpboot directory:
We use the Cat command to view the contents of the test file:
Through the above, we see that the contents of the test file are Hello World, with the/var/tftpboot directory
Test is the same, so our TFTP server-side configuration and testing is done.
This article is from the "Mao Scattered People" blog, please be sure to keep this source http://songmao.blog.51cto.com/11700139/1877112
Ubuntu Linux TFTP configuration