The TFTP (Trivial file Transfer Protocol, simple Files Transfer Protocol) is a protocol used by the TCP/IP protocol family to perform simple file transfer between the client and server, providing an uncomplicated, inexpensive file transfer service. The port number is 69.
TFTP is implemented based on the UDP protocol, but we are not sure that some TFTP protocols are based on other transport protocols. This protocol is designed for small file transfer, so it does not have many of the usual FTP features, it can only be obtained from the file server or write to the file, cannot list the directory, not authentication, it transmits 8 bits of data, through the time-out retransmission method to ensure the arrival of data.
Environment: win7_64 bit +vmware11+ubuntu1204
1, download and install
sudo apt-get install tftp-hpa tftpd-hpa xinetd
#tftp-HPA TFTP client
#tftpd-HPA TFTP server
#xinetd support for TCP, UDP, RPC services
2. Create a Directory
sudo mkdir/tftpboot # This is the set up TFTP service directory for external sharing
sudo chmod 0777/tftpboot
3, configuration
sudo vi/etc/default/tftpd-hpa #修改配置文件
Tftp_username= "TFTP" #名字
tftp_directory= "/tftpboot" #服务路径
tftp_address= "0.0.0.0:69" #监听地址, default port number 69.
Tftp_options= "-l-c-S" #-l=listen listening mode,-c=create can upload files,-s=startup login to enter the service path by default
4, start the service
sudo service tftpd-hpa Restart # startup services
sudo service tftpd-hpa Restart # Restart Services
5, test the application
TFTP localhost #测试本机服务
TFTP < host ip> #连接远程服务
Tftp>get <filename> #从tftp服务器下载文件
Tftp>put <filename> #上传文件到tftp服务器
Ubuntu Configuration TFTP server