The syntax of the TFTP call is dependent on the operating system and program used. For the Windows-native TFTP client, for example, the syntax is as follows:
tftp [-i] <Host> get|put <LocalFile|Command> <RemoteFile|Command>
The ASCII format is preconfigured on many TFTP clients. Binary transmission therefore usually needs to be selected explicitly for the transfer of binary data (e.g. a firmware file). Under Windows this is done with the parameter -i.
If the device is password-protected, user name and password must be included in the TFTP command. In TFTP, the user name and password are coded in the source (TFTP read request) or target file names (TFTP write request). The file name is then composed either of the root password and the command to be executed (for supervisors), or of the combination of user name, password and then the command (for local administrators). A command sent by TFTP therefore resembles the following:
- <Root-Password> <Command>
- <Username>:<Password>@<Command>
Commands can appear as follows:
- readmib: Command for importing a device MIB file (SNMP management information base).
- readconfig: Command for reading a configuration file.
- writeconfig: Command for importing a configuration file.
- writeflash: Command for importing a firmware file.