Status: Step 1 -> Client opens Control Connection to Server TCP Port 21.
File Transfer Protocol (FTP) is an Application Layer protocol running over TCP. It utilizes an out-of-band architecture splitting session logic into two discrete channels: a Control Channel (Port 21) for commands/responses, and a separate Data Channel (Port 20 or High Random Ports) for raw file streams and directory listings.
PORT command telling the server which local IP/port to connect to. The FTP server then initiates the data connection from its Port 20 back to the client. This frequently fails behind client NATs/Firewalls.PASV command. The server opens an unprivileged ephemeral data port (e.g., TCP 50001) and returns it to the client. The client initiates both control and data connections outward, making it firewall-friendly for clients.195*256 + 81 = 50001).