Download bin file from cisco router






















This document explains how to copy a system image from one device to another within the same router, and from one router to another. This document is not restricted to specific software and hardware versions. The platforms used for the purpose of this document are Cisco series routers and Cisco series routers. Refer to Cisco Technical Tips Conventions for more information on document conventions. The table below provides command options for copying a system image from one device to another methods vary according to different platforms :.

The table below lists the various locations to which you can copy an image from a TFTP server. Solution With SCP enabled on the Cisco device, you can copy the file from local PC to devices without the need of any server or application. Linux: [root root ios] ls -lshr total M 80M -rw-r--r Here is the minimum configuration that is required on the device.

All rights reserved. Contributed by Cisco Engineers Mohammad Mehtabuddin. Was this Document Helpful? Yes No Feedback. You are prompted only once at the beginning of this deletion process. For filesystem , use flash: for the system board flash device. For file-url , enter the name of the directory to be deleted. All the files in the directory and the directory are removed. To copy a file from a source to a destination, use the copy source-url destination-url privileged EXEC command.

For the source and destination URLs, you can use running-config and startup-config keyword shortcuts. For example, the copy running-config startup-config command saves the currently running configuration file to the NVRAM section of flash memory to be used as the configuration during system initialization. You can also copy from special file systems xmodem: , ymodem: as the source for the file from a network machine that uses the Xmodem or Ymodem protocol.

Network file system URLs include ftp: , rcp: , and tftp: and have these syntaxes:. Some invalid combinations of source and destination exist.

Specifically, you cannot copy these combinations:. For specific examples of using the copy command with configuration files, see the "Working with Configuration Files" section. When you no longer need files on a flash memory device, you can permanently delete them. Use the filesystem : option to specify the device from which to delete the files. If you omit the filesystem : option, the switch uses the default device specified by the cd command.

Use the file-url option, to specify the path directory and the name of the file to be deleted. When you attempt to delete files, the system prompts you to confirm the deletion of each file.

You are prompted only once at the beginning of the deletion process. We recommend that you use the software clean command instead of the delete command when you are removing package files and provisioning files.

The software clean command leaves the running package files and the current provisioning packages. Beginning in privileged EXEC mode, follow these steps to delete unnecessary package files and provisioning files on the flash memory device:. If a path is not specified, the path is the boot path.

This example shows how to use the command to delete unused files on each switch in a two-switch stack:. When the switch is running in installed mode and you attempt to delete the current package files or provisioning file, the system displays additional caution messages. The following example shows the warning message and confirmation prompts displayed when you try to delete a package file that is in use:. You can create a file and write files into it, list the files in a file, and extract the files from a file as described in the next sections.

Beginning in privileged EXEC mode, follow these steps to create a file, display the contents, and extract it:. For destination-url , specify the destination URL alias for the local or network file system and the name of the file to create. The -filename. These options are supported:. You can also specify an optional list of files or directories within the source directory to add to the new file. If none are specified, all files and directories at this level are written to the newly created file.

For source-url , specify the source URL alias for the local or network file system. You can also limit the file displays by specifying a list of files or directories after the file. Only those files appear. If none are specified, all files and directories appear. For source-url , specify the source URL alias for the local file system. If none are specified, all files and directories are extracted. Displays the contents of any readable file, including a file on a remote file system.

This example shows how to create a file. This command writes the contents of the new-configs directory on the local flash device to a file named saved. This example shows how to extract the contents of a file located on the TFTP server at Configuration files contain commands entered to customize the function of the Cisco IOS software.

A way to create a basic configuration file is to use the setup program or to enter the setup privileged EXEC command. You perform this task when you want to:. For example, you might add another switch to your network and want it to have a configuration similar to the original switch. By copying the file to the new switch, you can change the relevant parts rather than recreating the whole file. You might perform this task to back up a current configuration file to a server before changing its contents so that you can later restore the original configuration file from the server.

The protocol you use depends on which type of server you are using. Creating configuration files can aid in your switch configuration. Configuration files can contain some or all of the commands needed to configure one or more switches.

For example, you might want to download the same configuration file to several switches that have the same hardware configuration. If you are accessing the switch through a network connection instead of through a direct connection to the console port or Ethernet management port, keep in mind that some configuration changes such as changing the switch IP address or disabling ports can cause a loss of connectivity to the switch. The switch does not erase the existing running configuration before adding the commands.

If a command in the copied configuration file replaces a command in the existing configuration file, the existing command is erased. For example, if the copied configuration file contains a different IP address in a particular command than the existing configuration, the IP address in the copied configuration is used. However, some commands in the existing configuration might not be replaced or negated.

