当前位置:网站首页>FTP协议详解
FTP协议详解
2022-07-29 02:18:00 【Li-YC】
一、FTP协议的概述
1、文件传送协议(File Transfer Protocol)是互联网上使用的最广泛的文件传输协议,用于Internet上的控制文件的双向传输。
2、FTP提供交互式的访问,允许客户指明文件类型与格式,并允许文件具有存取权限。
3、FTP屏蔽了各计算机系统的细节,因而适合于在异构网络中计算机之间传送文件。
二、FTP协议的特点
1、文件传送协议FTP只提供文件传送的一些基本的服务,它使用TCP可靠的运输方式。
2、FTP的主要功能是减少或消除在不同操作系统下处理文件的不兼容性。
3、FTP使用客户服务器方式。一个FTP服务器进程可同时为多个客户进程提提供服务,FTP的服务器进程由二大部分组成:一个是主进程,负责接受新的请求;另外有诺干个从属进程,负责处理单个请求。
三、FTP工作过程
1、FTP有控制连接和数据连接,
控制连接标准端口为21,用于发送FTP命令信息。
数据连接标准端口为20,用于上传、下载数据。
2、FTP协议和其他协议不一样的地方就是客户端访问FTP服务器端需要建立二个TCP连接,一个用来传输FTP命令,一个用来传输数据
3、FTP有主动模式和被动模式,
主动模式:服务端从20端口主动向客户端发起连接,工作过程如下图所示:

第一步中,FTP客户端提交PORT命令并允许服务器来回连它的数据端口(1027端口)。
第二步中,服务器返回确认。
在第三步中,FTP服务器向客户端发送TCP连接请求,目标端口为1027,源端口为20。建立起传输数据的连接。
被动模式:服务端在指定范围内的某各端口被动等待客户,被动发起连接。

在第一步中,客户端的命令端口与服务器的命令端口建立连接,并发送命令"PASV"。
在第二步中,服务器返回命令"PORT 2024"告诉客户端:服务器用哪各端口监听数据连接。
在第三步中 ,客户端初始化一个从自己的数据端口到到服务器指定的数据端口的数据连接。
在第四步中,服务器给客户端的数据端口返回一个"ACK"响应。
边栏推荐
- redis为什么快,消息队列,单线程
- 工程经济学名词解释
- Mqtt routine
- Youxuan software appoints Huang Zhijun as the general manager of the company
- 网络基础概论
- VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness
- xxxxx
- Source code of Jiugongge heart puzzle Applet / source code of main wechat applet with traffic
- MySQL basic operation and comprehensive instance project based on MySQL basic operation
- ECCV 2022 | airdet: a small sample target detection method without fine tuning
猜你喜欢

Deliver temperature with science and technology, vivo appears at the digital China Construction Summit

Ffmpeg+sdl+qt is a simple video player

Double write consistency of MySQL and redis

Polygon zkevm - Introduction to HERMEZ 2.0

New conch movie theme template m3.1 fully decrypted version multifunctional apple cmsv10 background adaptive theme open source fully decrypted version

Flink内核源码(七)Flink SQL提交流程

C language to achieve the three chess game

Multimodal unsupervised image to image translation

HTTP缓存

QT compilation of IOT management platform 48 characteristic function design
随机推荐
Catchadmin practical tutorial (IV) implementation of relevant functions of table components
新版海螺影视主题模板M3.1全解密版本多功能苹果CMSv10后台自适应主题开源全解密版
Ffmpeg+sdl+qt is a simple video player
What are the TCP retransmission mechanisms?
【无标题】
Redis master-slave mode, sentinel cluster, fragment cluster
Master-slave replication and its principle
Where, having, group by, order by, is null, not in, subquery, delete, date function
Three implementation methods of Servlet
Which is a good automatic account distribution system?
New conch movie theme template m3.1 fully decrypted version multifunctional apple cmsv10 background adaptive theme open source fully decrypted version
redis为什么快,消息队列,单线程
MySQL和Redis的双写一致性
Polygon zkEVM——Hermez 2.0简介
多重继承与派生类成员标识
Wechat applet - Advanced chapter Lin UI component library source code analysis button component (II)
really time ntp服务启动命令
etcd实现大规模服务治理应用实战
In depth analysis - Pretreatment
双for循环