Some short FTP details:-
FTP consists of 2 connections:-
1. Control Connection on port 21(Standard, can be changed)
2. Data Connection on port 20(Standard, can be changed)
Control connection is established once, data connection is established everytime data is transferred.
So, for Control connection, source and destination port remains same….
For every Data connection, port no. change. That port no. is negotiated on the control connection.
So all the FTP commands doesn’t use the Data Connection…
Here is the list of FTP commands. Commands with (√ ) indicates that the command uses data connection and commands with (X) indicates that the command doesn’t use data connection.
FTP commands are of 4 types:-
A. PORT commands (Also known as Active)
B. PASV commands (Also known as Passive)
C. EPRT commands (Also known as Extended PORT)
D. EPSV commands (Also known as Extended PASV)
PORT commands:-
In this, Client tells to server on which client port the data connection will be made. So client sends the port no. with the command. In PORT commands, port 20 is used by server for Data transfer.
PASV commands:-
Sometimes client might be behind the firewall, for such cases, server can’t directly connect to client and the port negotiated. So for that Passive mode is used. In Passive mode, any random port is used by server for Data connection.
In this, Server sends the data connection port no. to client and then client connects to that portnumber for data connection.
EPRT and EPSV commands:-
These are to support FTP in case of IPv6 and NATing. See RFC of FTP for more details.
Now lets see what traffic flows in the ls command…
Kindly note:-
1. FTP server IP is: 192.168.10.10
2. Clients IP is: 192.168.10.11
No comments:
Post a Comment