12.07.2015 Views

FTP high level flow PDF - EventHelix.com

FTP high level flow PDF - EventHelix.com

FTP high level flow PDF - EventHelix.com

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DNS <strong>FTP</strong> Server <strong>FTP</strong> Client ConsoleThis sequence diagram was generated with EventStudio System Designer (http://www.<strong>EventHelix</strong>.<strong>com</strong>/EventStudio).Here we explore the sequence of interactions in a typical <strong>FTP</strong> (File Transfer Protocol) session.The example here illustrates the use of multiple TCP connections by <strong>FTP</strong>. We will cover how <strong>FTP</strong>establishes a telnet TCP connection (TCP Port 21) to control the overall <strong>flow</strong> of the <strong>FTP</strong> transfer.Then we examine the use of TCP Port 20 for establishing TCP connections fordirectory transfer and file retrieval.The <strong>com</strong>plete sequence diagram can be divided into the following steps:- DNS Query to obtain the IP address for the <strong>FTP</strong> Server- <strong>FTP</strong> Telnet connection setup and login. (USER and PASS <strong>com</strong>mands)- Obtaining a directory listing (PORT and LIST <strong>com</strong>mand)- Changing directory (CWD <strong>com</strong>mand)- Downloading a file using <strong>FTP</strong> get (PORT and RETR <strong>com</strong>mand)Copyright © 2013 <strong>EventHelix</strong>.<strong>com</strong> Inc. All Rights Reserved.DNS Query to obtain the IP address for the <strong>FTP</strong> Server.DNS Queryrecdesired = 1, queries = 1, name = ftp.any-domain.<strong>com</strong>, type = A, class = INDNS Responserecdesired = 1, answers = 1, IP Address<strong>FTP</strong> Telnet connection setup and login. (USER and PASS <strong>com</strong>mands).TCP connection establishment over the control portTCP SYNsrcport = 1175, dstport = 21, syn = 1TCP SYN+ACKsrcport = 21, dstport = 1175, syn = 1, ack = 1TCP ACKsrcport = 1175, dstport = 21, ack = 1Logging inDisplay login prompt and get user name<strong>FTP</strong> 220ftp.response.code = 220, ftp.response.arg = ANY-DOMAIN.COM <strong>FTP</strong> ServiceTCP ACKsrcport = 1175, dstport = 21, ack = 1USER ftpTCP ACKsrcport = 21, dstport = 1175, ack = 1<strong>FTP</strong> 331code = 331, arg = Anonymous access allowed, send identity (e-mail name) aspassword.Display wel<strong>com</strong>e messageEnter login informationDisplay password prompt and <strong>com</strong>plete login


DNS <strong>FTP</strong> Server <strong>FTP</strong> Client ConsolePassword promptTCP ACKsrcport = 1175, dstport = 21, ack = 1Password informationPASS abc@any-domain.<strong>com</strong>TCP ACKsrcport = 21, dstport = 1175, ack = 1<strong>FTP</strong> 230code = 230, arg = Wel<strong>com</strong>e to ftp.any-domain.<strong>com</strong><strong>FTP</strong> 230code = 230, arg = Anonymous user logged in.Login successful promptTCP ACKsrcport = 1175, dstport = 21, ack = 1Obtaining a directory listing (PORT and LIST <strong>com</strong>mand).User requests directory listingPORT 192.168.0.2 Port 5001TCP ACKsrcport = 21, dstport = 1175, ack = 1<strong>FTP</strong> 200code = 200, arg = PORT <strong>com</strong>mand successful.LISTseq-251srcport = 21, dstport = 1175, ack = 1<strong>FTP</strong> 150ftp.response.code = 150, ftp.response.arg = Opening ASCII mode dataconnection for /bin/ls.dir <strong>com</strong>mandEstablish data port connection to transfer directory listingTCP SYNsrcport = 20, dstport = 5001, syn = 1TCP SYN+ACKsrcport = 5001, dstport = 20, syn = 1, ack = 1TCP ACKsrcport = 20, dstport = 5001, ack = 1Display directory listing<strong>FTP</strong> 226ftp.response.code = 226, ftp.response.arg = Transfer <strong>com</strong>plete.


DNS <strong>FTP</strong> Server <strong>FTP</strong> Client ConsoleTCP ACKsrcport = 1175, dstport = 21, ack = 1TCP ACKsrcport = 20, dstport = 5001, ack = 1Display directory listingRelease the data port TCP connection on <strong>com</strong>pletion of the directory listingTCP FIN+ACKtcp.srcport = 20, tcp.dstport = 5001, tcp.flags.ack = 1, tcp.flags.fin = 1TCP ACKtcp.srcport = 5001, tcp.dstport = 20, tcp.flags.ack = 1TCP FIN+ACKtcp.srcport = 5001, tcp.dstport = 20, tcp.flags.ack = 1, tcp.flags.fin = 1TCP ACKtcp.srcport = 20, tcp.dstport = 5001, tcp.flags.ack = 1Changing directory (CWD <strong>com</strong>mand).Change working directory (cwd)CWD TCP ACKtcp.srcport = 21, tcp.dstport = 1175, tcp.flags.ack = 1250 CWD Successfulcode = 250, arg = CWD <strong>com</strong>mand successful.TCP ACKtcp.srcport = 1175, tcp.dstport = 21, ack = 1Downloading a file using <strong>FTP</strong> get (PORT and RETR <strong>com</strong>mand).Requesting file over the TCP control portPORT 192.168.0.2 Port 5002TCP ACKtcp.srcport = 21, tcp.dstport = 1175, ack = 1PORT 192.168.0.2 Port 5002RETR readme.txtTCP ACKtcp.srcport = 21, tcp.dstport = 1175, ack = 1<strong>FTP</strong> 150code = 150, arg = Opening ASCII mode data connection for readme.txt(1715bytes).<strong>FTP</strong> get for readme.txtSetting up the data TCP connection (3 way handshake)


DNS <strong>FTP</strong> Server <strong>FTP</strong> Client ConsoleTCP SYNtcp.srcport = 20, tcp.dstport = 5002, syn = 1, ack = 0, fin = 0TCP SYN+ACKtcp.srcport = 5002, tcp.dstport = 20, syn = 1, ack = 1TCP ACKtcp.srcport = 20, tcp.dstport = 5002, ack = 1Transfering the file over the data TCP connection<strong>FTP</strong> DATAtcp.srcport = 20, tcp.dstport = 5002, ack = 1<strong>FTP</strong> DATAtcp.srcport = 20, tcp.dstport = 5002, ack = 1TCP ACKtcp.srcport = 5002, tcp.dstport = 20, ack = 1<strong>FTP</strong> DATAtcp.srcport = 20, tcp.dstport = 5002, ack = 1<strong>FTP</strong> DATAtcp.srcport = 20, tcp.dstport = 5002, ack = 1TCP ACKtcp.srcport = 5002, tcp.dstport = 20, ack = 1Releasing the data TCP connection<strong>FTP</strong> DATA+FINtcp.srcport = 20, tcp.dstport = 5002, ack = 1, fin = 1TCP ACKtcp.srcport = 5002, tcp.dstport = 20, ack = 1TCP FIN+ACKtcp.srcport = 5002, tcp.dstport = 20, ack = 1, fin = 1TCP ACKtcp.srcport = 20, tcp.dstport = 5002, ack = 1Signal <strong>com</strong>pletion of the <strong>FTP</strong> over the control portTCP ACKtcp.srcport = 1175, tcp.dstport = 21, ack = 1<strong>FTP</strong> 226code = 226, arg = Transfer <strong>com</strong>plete.Display transfer <strong>com</strong>plete indicationTCP ACKtcp.srcport = 1175, tcp.dstport = 21, ack = 1Logging out


DNS <strong>FTP</strong> Server <strong>FTP</strong> Client ConsoleQuitting the <strong>FTP</strong> clientExit <strong>FTP</strong> client using bye <strong>com</strong>mandQUITftp.request.<strong>com</strong>mand = QUITTCP ACKtcp.srcport = 21, tcp.dstport = 1175, ack = 1<strong>FTP</strong> 221code = 221, arg = Thank you for visiting ftp.any-domain.<strong>com</strong>.TCP ACKtcp.srcport = 1175, tcp.dstport = 21, ack = 1Releasing the control TCP connectionTCP FINtcp.srcport = 21, tcp.dstport = 1175, ack = 1, fin = 1TCP ACKtcp.srcport = 1175, tcp.dstport = 21, ack = 1, fin = 1TCP FINtcp.srcport = 1175, tcp.dstport = 21, ack = 1, fin = 1TCP ACKtcp.srcport = 21, tcp.dstport = 1175, ack = 1, fin = 1This sequence diagram was generated with EventStudio System Designer (http://www.<strong>EventHelix</strong>.<strong>com</strong>/EventStudio).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!