Sei sulla pagina 1di 9

FTP & TFTP

MADE BY SALEM AHMED SALEM ALRWIMI


FTP Introduction
TheFileTransferProtocol(FTP)isastandardnetworkprotocolusedto
transfercomputerfilesfromonehosttoanotherhostoveraTCP-based
network,suchastheInternet.
FTPisbuiltonaclient-serverarchitectureandusesseparatecontrolanddata
connectionsbetweentheclientandtheserver. FTPusersmayauthenticate
themselvesusingaclear-textsign-inprotocol,normallyintheformofa
usernameandpassword,butcanconnectanonymouslyiftheserveris
configuredtoallowit.Forsecuretransmissionthatprotectstheusernameand
password,andencryptsthecontent,FTPis
oftensecuredwithSSL/TLS(FTPS).SSHFileTransferProtocol(SFTP)is
sometimesalsousedinstead,butistechnologicallydifferent.
ThefirstFTPclientapplicationswerecommand-lineapplicationsdeveloped
beforeoperatingsystemshadgraphicaluserinterfaces,andarestillshipped
withmostWindows,Unix,andLinuxoperatingsystems. ManyFTPclientsand
automationutilitieshavesincebeendevelopedfordesktops,servers,mobile
devices,andhardware,andFTPhasbeenincorporatedintoproductivity
applications,suchasWebpageeditors.
TheoriginalspecificationfortheFileTransferProtocolwaswritten
byAbhayBhushanandpublishedasRFC114on16April1971.Until
1980,FTPranonNCP,thepredecessorofTCP/IP.Theprotocolwaslater
replacedbyaTCP/IPversion,RFC765(June1980)andRFC
959(October1985),thecurrentspecification.Severalproposedstandards
amendRFC959,forexampleRFC2228(June1997)proposessecurity
extensionsandRFC2428(September1998)addssupportforIPv6and
definesanewtype
TFTP INTRODUCTION
TrivialFileTransferProtocol(TFTP)isasimple,lock-step,filetransfer
protocolwhichallowsaclienttogetorputafileontoaremotehost.One
ofitsprimaryusesisintheearlystagesofnodesbootingfromaLocal
AreaNetwork.TFTPhasbeenusedforthisapplicationbecauseitisvery
simpletoimplement.
TFTP'sdesignwasinfluencedfromtheearlierprotocolEFTP,whichwas
partofthePUPprotocolsuite.TFTPwasfirstdefinedin1980byIEN133.
InJune1981TheTFTPProtocol(Revision2)waspublishedasRFC
783andlaterupdatedinJuly1992byRFC1350whichfixedamongother
thingstheSorcerer'sApprenticeSyndrome.InMarch1995theTFTP
OptionExtensionRFC1782updatedlaterinMay1998byRFC2347,
definedtheoptionnegotiationmechanismwhichestablishesthe
frameworkforfiletransferoptionstobenegotiatedpriortothetransfer
usingamechanismwhichisconsistentwithTFTP'soriginalspecification.
Duetoitssimpledesign,TFTPcanbeeasilyimplementedby
smallfootprintcode.Itisthereforetheprotocolofchoicefortheinitial
stagesofanynetworkbootingstrategylikeBOOTP,PXE,BSDP,etc,
whentargetingfromhighlyresourcedcomputerstoverylow
resourcedSingle-boardcomputers(SBC)andSystemonaChip(SoC).It
isalsousedtotransferfirmwareimagesandconfigurationfilestonetwork
applianceslikerouters,firewalls,IPphones,etc.TodayTFTPisvirtually
unusedforInternettransfers
TFTPisasimpleprotocolfortransferringfiles,implementedontopof
theUDP/IPprotocolsusingIANAregisteredportnumber69.TFTPwas
designedtobesmallandeasytoimplement,andthereforeitlacksmost
oftheadvancedfeaturesofferedbymorerobustfiletransferprotocols.
TFTPonlyreadsandwritesfilesfromortoaremoteserver.Itcannotlist,
delete,orrenamefilesordirectoriesandithasnoprovisionsforuser
authentication.TodayTFTPisgenerallyonlyusedonlocalarea
networks(LAN).
Communication and data transfer

FTPmayruninactiveorpassivemode,whichdetermineshowthedata
connectionisestablished.Inbothcases,theclientcreatesaTCPcontrol
connectionfromarandomunprivilegedportNtotheFTPserver
commandport21.Inactivemodes,theclientstartslisteningforincoming
dataconnectionsonportN+1fromtheserver(theclientsendstheFTP
commandPORTN+1toinformtheserveronwhichportitislistening).In
situationswheretheclientisbehindafirewallandunabletoaccept
incomingTCPconnections,passive modemaybeused.Inthismode,the
clientusesthecontrolconnectiontosendaPASVcommandtotheserver
andthenreceivesaserverIPaddressandserverportnumberfromthe
server,whichtheclientthenusestoopenadataconnectionfroman
arbitraryclientporttotheserverIPaddressandserverportnumber
received.BothmodeswereupdatedinSeptember1998tosupportIPv6.
Furtherchangeswereintroducedtothepassivemodeatthattime,
updatingittoextended passive mode
HOW FTP WORKS
How TFTP works?

TrivialFileTransferProtocol(TFTP)isasimplelightweightfiletransfer
protocol,usedfortransferringfilesoverthenetwork.Thisprotocolis
similartoFTPbutsupportsmuchlesserfeaturesandhencecomeswitha
smallerfootprint.
WhatTFTPprovides
Fasterfiletransfer,asitusesUDPasthetransportlayerprotocol
LesserCodesizeorfootprint
Asciiandbinarymodesoffiletransfer
WhatTFTPdoesnotprovide
doesnotprovideauthentication
doesnotsupportarichsetofuserinterfacecommands
The differences between FTP
and TFTP
FTPisconnectionoriented,whereasTFTPisnot.
TFTPuseserrorcheckingandflowcontrol,whereasTFTPdoesnot
causeerrorchecking.
FTPusesTCPastransportprotocol,whereasTFTPusesUDPas
transportprotocol.
AuthenticationismandatoryinFTP,whereasauthenticationisnotneeded
inTFTP.
Justgettingandputtingapplicationeffectivelyisthedesignconcernof
TFTP,whereasFTPprovidesmorecontrolanddataconnectionaspects.

Potrebbero piacerti anche