TFTP file transfers over IPv6

You can use TFTP copy commands over IPv6 to upload or download files to and from a physically connected device or a remote TFTP server, including:

  • Switch software

  • Software images

  • Switch configurations

  • ACL command files

  • Diagnostic data (crash data, crash log, and event log)

For complete information on how to configure TFTP file transfers between the switch and a TFTP server or other host device on the network, see the Management and Configuration Guide for your switch.

To upload and/or download files to the switch using TFTP in an IPv6 network, you must:

  1. Enable TFTP for IPv6 on the switch.

  2. Enter a TFTP copy command with the IPv6 address of a TFTP server in the command syntax.

  3. Optional: To enable auto-TFTP operation, enter the auto-tftp command.

Enabling TFTP for IPv6

Client and server TFTP for IPv6 is enabled by default on the switch. However, if it is disabled, you can re-enable it by specifying TFTP client or server functionality with the tftp <client|server> command.

Enter the tftp <client|server> command at the global configuration level.

Syntax:

[no] tftp <client|server [listen <oobm|data|both>]>

Enables TFTP for IPv4 and IPv6 client or server functionality so that the switch can:

  • Use TFTP client functionality to access IPv4- or IPv6-based TFTP servers in the network to receive downloaded files.

  • Use TFTP server functionality on the switch to be accessed by other IPv4 or IPv6 hosts requesting to upload files.

  • For switches that have a separate out-of-band management port, the listen parameter in a server configuration allows you to specify whether transfers take place through the out-of-band management (oobm) interface, the data interface, or both. For more information on out-of-band management, see the Management and Configuration Guide for your switch.

The no form of the command disables the client or server functionality.

Default: TFTP client and server functionality enabled


[NOTE: ]

NOTE: To disable all TFTP client or server operation on the switch except for the auto-TFTP feature, enter the no tftp <client|server> command. To re-enable TFTP client or server operation, re-enter the tftp <client|server> command. (Entering no tftp without specifying client or server affects only the client functionality. To disable or re-enable the TFTP server functionality, you must specify server in the command.)

When TFTP is disabled, instances of TFTP in the CLI copy command and the Menu interface "Download OS" screen become unavailable.

The no tftp <client|server> command does not affect auto-TFTP operation. For more information, see Using auto-TFTP for IPv6.


Copying files over IPv6 using TFTP

Use the TFTP copy commands described in this section to:

  • Download specified files from a TFTP server to a switch on which TFTP client functionality is enabled.

  • Upload specified files from a switch, on which TFTP server functionality is enabled, to a TFTP server.

Syntax:

copy tftp <target> <ipv6–addr> <filename> [oobm]

Copies (downloads) a data file from a TFTP server at the specified IPv6 address to a target file on a switch that is enabled with TFTP server functionality.

<ipv6–addr> :

If this is a link-local address, use this IPv6 address format:

fe80::<device–id> %vlan <vid>

For example: fe80::123%vlan10

If this is a global unicast address, use this IPv6 format:

<ipv6–addr>

For example: 2001:db8::123

<target> : One of the following values:

autorun-cert-file : Copies an autorun trusted certificate to the switch.

autorun–key–file : Copies an autorun key file to the switch.

command–file : Copies a file stored on a remote host and executes the ACL command script on the switch. Depending on the ACL commands stored in the file, one of the following actions is performed in the running-config file on the switch:

  • A new ACL is created.

  • An existing ACL is replaced.

  • match, permit, or deny statements are added to an existing ACL.

    For more information on ACLs, see the Access Security Guide for your switch.

config <filename> : Copies the contents of a file on a remote host to a configuration file on the switch.

flash <primary|secondary> : Copies a software file stored on a remote host to primary or secondary flash memory on the switch. To run a newly downloaded software image, enter the reload or boot system flash command.

pub–key–file : Copies a public-key file to the switch.

startup-config : Copies a configuration file on a remote host to the startup configuration file on the switch.

oobm : For switches that have a separate out-of-band management port, specifies that the transfer will be through the out-of-band management interface. (Default is transfer through the data interface.)

Syntax:

copy <source> tftp <ipv6–addr> <filename> <pc|unix> [oobm]

Copies (uploads) a source data file on a switch that is enabled with TFTP server functionality to a file on the TFTP server at the specified IPv6 address, where <source> is one of the following values:

command–output <cli–command> : Copies the output of a CLI command to the specified file on a remote host.

config <filename> : Copies the specified configuration file to a remote file on a TFTP server.

crash–data <slot-id|master> : Copies the contents of the crash data file to the specified file path on a remote host. The crash data is software-specific and used to determine the cause of a system crash. You can copy crash information from an individual slot or from the master crash file on the switch.

crash–log <slot-id|master> : Copies the contents of the crash log to the specified file path on a remote host. The crash log contains processor-specific operational data that is used to determine the cause of a system crash. You can copy the contents of the crash log from an individual slot or from the master crash log on the switch.

event–log : Copies the contents of the Event Log on the switch to the specified file path on a remote host.

flash <primary|secondary> : Copies the software file used as the primary or secondary flash image on the switch to a file on a remote host.

startup-config : Copies the startup configuration file in flash memory to a remote file on a TFTP server.

running-config : Copies the running configuration file to a remote file on a TFTP server.

<ipv6–addr> :

If this is a link-local address, use this IPv6 address format: fe80::<device–id> %vlan <vid> :

For example: fe80::123%vlan10

If this is a global unicast address, use this IPv6 format: <ipv6–addr>

For example: 2001:db8::123

oobm : For switches that have a separate out-of-band management port, specifies that the transfer will be through the out-of-band management interface. (Default is transfer through the data interface.)

Using auto-TFTP for IPv6

At switch startup, the auto-TFTP for IPv6 feature automatically downloads a software image to the switch from a specified TFTP server and then reboots the switch. To implement the process, the switch must first reboot using one of the following methods:

  • Enter the boot system flash primary command in the CLI.

  • With the default flash boot image set to primary flash (the default), enter the boot or the reload command, or cycle the power to the switch. (To reset the boot image to primary flash, use boot set-default flash primary.)

Syntax:

auto-tftp <ipv6-addr> <filename>

Configures the switch to automatically download the specified software file from the TFTP server at the specified IPv6 address. The file is downloaded into primary flash memory at switch startup. The switch then automatically reboots from primary flash.


[NOTE: ]

NOTE: To enable auto-TFTP to copy a software image to primary flash memory, the version number of the downloaded software file (for example, xx_14_01.swi) must be different from the version number currently in the primary flash image.

The current TFTP client status (enabled or disabled) does not affect auto-TFTP operation. See Enabling TFTP for IPv6.

Completion of the auto-TFTP process may require several minutes while the switch executes the TFTP transfer to primary flash and then reboots again.


The no form of the command disables auto-TFTP operation by deleting the auto-tftp entry from the startup configuration.

The no auto-tftp command does not affect the current TFTP-enabled configuration on the switch. However, entering the ip ssh filetransfer command automatically disables both auto-tftp and tftp operation.