Thursday, December 8, 2011

FTP : Active/Passive Modes

FTP
===

Two types - Active and Passive

Passive : Client will always intaiate connection
------------------------------------------------

1. Client:Hightport -> server:21
2. Server will reply with a hightend port (>1023) in PORT command
3. Client:Hightport -> Server : high port (which server replied with port command)
4. Server will ACK the 3rd step

Passive FTP :

command : client >1023 -> server 21
data : client >1023 -> server >1023

Active : Both Client and Server intaiates connection
----------------------------------------------------

1. Client:HighPOrt->Server:21 and issues port command with (Highport+1) say 1024+1=1025 to connect back
2. Server :21-> Client : Highport :- Server ACK the connection
3. Server : 20->Client:Hightport+1 (the one mentioned in the port command in step 2)
4. Client:Hightport+1->server: 20 :- Client Send ACK to Server

Active FTP :
command : client >1023 -> server 21
data : client >(1023+1) <- server 20

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.