In passive mode FTP, the client initiates the connection to the server to solve the problem of firewalls. During an FTP connection the client opens two unprivileged ports locally (N> 1024 and N+1). The first port contacts the server on port 21, but instead of giving a port command and allowing the server to connect to its data port again, the client gives the PASV command. As a result, the server opens an unprivileged port (P>1024) and sends the port P command back to the client. The client then initiates the connection from port N+1 to port P on the server to transfer data.