• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】TFTP是什么

问答 admin 3年前 (2020-07-29) 510次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

TFTP(简单文件传输协议)是TCP/IP协议族中的一个用来在客户机与服务器之间进行简单文件传输的协议,提供不复杂、开销不大的文件传输服务。端口号为69。

TFTP (simple file transfer protocol) is a protocol of TCP / IP protocol family for simple file transfer between client and server. It provides a file transfer service which is not complicated and expensive. The port number is 69.

TFTP(Trivial File Transfer Protocol,简单文件传输协议)是 TCP/IP 协议族中的一个用来在客户机与服务器之间进行简单文件传输的协议,提供不复杂、开销不大的文件传输服务。端口号为 69。

TFTP (simple file transfer protocol) is a protocol of TCP / IP protocol family for simple file transfer between client and server. It provides file transfer service which is not complicated and has little cost. The port number is 69.

TFTP 是一个传输文件的简单协议,它基于 UDP 协议而实现,但是我们也不能确定有些 TFTP 协议是基于其它传输协议完成的。此协议设计的时候是进行小文件传输的。因此它不具备通常的 FTP 的许多功能,它只能从文件服务器上获得或写入文件,不能列出目录,不进行认证,它传输 8 位数据。传输中有三种模式:netascii,这是 8 位的 ASCII 码形式,另一种是 octet,这是 8 位源数据类型;最后一种 mail 已经不再支持,它将返回的数据直接返回给用户而不是保存为文件。

TFTP is a simple protocol to transfer files. It is based on UDP protocol, but we can’t be sure that some TFTP protocols are based on other transport protocols. This protocol is designed for small file transfer. Therefore, it does not have many functions of the usual FTP, it can only get or write files from the file server, can not list the directory, without authentication, it transfers 8-bit data. There are three modes of transmission: netascii, which is 8-bit ASCII, and octet, which is an 8-bit source data type; and the last type of mail, which is no longer supported, returns the returned data directly to the user instead of saving it as a file.

概况

survey

任何传输起自一个读取或写入文件的请求,这个请求也是连接请求。如果服务器批准此请求,则服务器打开连接,数据以定长 512 字节传输。每个数据包包括一块数据,服务器发出下一个数据包以前必须得到客户对上一个数据包的确认。如果一个数据包的大小小于 512 字节,则表示传输结束。如果数据包在传输过程中丢失,发出方会在超时后重新传输最后一个未被确认的数据包。通信的双方都是数据的发出者与接收者,一方传输数据接收应答,另一方发出应答接收数据。

Any transfer starts with a request to read or write a file, which is also a connection request. If the server approves the request, the server opens the connection and the data is transmitted in a fixed length of 512 bytes. Each packet contains a piece of data. Before the server sends out the next packet, the client must confirm the previous packet. If the size of a packet is less than 512 bytes, the transmission ends. If a packet is lost during transmission, the sender retransmits the last unacknowledged packet after the timeout. Both sides of the communication are the sender and receiver of the data. One party transmits the data to receive the reply, and the other party sends the reply to receive the data.

大部分的错误会导致连接中断,错误由一个错误的数据包引起。这个包不会被确认,也不会被重新发送,因此另一方无法接收到。如果错误包丢失,则使用超时机制。错误主要是由下面三种情况引起的:不能满足请求,收到的数据包内容错误,而这种错误不能由延时或重发解释,对需要资源的访问丢失(如硬盘满)。TFTP 只在一种情况下不中断连接,这种情况是源端口不正确,在这种情况下,指示错误的包会被发送到源机。这个协议限制很多,这些都是为了实现起来比较方便而进行的。

Most errors cause the connection to be broken. The error is caused by a wrong packet. The packet will not be acknowledged or retransmitted, so the other party cannot receive it. If the error packet is lost, the timeout mechanism is used. The error is mainly caused by the following three situations: the request cannot be satisfied, the received packet content is wrong, and this error cannot be explained by delay or retransmission, and the access to the required resources is lost (such as the hard disk is full). TFTP does not interrupt the connection only in one case. In this case, the source port is incorrect. In this case, the packet indicating the error will be sent to the source machine. There are many restrictions in this protocol, which are carried out for the convenience of implementation.

初始连接

Initial connection

初始连接时候需要发出 WRQ(请求写入远程系统)或 RRQ(请求读取远程系统),收到一个确定应答,一个确定可以写出的包或应该读取的第一块数据。通常确认包包括要确认的包的包号,每个数据包都与一个块号相对应,块号从 1 开始而且是连续的。因此对于写入请求的确定是一个比较特殊的情况,因此它的包的包号是 0。如果收到的包是一个错误的包,则这个请求被拒绝。

During the initial connection, you need to send a wrq (request to write to the remote system) or RRQ (request to read the remote system), and receive a confirmation response, a packet that can be written or the first piece of data that should be read. Generally, the confirmation packet includes the packet number of the packet to be confirmed. Each packet corresponds to a block number, and the block number starts from 1 and is continuous. Therefore, the determination of the write request is a special case, so the packet number of its packet is 0. If the received package is a bad one, the request is rejected.

创建连接时,通信双方随机选择一个 TID,因为是随机选择的,因此两次选择同一个 ID 的可能性就很小了。每个包包括两个 TID,发送者 ID 和接收者 ID。这些 ID 用于在 UDP 通信时选择端口,请求主机选择 ID 的方法上面已经说过了,在第一次请求的时候它会将请求发到 TID 69,也就是服务器的 69 端口上。应答时,服务器使用一个选择好的 TID 作为源 TID,并用上一个包中的 TID 作为目的 ID 进行发送。这两个被选择的 ID 在随后的通信中会被一直使用。下例是一个写入的例子,其中 WRQ,ACK 和 DATA 代表写入请求,确认和数据。

When creating a connection, both sides of the communication choose a TID randomly. Because it is selected randomly, the possibility of selecting the same ID twice is very small. Each packet consists of two TIDs, sender ID and receiver ID. These IDs are used to select the port during UDP communication. The method for requesting the host to select the ID has been mentioned above. At the first request, it will send the request to TID 69, that is, port 69 of the server. In response, the server uses a selected TID as the source TID and sends it with the TID in the previous package as the destination ID. The two selected IDS will always be used in subsequent communications. The following example is a write example, where wrq, ACK, and data represent write requests, acknowledgments, and data.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】TFTP是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址