CCNA Notes

200-301 Exam Prep

Progress0/67

0% complete

Practice TestsNew
1Networking Devices2Interfaces And Cables3OSI Model and TCP/IP Suite4Intro to the CLI5Ethernet LAN Switching - Part 16Ethernet LAN Switching - Part 27IPv4 Addressing - Part 18IPv4 Addressing - Part 29Switch Interfaces10The IPv4 Header11Routing Fundamentals - Part 111Static Routing - Part 212Life of a Packet13Subnetting - Part 114Subnetting - Part 215Subnetting (VLSM) - Part 316VLANs - Part 117VLANs - Part 218VLANs - Part 319DTP / VTP20Spanning Tree Protocol - Part 121Spanning Tree Protocol - Part 222Rapid Spanning Tree Protocol23Etherchannel24Dynamic Routing25RIP / EIGRP26OSPF - Part 127OSPF - Part 228OSPF - Part 329First Hop Redundancy Protocol30TCP and UDP31IPv6 - Part 132IPv6 - Part 233IPv6 - Part 334Standard Access Control List35Extended Access Control List36CDP and LLDP37NTP - Network Time Protocol38DNS - Domain Name System39DHCP - Dynamic Host Configuration Protocol40SNMP - Simple Network Management Protocol41SYSLOG42SSH - Secure Shell43FTP and TFTP44NAT (Static) - Part 145NAT (Dynamic) - Part 246QoS (Voice VLAN) - Part 147QoS (Quality of Service) - Part 248Security Fundamentals49Port Security50DHCP Snooping51Dynamic ARP Inspection52LAN Architectures53WAN Architectures54Virtualization and Cloud - Part 154Virtualization (Containers) - Part 254Virtualization (VRF) - Part 355Wireless Fundamentals56Wireless Architectures57Wireless Security58Wireless Configuration59Introduction to Network Automation60JSON, XML, and YAML61REST APIs62Software Defined Networking63Ansible, Puppet, and Chef67CCNA Complete Cheatsheet
/FTP and TFTP
Topic 434 min read

FTP and TFTP

/
Tip: Select text to highlight or pin your reading position

43. FTP and TFTP

THE PURPOSE OF FTP / TFTP

  • FTP (File Transfer Protocol) and TFTP (Trivial File Transfer Protocol) are INDUSTRY STANDARD PROTOCOLS used to TRANSFER FILES over a NETWORK
  • They BOTH use a CLIENT-SERVER model
    • CLIENTS can use FTP / TFTP to COPY files FROM a SERVER
    • CLIENTS can use FTP / TFTP to COPY files TO a SERVER
  • As a NETWORK ENGINEER, the most common use for FTP / TFTP is in the process of UPGRADING the OPERATING SYSTEM of a NETWORK DEVICE
  • You can use FTP / TFTP to DOWNLOAD the newer version of IOS from a SERVER and then REBOOT the DEVICE with the new IOS image

imageClick to enlarge


TFTP and FTP FUNCTIONS AND DIFFERENCES

TFTP

  • TFTP first standardized in 1981
  • Named “Trivial” because it’s SIMPLE and has only basic features compared to FTP
    • Only allows a CLIENT to COPY FILES to / from a SERVER
  • Was released after FTP, but not a REPLACEMENT for FTP.
    • It’s another tool to use when LIGHTWEIGHT SIMPLICITY is more important than FUNCTIONALITY
  • NO AUTHENTICATION (Username / Password) so SERVERS will respond to ALL FTP REQUESTS
  • NO ENCRYPTION. All DATA is sent PLAIN TEXT
  • Best used in a CONTROLLED environment to transfer SMALL FILES quickly
  • TFTP SERVERS listen on UDP PORT 69
  • UDP is CONNECTIONLESS and doesn’t provided RELIABILITY with RETRANSMISSIONS
  • However, TFTP has SIMILAR built-in FEATURES within the PROTOCOL itself

TFTP RELIABILITY

  • Every TFTP DATA message is ACKNOWLEDGED
    • If the CLIENT is transferring a FILE TO the SERVER, the SERVER will send ACK messages
    • If the SERVER is transferring a FILE TO the CLIENT, the CLIENT will send ACK messages
  • TIMERS are used, and if an EXPECTED message isn’t received in time, the waiting DEVICE will RESEND its previous message.

imageClick to enlarge

TFTP “CONNECTIONS”

imageClick to enlarge

TFTP TID (Not in the CCNA exam)

  • When the CLIENT sends the FIRST message to the SERVER, the DESTINATION PORT is UDP 69 and the SOURCE PORT is a random EPHEMERAL PORT
  • This “random port” is called a “TRANSFER IDENTIFIER” (TID) and identifies the DATA TRANSFER
  • The SERVER then also selects a RANDOM TID to use as a SOURCE PORT when it replies, NOT UDP 69
  • When the CLIENT sends the NEXT message, the DESTINATION PORT will be the SERVER’S TID, NOT UDP 69

UDP PORT 69 (TFTP) is only used at the initial request message

imageClick to enlarge


FTP

  • FTP was first standardized in 1971
  • FTP uses TCP PORTS 20 and 21
  • USERNAMES and PASSWORDS are used for AUTHENTICATION, however there is NO ENCRYPTION
  • For GREATER security, FTPS (FTP over SSL / TLS) can be used (Upgrade to FTP)
  • SSH File Transfer Protocol (SFTP) can also be used for GREATER security (New Protocol)
  • FTP is MORE complex than TFTP and ALLOWS not only FILE TRANSFERS but CLIENTS can also:
    • Navigate FILE DIRECTORIES
    • ADD / REMOVE FILES
    • LIST FILES
    • etc…
  • The CLIENT sends FTP commands to the SERVER to perform these functions

FTP CONTROL CONNECTIONS

  • FTP uses TWO TYPES of connections:
    • An FTP CONTROL connection (TCP 21) is established and used to send FTP commands and replies
    • When FILES or DATA are to be transferred, separate FTP DATA (TCP 20) connections are established and terminated as needed

imageClick to enlarge

ACTIVE MODE FTP DATA CONNECTIONS

  • The DEFAULT method of establishing FTP DATA connections is ACTIVE MODE in which the SERVER initiates the TCP connection.

imageClick to enlarge

  • In FTP PASSIVE MODE, the CLIENT initiates the DATA connection.
    • This is often necessary when the CLIENT is behind a FIREWALL, which could BLOCK the INCOMING CONNECTION from the SERVER

imageClick to enlarge

FTP VERSUS TFTP

imageClick to enlarge


IOS FILE SYSTEMS

  • A FILE SYSTEM is a way of controlling how DATA is STORED and RETRIEVED
  • You can VIEW the FILE SYSTEM of a Cisco IOS DEVICE with show file systems

imageClick to enlarge


USING FTP / TFTP IN IOS

  • You can VIEW the current version of IOS with show version

imageClick to enlarge

  • You can VIEW the contents of flash with show flash

imageClick to enlarge


COPYING FILES WITH TFTP

STEP 1

imageClick to enlarge

STEP 2

imageClick to enlarge

STEP 3

imageClick to enlarge


COPYING FILES WITH FTP

STEP 1

imageClick to enlarge

STEP 2 and 3 identical to TFTP above


COMMAND SUMMARY

imageClick to enlarge

PreviousSSH - Secure Shell
NextNAT (Static) - Part 1