Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

The tftp command is used to transfer files between the local device and the TFTP server by TFTP protocol.


Command Syntax

  • Download a file:
    • From the ">" prompt, use the following format,

                     file tftp get remote-file <remote-file-path> [local-file local-file-path] ip-address <ip-address>[vrf <vrf-name>]

    • From the "#" prompt, add run in front of the command,

                     run file tftp get remote-file <remote-file-path> [local-file local-file-path] ip-address <ip-address>[vrf <vrf-name>]

  •   Upload a file:
    • From the ">" prompt, use the following format,

     file tftp put local-file <local-file-path> [remote-file <remote-file-path>] ip-address <ip-address>[vrf <vrf-name>]

    • From the "#" prompt, add run in front of the command,

     run file tftp put local-file <local-file-path> [remote-file <remote-file-path>] ip-address <ip-address>[vrf <vrf-name>]


Parameter

Parameter

Description

get

Download a file.

put

Upload a file.

remote-file <remote-file-path>

Specifies the file path on TFTP server. The value is a string.

local-file <local-file-path>

Specifies the file path on local device. The value is a string.

ip-address <ip-address>

Specifies the IPv4/IPv6 address or host name for the TFTP server. The value is a string.

vrf <vrf-name>

Optional. Specifies a VRF name. The value is a string.

  •   When a VRF name is specified, find the next hop routing information from the specified VRF domain.
  •   When no VRF is specified, find the next hop routing information from the default VRF.


Usage Guidelines

Use the TFTP service to upload or download files with the following precautions:

  •   Usually, the TFTP server specifies a directory as the default TFTP directory, when use the tftp get remote-file <remote-file-path> command, don’t need give the full path for the file, just type the sub-directory of the default directory.

       For example, suppose there is a file fileA in the default TFTP directory, we can run the following command to download this file:

Admin@Xorplus# run file tftp get remote-file fileA
  •   On the PICA8 switch, the TFTP downloaded file is saved in directory /cftmp/ by default.


Example

  •   Download file syslog.txt from the root directory of the TFTP server to the local device. The IP address of the TFTP server is 10.1.1.1. Save the downloaded file to the local device as file syslog.bak.
admin@Xorplus> file tftp get remote-file syslog.txt local-file syslog.bak ip-address 10.1.1.1
  • No labels