DOC PREVIEW
GT ECE 4110 - FTP FILE TRANSFER PROTOCOL

This preview shows page 1-2-3-4-5 out of 16 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 161FTP FILE TRANSFER PROTOCOLFTP uses TCP. FTP uses two simultaneous TCP connections. Server port 21 is used for control, server port 20 for data transfers.Control Connection:1. Server socket code puts server port 21 in passive open state “listen”2. Client socket executes an active open by sending SYN and supplies an ephemeral port (for example port 1046)Data Connection:1. Client not the server issues a passive open using ephemeral port (for example 1047)2. Client sends this port number to server using control connection3. Server receives port number and indicates active open (3 way handshake) from port 20 to the client ephemeral port received (for example port 1047)Forouzan Chapter 19, Stevens Chapter 272CONTROL PROCESSDATA TRANSFER PROCESS10461047CONTROL PROCESSDATA TRANSFER PROCESS2120Client ServerFTP BLOCK DIAGRAM3FTP COMMANDS SENT ACROSS CONTROL CHANNELCommand Type of Command Meaning220 Response Command OKUSER Access Command USED ID331 Response User name OK, need passwordPASS Access Command User Password230 Response User Login OKSYST Misc command Ask about server Operating SystemTYPE I Data Format Command Define File Type Image200 Response Command OKPORT Port Defining Command Client chooses portRETR File Transfer Command Retrieve Files150 Response File Status OK226 Response Closing Data ConnectionQUIT Access Command Log Out221 Response Service Closing4So how does FTP work with dynamic NAT?See :http://www.slacksite.com/other/ftp.htmlProblem: Client connects to server and then server starts a new connection back to the client. This is known as active FTP. This appears as a new connection and will not pass through NAT. Solution: Passive FTP. The client initiates both connections to the server. 1. Client opens two ports. 2. The first port is used to contact the server on port 21. 3. Instead of a PORT command to server, client sends PASV command. 4. Server opens another port and tells client what port the server has opened. 5. Client initiates the second connection.5In experiment 2, ftp 138.210.240.151 was run on machine 57.35.6.11. The commands typed were:ftp 138.210.240.151secure_classsecure_classget abcexit The file abc is 3718 bytes in size as determined by ls –lart on the machine 138.210.240.151. The data was collected using ethereal (only FTP and TCP datagrams shown): No. Time Source Destination Protocol Info 9 8.968492 57.35.6.11 138.210.240.151 TCP 32785 > ftp [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=240441 TSER=0 WS=0 10 8.971516 138.210.240.151 57.35.6.11 TCP ftp > 32785 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=4025958 TSER=240441 WS=0 11 8.971533 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=1 Ack=1 Win=5840 Len=0 TSV=240441 TSER=4025958 12 8.978251 138.210.240.151 57.35.6.11 FTP Response: 220 ready, dude (vsFTPd 1.1.0: beat me, break me) 13 8.978286 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=1 Ack=52 Win=5840 Len=0 TSV=240442 TSER=4025962 14 9.001899 57.35.6.11 138.210.240.151 FTP Request: AUTH GSSAPI 15 9.003140 138.210.240.151 57.35.6.11 TCP ftp > 32785 [ACK] Seq=52 Ack=14 Win=5792 Len=0 TSV=4025974 TSER=240444 16 9.003457 138.210.240.151 57.35.6.11 FTP Response: 530 Please login with USER and PASS. 17 9.020801 57.35.6.11 138.210.240.151 FTP Request: AUTH KERBEROS_V4 18 9.022315 138.210.240.151 57.35.6.11 FTP Response: 530 Please login with USER and PASS. 19 9.056965 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=32 Ack=128 Win=5840 Len=0 TSV=240450 TSER=4025984 23 13.508878 57.35.6.11 138.210.240.151 FTP Request: USER secure_class 24 13.510625 138.210.240.151 57.35.6.11 FTP Response: 331 Please specify the password. 25 13.510802 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=51 Ack=162 Win=5840 Len=0 TSV=240895 TSER=4028283 29 17.508838 57.35.6.11 138.210.240.151 FTP Request: PASS secure_class 30 17.522820 138.210.240.151 57.35.6.11 FTP Response: 230 Login successful. Have fun. 31 17.523007 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=70 Ack=195 Win=5840 Len=0 TSV=241296 TSER=4030337 32 17.523040 57.35.6.11 138.210.240.151 FTP Request: SYST 33 17.524537 138.210.240.151 57.35.6.11 FTP Response: 215 UNIX Type: L8 34 17.566974 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=76 Ack=214 Win=5840 Len=0 TSV=241301 TSER=4030338 37 21.524831 57.35.6.11 138.210.240.151 FTP Request: TYPE I 38 21.526497 138.210.240.151 57.35.6.11 FTP Response: 200 Binary it is, then. 39 21.526676 57.35.6.11 138.210.240.151 TCP 32785 > ftp [ACK] Seq=84 Ack=239 Win=5840 Len=0 TSV=241696 TSER=4032387 40 21.526703 57.35.6.11 138.210.240.151 FTP Request: PASV 41 21.528527 138.210.240.151 57.35.6.11 FTP Response: 227 Entering Passive Mode (138,210,240,151,79,249) 42 21.528751 57.35.6.11 138.210.240.151 TCP 32786 > 20473 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=241697 TSER=0 WS=0 43 21.530022 138.210.240.151 57.35.6.11 TCP 20473 > 32786 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=4032389 TSER=241697 WS=0 44 21.530035 57.35.6.11 138.210.240.151 TCP 32786 > 20473 [ACK] Seq=1 Ack=1 Win=5840 Len=0 TSV=241697 TSER=4032389 45 21.541632 57.35.6.11 138.210.240.151 FTP Request: RETR abc 46 21.543227 138.210.240.151 57.35.6.11 FTP Response: 150 Opening BINARY mode data connection for abc (3718 bytes).6 47 21.547104 138.210.240.151 57.35.6.11 TCP 20473 > 32786 [ACK] Seq=1 Ack=1 Win=5792 Len=1448 TSV=4032396 TSER=241697 48 21.547144 57.35.6.11 138.210.240.151 TCP 32786 > 20473 [ACK] Seq=1 Ack=1449


View Full Document

GT ECE 4110 - FTP FILE TRANSFER PROTOCOL

Documents in this Course
PUSH Flag

PUSH Flag

17 pages

Ethernet

Ethernet

33 pages

Load more
Download FTP FILE TRANSFER PROTOCOL
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view FTP FILE TRANSFER PROTOCOL and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view FTP FILE TRANSFER PROTOCOL 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?