- [Instructor] File transfer protocol, or FTP,
has been used to transfer files since 1971.
FTP relies on TCP for reliable delivery.
FTP is great for plain text transmissions,
but can also use TLS or SSL to encrypt the sessions.
FTP can run in either active or passive modes.
In both modes, the session is initiated on TCP port 21.
In active mode, the client will inform the server
on what port the server should access the client at.
The server will then initiate a connection to the client
from TCP port 20 for the data transfer.
In most situations,
a client's machine will be behind a firewall
or utilize a software firewall,
which will prevent incoming connections.
If this is the case, passive mode should be used.
In passive mode, the server provides a specific port
for the client to connect to.
The client then initiates the outbound connection
to the server for data transfer.
Trivial file transport protocol, or TFTP,
is a light transfer protocol.
Its nature is perfect for devices
that pull their configuration on boot
or as a service for network hardware
to transfer firmware and configurations.
It's used by IP phones, routers, switches,
and many smaller devices attached to networks.
TFTP utilizes UDP port 69,
so it is a connectionless service.
Being that it's a light protocol,
it can't list, rename, delete files or directories.
It also doesn't support any form of authentication.
By default, files are transferred at 512 byte blocks,
but the protocol can negotiate a larger block size.
Each block is transferred in a single packet.
After each block, an acknowledgement is sent back.
If there is no acknowledgement,
then the packet is retransmitted.
Modern file sharing services and systems via browser
have all but killed the need for dedicated FTP servers.
When a user is in a remote area
and just needs to transfer a file somewhere else,
it can still be an invaluable resource.