Firmware and File Management Commands

Use these commands to upload and download firmware and other files to and from the switch, and verify the digital signature of firmware and other files.

copy

M4250

M4350

The copy command uploads and downloads files to and from the switch. You can also use the copy command to update the firmware by uploading firmware (image) files and manage the dual images (image 1 and image 2) on the file system.

Upload and download files from a server using FTP, TFTP, Xmodem, Ymodem, or Zmodem. SFTP and SCP are available as additional transfer methods if the software package supports secure management. If FTP is used, a password is required.

Format copy source destination {verify | noverify}
Mode Privileged EXEC

Replace the source and destination parameters with the options that are described in the table further down in this section. For the url source and destination arguments that are listed in the table further down in this section, use one of the following values:

  • xmodem
  • ymodem
  • zmodem
  • tftp://{ipaddress | hostname}/filepath/filename
  • ftp://{user@ipaddr | hostname}/path/filename
  • scp://{user@ipaddr | hostname}/path/filename
  • sftp://{user@ipaddr | hostname}/path/filename
  • usb://filepath/filename

The verify and noverify keywords are available only if the image/configuration verify options feature is enabled (see file verify); verify specifies that digital signature verification will be performed for the specified downloaded image or configuration file. noverify specifies that no verification will be performed.

The keyword ias-users supports the downloading of the IAS user database file. When the IAS users file is downloaded, the switch IAS user’s database is replaced with the users and its attributes available in the downloaded file. In the command copy url ias-users, for url one of the following is used for IAS users file:

