FTP :
FTP 代表文件传输协议。它是一种通过网络传输文件的应用层协议。它使用基于 TCP 的服务。
FTP 在两种不同的模式下工作:
1.主动FTP:
在主动模式下,客户端连接到一个随机端口,用于从服务器传入数据连接。客户端再次将下一个端口发送到 FTP 服务器,该端口在命令通道上得到确认。
2.被动FTP:
在被动模式下,客户端使用控制连接向服务器发送 PASV信号。 FTP 服务器发回 IP 地址和服务器端口号。
以下是主动和被动 FTP 之间的一些区别:
Active FTP | Passive FTP |
---|---|
In active FTP, client establishes the command channel and the server establishes the data channel. | In passive FTP, both the command channel and the data channel are established by the client. |
Active FTP provides security to the FTP server. | Passive FTP does not provide security to the FTP server. |
Active FTP may cause problems because of firewalls. | Passive FTP does not have connection issues from firewalls. |
Active mode is not used as a default mode of a browser. | Passive mode is used as a default mode of a browser. |
FTP client acknowledges on data channel. | FTP server acknowledges on data channel. |
Client sends random port number to the server. | Client sends PASV command to the server. |