Chapter 19 File Transfer FTP and TFTP Objectives
Chapter 19 File Transfer: FTP and TFTP Objectives Upon completion you will be able to: • Understand the connections needed for FTP file transfer • Be familiar with FTP commands and responses • Know the differences between FTP and TFTP • Be familiar with TFTP message types • Understand TFTP flow and error control TCP/IP Protocol Suite 1
19. 1 FILE TRANSFER PROTOCOL (FTP) File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. The topics discussed in this section include: Connections Communication Command Processing File Transfer Anonymous FTP TCP/IP Protocol Suite 2
Note: FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection and the well-known port 20 for the data connection. TCP/IP Protocol Suite 3
Figure 19. 1 TCP/IP Protocol Suite FTP 4
Figure 19. 2 TCP/IP Protocol Suite Opening the control connection 5
Figure 19. 3 TCP/IP Protocol Suite Creating the data connection 6
Figure 19. 4 TCP/IP Protocol Suite Using the control connection 7
Figure 19. 5 TCP/IP Protocol Suite Using the data connection 8
Figure 19. 6 TCP/IP Protocol Suite Command processing 9
Table 19. 1 Access commands TCP/IP Protocol Suite 10
Table 19. 2 File management commands TCP/IP Protocol Suite 11
Table 19. 3 Data formatting commands TCP/IP Protocol Suite 12
Table 19. 4 Port defining commands TCP/IP Protocol Suite 13
Table 19. 5 File transfer commands TCP/IP Protocol Suite 14
Table 19. 5 File transfer commands (continued) TCP/IP Protocol Suite 15
Table 19. 6 Miscellaneous commands TCP/IP Protocol Suite 16
Table 19. 7 Responses TCP/IP Protocol Suite 17
Table 19. 7 Responses (continued) TCP/IP Protocol Suite 18
Table 19. 7 Responses (continued) TCP/IP Protocol Suite 19
Table 19. 7 Responses (continued) TCP/IP Protocol Suite 20
Table 19. 7 Responses (continued) TCP/IP Protocol Suite 21
Figure 19. 7 TCP/IP Protocol Suite File transfer 22
Figure 19. 8 TCP/IP Protocol Suite Example 1 23
19. 2 TRIVIAL FILE TRANSFER PROTOCOL (TFTP) Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol without the sophisticated features of FTP. The topics discussed in this section include: Messages Connection Data Transfer UDP Ports TFTP Example TFTP Options Security Applications TCP/IP Protocol Suite 24
Note: TFTP uses the services of UDP on the well-known port 69. TCP/IP Protocol Suite 25
Figure 19. 10 TCP/IP Protocol Suite Message categories 26
Figure 19. 11 TCP/IP Protocol Suite RRQ format 27
Figure 19. 12 TCP/IP Protocol Suite WRQ format 28
Figure 19. 13 TCP/IP Protocol Suite DATA format 29
Figure 19. 14 TCP/IP Protocol Suite ACK format 30
Figure 19. 15 TCP/IP Protocol Suite ERROR format 31
Table 19. 8 Error numbers and their meanings TCP/IP Protocol Suite 32
Figure 19. 16 TCP/IP Protocol Suite Connection establishment 33
Figure 19. 17 TCP/IP Protocol Suite Sorcerer’s apprentice bug 34
Figure 19. 18 TCP/IP Protocol Suite UDP port numbers used by TFTP 35
Figure 19. 19 TCP/IP Protocol Suite TFTP example 36
- Slides: 36