当前位置:网站首页>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"响应。
边栏推荐
- C language to achieve the three chess game
- Qt编写物联网管理平台48-特色功能设计
- Cloud development workers must go to work fishing and paddling wechat applet source code
- Source code and display of 18 classic programs in C language vs2019
- UE4.25 Slate源码解读
- 全新UI四方聚合支付系统源码/新增USDT提现/最新更新安全升级修复XSS漏洞补单漏洞
- really time ntp服务启动命令
- PHP幸运抽奖系统带后台源码
- This blogger has a comprehensive classification of QT. If you are free, go to study and summarize it and record it.
- HTTP缓存
猜你喜欢

网络基础概论

自动分账系统哪家好?

JMeter's BeanShell generates MD5 encrypted data and writes it to the database

Small program source code for campus stray cat information recording and sharing / wechat cloud development medium big cat spectrum small program source code

MQTT例程

架构师进阶,微服务设计与治理的 16 条常用原则

Which is a good automatic account distribution system?

第十天笔记

Redis master-slave mode, sentinel cluster, fragment cluster

STM32F103 learn the steps and template fool tutorial of 1-keil5 project establishment
随机推荐
全新UI四方聚合支付系统源码/新增USDT提现/最新更新安全升级修复XSS漏洞补单漏洞
Code implementation - the greatest common factor of polynomials (linear algebra)
Code random notes_ Hash_ 349 intersection of two numbers
Intel's IPP Library (Integrated Performance Primitives)
【OpenCV】使用OpenCV调用手机摄像头
图书管理系统
Some records during the development of ros2/ros1
K210——声源定位、声音识别
0728~ sorting out interview questions
time_ Wait and close_ Cause of wait
Catchadmin practical tutorial (IV) implementation of relevant functions of table components
第六天笔记
CatchAdmin实战教程(四)Table组件相关功能实现
really time ntp服务启动命令
Really time NTP service startup command
ECCV 2022 | airdet: a small sample target detection method without fine tuning
Three implementation methods of Servlet
【无标题】
Split, an avalanche caused by connection pool parameters
白马过隙的时光