JSON
{{tftp://<ipaddr> | <ipv6address> | <hostname>/<filepath>/<filename>} |
{sftp | scp://<username>@<ipaddress>/<filepath>/<filename>}}
Note: The maximum length for the file path is 160 characters, and the maximum length for the file name is 31 characters.

For FTP, TFTP, SFTP and SCP, the ipaddr or hostname parameter is the IP address or host name of the server, filepath is the path to the file, and filename is the name of the file you want to upload or download. For SFTP and SCP, the username parameter is the user name for logging into the remote server via SSH.

Note: ip6address is also a valid parameter for routing packages that support IPv6.

For an M4350 series switch, to copy OpenFlow SSL certificates to the switch using TFTP or XMODEM, use only the following options pertinent to the OpenFlow SSL certificates.

Format copy [mode/file] nvram:{openflow-ssl-ca-cert | openflow-ssl-cert | openflow-ssl-priv-key} [source {ip-address | unit/slot/port | loopback number | serviceport | vlan vlan-id}]
Mode Privileged EXEC
CAUTION: Before you load a new release image to make a backup, upload the existing startup-config.cfg file to the server.
Source Destination Description
nvram:backup-config nvram:startup-config Copies the backup configuration to the startup configuration.
nvram:clibanner url Copies the CLI banner to a server.
nvram:cpupktcapture.pcap url Uploads CPU packets capture file.
nvram:crash-log url Copies the crash log to a server.
nvram:errorlog url Copies the error log file to a server.
nvram:factory-defaults url Uploads factory defaults file.
nvram:log url Copies the log file to a server.
nvram:script scriptname url Copies a specified configuration script file to a server.
nvram:startup-config nvram:backup-config Copies the startup configuration to the backup configuration.
nvram:startup-config url Copies the startup configuration to a server.
nvram:traplog url Copies the trap log file to a server.
system:running-config nvram:startup-config Saves the running configuration to NVRAM.
system:running-config nvram:factory-defaults Saves the running configuration to NVRAM to the factory-defaults file.
nvram:application sourcefilename url Saves the source application file with the name specified by the sourcefilename argument.
url nvram:application destfilename Downloads the source application file to the switch and saves it with the name specified by the destfilename argument.
url nvram:ca-root index

Downloads the CA certificate file to the switch. The CA certificate file is saved on the switch in the CAindex.pem format.

For example, if you enter the copy tftp://172.26.2.21/mycertificate.pem nvram:ca-root 3 command, the CA certificate file is saved on switch with the name CA3.PEM.

url nvram:clibanner Downloads the CLI banner to the system.
url nvram:clientkey index

Downloads the client key file to the switch. The client key file is saved on the switch in the clientindex.key format.

For example, if you enter the copy tftp://172.26.2.21/client.key nvram:clientkey 4 command, the client key file is saved on switch with the name client4.key.

url nvram:client-ssl-cert index

Downloads the client certificate file to the switch. The client certificate file is saved on the switch in the clientindex.pem format.

For example, if you enter the copy tftp://172.26.2.21/client.pem nvram:client-ssl-cert 2 command, the client key file is saved on switch with the name client2.pem.

url nvram:factory-defaults Downloads the file as the factory default configuration.
url nvram:publickey-config Downloads the Public Key for Configuration Script validation.
url nvram:publickey-image Downloads Public Key for Image validation.
url nvram:script destfilename Downloads a configuration script file to the system. During the download of a configuration script, the copy command validates the script. In case of any error, the command lists all the lines at the end of the validation process and prompts you to confirm before copying the script file.
url nvram:script destfilename noval

When you use this option, the copy command does not validate the downloaded script file. An example of the CLI command follows:

CODE
(NETGEAR Switch) #copy tftp://1.1.1.1/file.scr nvram:script file.scr noval
url nvram:sshkey-dsa Downloads an SSH key file. For more information, see Secure Shell Commands.
url nvram:sshkey-rsa2 Downloads an SSH key file.
url nvram:sslpem-dhweak Downloads an HTTP secure-server certificate.
url nvram:sslpem-dhstrong Downloads an HTTP secure-server certificate.
url nvram:sslpem-root Downloads an HTTP secure-server certificate. For more information, see Hypertext Transfer Protocol Commands.
url nvram:sslpem-server Downloads an HTTP secure-server certificate.
url nvram:startup-config Downloads the startup configuration file to the system.
url ias-users Downloads an IAS users database file to the system. When the IAS users file is downloaded, the switch IAS user’s database is replaced with the users and their attributes available in the downloaded file.
url {image1 | image2} Download an image from the remote server to either image. The downloaded image is distributed to the stack members.
url nvram:tech-support-cmds

Download the tech-support-cmds file to the switch.

You can prepare a list of commands in this file. The tech-support infrastructure reads this file and displays the output of these additional commands if you issue the show tech-support command. This method is not supported under a subtree command such as the show tech-support dot3ad command.

{image1 | image2} url Upload either image to the remote server.
{image1 | image2} unit://unit/{image1 | image2} For an M4350 series switch, copy an image from the primary management unit to a specific member in a stack. Use the unit parameter to specify the member to which the image must be copied.
{image1 | image2} unit://*/{image1 | image2} For an M4350 series switch, copy an image from the primary management unit to all of the members in a stack.

Command example:

The following example shows an ias users file that is downloaded and applied.

CODE
(NETGEAR Switch) #copy tftp://10.131.17.104/aaa_users.txt ias-users

Mode........................................... TFTP
Set Server IP.................................. 10.131.17.104
Path........................................... ./
Filename....................................... aaa_users.txt
Data Type...................................... IAS Users

Management access will be blocked for the duration of the transfer
Are you sure you want to start? (y/n) y

File transfer operation completed successfully.

Validating and updating the users to the IAS users database.

Updated IAS users database successfully.

file verify

M4250

M4350

This command enables digital signature verification while an image and/or configuration file is downloaded to the switch.

Format file verify {all | image | none | script}
Mode Global Config
Parameter Description
All Verifies the digital signature of both image and configuration files.
Image Verifies the digital signature of image files only.
None Disables digital signature verification for both images and configuration files.
Script Verifies the digital signature of configuration files.

no file verify

Resets the configured digital signature verification value to the factory default value.

Format no file verify
Mode Global Config

image verify

M4250

M4350

Use this command to validate an image file. The file verify command validates an image during download, whereas the image verify command validates an image in one of two partitions.

A digest of the image that is being validated is calculated and compared with a digest from the digital signature that was extracted (during download) of the same image. A match indicates a valid image.

Format image verify {image1 | image2}
Mode Privileged EXEC