Re: OT: ftp handshaking explanation

From: Beau Kuiper (kuiperba@cs.curtin.edu.au)
Date: Wed Mar 01 2000 - 23:13:41 EST


On Wed, 1 Mar 2000, Mark A. Swope wrote:

> Sorry that this isn't *strictly* related to Linux.
>
> I'm helping someone to configure a router and we've stumped ourselves.
> We *thought* we understood how FTP establishes a command connection,
> then a data connection. However, after several hours of hashing this out,
> we've confused ourselves.
>
> Can someone either give me a brief explanation of the setup and tear-down
> of an ftp session, including the port-to-port handshaking.

For normal data port connections, it typically goes:
Client tells the server:

PORT <ipaddress>,<port>

then the client will listen on the port specified. The client then does a
command that requires a data port. eg LIST. Then the server connects to
the client establishing the data connection. When the transfer is
finished, both sides close the data connection.

for passive data port connections, it goes
Client asks the server for a passive connection using the PASV command

PASV
then the server replies telling the client where to connect to,
227 Passive mode on (<ipaddress>,<port>)

Then the server binds to the required port. When the client does a command
requireing the data connections, it will execute the command and then
connect to the server which is waiting on the specifed port, establising
the data connection. Like before, when the transfer is finished, both
sides close the data connection

Ant that is all ther eis to it basicly
have Fun
Beau Kuiper
kuiperba@cs.curtin.edu.au

>
> Or, if someone knows of a really good explanation, short of reading source
> code or the entire RFC959, I'd appreciate a pointer to it...
>
> Thanks and sorry for the waste of bandwidth.
>
> Kindest regards,
> Mark Swope
>
> ----------------------------------------------------------------------------
> ---------
> MilliHelen - n. The amount of Beauty required to launch 1 ship.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.rutgers.edu
>

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:26 EST