In-Depth Notes on FTP and TFTP textbook

21.1 FTP

  • Definition: File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for transferring files between hosts.
  • Challenges:
    • Different file name conventions between systems
    • Different representations for text and data
    • Different directory structures
  • Solution: FTP resolves these issues elegantly, allowing for effective file transfers despite differences.
  • Protocol Overview:
    • Uses TCP, which is connection-oriented, ensuring reliable data transfer.
    • Requires two TCP connections:
    • Control connection on well-known port 21
    • Data connection on well-known port 20

21.2 FTP Operation

  • Control Connection:

    • Step 1: Server performs a passive open on port 21.
    • Step 2: Client performs an active open using an ephemeral port.
  • Data Connection:

    • Step 1: Client sends a passive open request.
    • Step 2: Port number for data transfer is sent through the control connection.
    • Step 3: Server performs an active open on the ephemeral port provided by the client.

21.3 File Transfer Details

  • File Transfer Process:

    • The client specifies the file type, data structure, and transmission mode.
    • Ensures that both local and remote file systems are compatible during the transfer.
  • Example: Illustrates a directory listing retrieval using FTP. The client sends commands to the server, displayed with responses indicating successful connections and data transfers.

21.4 Anonymous FTP

  • Purpose: Allows users to access public data without needing specific credentials.
  • Example: Public data available at internic.net demonstrates the functionality of anonymous FTP.

21-2 TFTP

  • Definition: Trivial File Transfer Protocol (TFTP) is used for simpler file copying needs without the complexities of FTP.
  • Use Case: Ideal for situations like booting diskless workstations or routers where only configuration and bootstrap files are needed.
  • Protocol Overview:
    • Runs over UDP (User Datagram Protocol).
    • Uses well-known port 69 for file transfers, enabling quick and simple file copying tasks without overhead.