In this case, the resulting configuration file is a mixture of the existing configuration file and the copied configuration file, with the copied configuration file having precedence.

Startup configuration files are used during system startup to configure the software. Running configuration files contain the current configuration of the software. The two configuration files can be different. For example, you might want to change the configuration for a short time period rather than permanently.

In this case, you would change the running configuration but not save the configuration by using the copy running-config startup-config privileged EXEC command. When creating a configuration file, you must list commands logically so that the system can respond appropriately. This is one method of creating a configuration file:.

Step 1 Copy an existing configuration from a switch to a server. Step 3 Extract the portion of the configuration file with the desired commands, and save it in a new file. Step 4 Copy the configuration file to the appropriate server location. Step 5 Make sure the permissions on the file are set to world-read. You can configure the switch by using configuration files you create, download from another switch, or download from a TFTP server. You can copy upload configuration files to a TFTP server for storage.

To restart the daemon, either stop the inetd process and restart it, or enter a fastboot command on the SunOS 4. For more information on the TFTP daemon, see the documentation for your workstation. The switch and the TFTP server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the TFTP server by using the ping command. The permission on the file should be world-read. To create an empty file, enter the touch filename command, where filename is the name of the file you will use when uploading it to the server.

Permissions on the file should be world-write. To configure the switch by using a configuration file downloaded from a TFTP server, follow these steps:. Step 3 Log into the switch through the console port, the Ethernet management port, or a Telnet session. The configuration file downloads, and the commands are executed as the file is parsed line-by-line.

This example shows how to configure the software from the file tokyo-confg at IP address To upload a configuration file from a switch to a TFTP server for storage, follow these steps:. Step 2 Log into the switch through the console port, the Ethernet management port, or a Telnet session.

This example shows how to upload a configuration file from a switch to a TFTP server:. When you copy a configuration file from the switch to a server by using FTP, the Cisco IOS software sends the first valid username in this list:. The variable username is the username associated with the current session, switchname is the configured hostname, and domain is the domain of the switch.

The username and password must be associated with an account on the FTP server. Use the ip ftp username and ip ftp password commands to specify a username and password for all copies.

Include the username in the copy command if you want to specify only a username for that copy operation. If the server has a directory structure, the configuration file is written to or copied from the directory associated with the username on the server.

For example, if the configuration file resides in the home directory of a user on the server, specify that user's name as the remote username. Before you begin downloading or uploading a configuration file, do the following:. The switch and the FTP server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the FTP server by using the ping command.

You can enter the show users privileged EXEC command to view the valid username. If you do not want to use this username, create a new FTP username by using the ip ftp username username global configuration command during all copy operations.

If you are accessing the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the FTP username. Include the username in the copy command if you want to specify a username for only that copy operation. This step is required only if you override the default remote username or password.

Copies the configuration file from the FTP server to the running configuration or to the startup configuration file. This example shows how to copy a configuration file named host1-confg from the home directory for user netadmin1 on the remote server with an IP address of This example shows how to specify a remote username of netadmin1.

The software copies the configuration file host2-confg from the home directory for user netadmin1 on the remote server with an IP address of Copies the specified configuration file to the specified location on the FTP server. This example shows how to copy the running configuration file named switch2-confg to the netadmin1 directory on the remote host with an IP address of This example shows how to store a startup configuration file on a server by using FTP to copy the file:.

To copy configuration files using RCP you need access to a server that supports the remote shell rsh. Most UNIX systems support rsh. Because you are copying a file from one place to another, you must have read permission on the source file and write permission on the destination file. If the destination file does not exist, RCP creates it for you. When you copy a configuration file from the switch to a server, the Cisco IOS software sends the first valid username in this list:.

For example, if the user is connected to the router through Telnet and was authenticated through the username command, the switch software sends the Telnet username as the remote username.

For a successful RCP copy request, you must define an account on the network server for the remote username. If the server has a directory structure, the configuration file is written to or copied from the directory associated with the remote username on the server. For example, if the configuration file is in the home directory of a user on the server, specify that user's name as the remote username.

Before you begin downloading or uploading a configuration file by using RCP, do the following:. The switch and the server must be in the same subnetwork if you do not have a router to route traffic between subnets.

Check connectivity to the RCP server by using the ping command. If you do not want to use this username, create a new RCP username by using the ip rcmd remote-username username global configuration command to be used during all copy operations.



0コメント

  • 1000 / 1000