< Home

tftp

Function

The tftp command uploads the file to the TFTP server or downloads the file on the TFTP server to the local device.

Format

tftp [ -a source-ip-address | -i interface-type interface-number ] tftp-server [ public-net | vpn-instance vpn-instance-name ] { get | put } source-filename [ destination-filename ]

tftp ipv6 [ -a source-ip-address ] tftp-server-ipv6 [ -oi interface-type interface-number ] { get | put } source-filename [ destination-filename ]

Parameters

Parameter Description Value
-a source-ip-address Specifies the IP address of the local device. -
-i interface-type interface-number Specifies the source interface on the local device. -
-oi interface-type interface-number Specifies the outgoing interface on the local device. -
tftp-server Specifies the IPv4 address or the host name of the TFTP server. The value is a string of 1 to 255 characters.
tftp-server-ipv6 Specifies the IPv6 address or the host name of the TFTP server. The value is a string of 1 to 46 characters.
public-net Indicates that the TFTP server is connected in the public network. -
vpn-instance vpn-instance-name Specifies the name of the VPN instance. The value is a string of 1 to 31 characters.
get Downloads files. -
put Uploads files. -
source-filename Specifies the source file name. The name is a string of 1 to 64 characters.
destination-filename Specifies the destination file name. The name is a string of 1 to 64 characters.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When the name of the local file is not specified, the file is saved with the original name.

The tftp command is used to send files to an IPv6 host by means of TFTP. The default transmission data type is binary. This version does not support the transmission data type of ASCII. You can specify any destination file as desired. By default, source-filename and destination-filename are the same.

By specifying a source IP address, you can communicate with the server side by using this IP address; thus, the server side can perform security check over the user side.

If the set net-manager vpn-instance command is run to configure the NMS to manage network elements through a VPN instance, either of the following situations occurs.
  • If neither public-net nor vpn-instance is configured, the system accesses the TFTP server in the VPN instance.

  • If public-net is configured, the system accesses the TFTP server on the public network.

Precautions

TFTP file transmission fails on a heavily-loaded device (for example, CPU usage exceeds 80% or memory usage exceeds 90%) due to a failure in task scheduling or memory application. Therefore, it is recommended that users perform maintenance when the device is lightly loaded.

The file system has a restriction on the number of files in the root directory. Therefore, if more than 50 files exist in the root directory, creating new files in this directory may fail.

Example

# Download the vrpcfg.txt file at the root directory of the TFTP server to the local CF card. IP address of the TFTP server is 10.10.10.1. Save the downloaded file with the name as vrpcfg.bak.

<sysname> tftp 10.10.10.1 get vrpcfg.txt hda1:/vrpcfg.bak

# Upload the vrpcfg.txt file at the root directory of the hda1 to the default directory of the TFTP server. IP address of the TFTP server is 10.10.10.12. Save the uploaded file with the name as vrpcfg.bak.

<sysname> tftp 10.10.10.1 put hda1:/vrpcfg.txt vrpcfg.bak

# Get data from the remote TFTP server by providing the link-local address and interface name.

<sysname> tftp ipv6 2001:db8::250:daff:fe91:e058 -oi GigabitEthernet 0/0/6 get filetoget filetoget
Info: Transfer file in binary mode.
Downloading the file from the remote TFTP server. Please wait...
100%
TFTP: Downloading the file successfully.
249704 byte(s) received in 10 second(s).
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >