Moving Files and Images Between a Router and TFTP Server via SNMP

Similar documents
Configuring Static and Dynamic NAT Simultaneously

Configuring DNS on Cisco Routers

Table of Contents. Cisco How to Download a Software Image to a Cisco 2600 through TFTP Using the tftpdnld ROMmon Command

Password Recovery Procedure for the Cisco 806, 826, 827, 828, 831, 836, 837 and 881 Series Routers

Password Recovery Procedure for the Cisco 3600 and 3800 Series Routers

Password Recovery Procedure for the Cisco Catalyst 2948G L3, 4840G, and 4908G L3 Switch Routers

Table of Contents. Cisco How to Download a Software Image to a Cisco 2600 via TFTP Using the tftpdnld ROMmon Command

The Purpose and Use of the Configuration Register on All Cisco Routers

Syslog Server Configuration on Wireless LAN Controllers (WLCs)

Lab 5.5 Configuring Logging

Chapter 6 Updating Software Images and Configuration Files

Password Recovery Procedure for the Cisco 2900 Series Integrated Services Router

Unity Error Message: Your voic box is almost full

How To Configure InterVLAN Routing on Layer 3 Switches

Upgrading Software Images on Catalyst Series Switches/routers

Managing vlan.dat in Cisco Catalyst Switches Running Cisco IOS Software

CCNA 2 Chapter 5. Managing Cisco IOS Software

Xmodem Console Download Procedure Using ROMmon

Upgrading Software Using the Online Installer

Configuring SNMP and using the NetFlow MIB to Monitor NetFlow Data


3.1 Connecting to a Router and Basic Configuration

ACS 5.x and later: Integration with Microsoft Active Directory Configuration Example

Sample Configuration Using the ip nat outside source list C

Sample Configuration Using the ip nat outside source static

PIX/ASA: Upgrade a Software Image using ASDM or CLI Configuration Example

Chapter 2 Lab 2-2, Configuring EtherChannel Instructor Version

How To Lower Data Rate On A Network On A 2Ghz Network On An Ipnet 2 (Net 2) On A Pnet 2 On A Router On A Gbnet 2.5 (Net 1) On An Uniden Network On

Configuring a Gateway of Last Resort Using IP Commands

Backing Up and Restoring Data

Configure Backup Server for Cisco Unified Communications Manager

ASA 8.3 and Later: Enable FTP/TFTP Services Configuration Example

Catalyst 6500/6000 Switches NetFlow Configuration and Troubleshooting

Simple Network Management Protocol (SNMP) Causes High C

Connecting to the Firewall Services Module and Managing the Configuration

- Advanced IOS Functions -

NetFlow Aggregation. Feature Overview. Aggregation Cache Schemes

Basic Software Configuration Using the Cisco IOS Command-Line Interface

PIX/ASA 7.x: Enable FTP/TFTP Services Configuration Example

Lab 3.5.1: Basic VLAN Configuration (Instructor Version)

White Paper Case Study:

Configuring CitectSCADA SNMP projects with MIB2CIT. A reference for CitectSCADA Customers

Transferring Files Using HTTP or HTTPS

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

USB Disable for Cisco ISRs Feature Module

Basic Router and Switch Instructions (Cisco Devices)

Discovering Devices CHAPTER

PIX/ASA: Allow Remote Desktop Protocol Connection through the Security Appliance Configuration Example

How Do I Upgrade Firmware and Save Configurations on PowerConnect Switches?

CCNA Access List Sim

IOS NAT Load Balancing with Optimized Edge Routing for Two Internet Connections

IP Accounting C H A P T E R

Lab Advanced Telnet Operations

Generate CSR for Third Party Certificates and Download Unchained Certificates to the WLC

Telnet, Console and AUX Port Passwords on Cisco Routers Configuration Example

Database Replication Error in Cisco Unified Communication Manager

Configuring Cisco CallManager IP Phones to Work With IP Phone Agent

Lab Configure Cisco IOS Firewall CBAC on a Cisco Router

Troubleshooting the Firewall Services Module

BRI to PRI Connection Using Data Over Voice

Administering the Network Analysis Module. Cisco IOS Software. Logging In to the NAM with Cisco IOS Software CHAPTER

Lab Use Network Inspector to Observe STP Behavior

Configuring the Cisco Secure PIX Firewall with a Single Intern

Basic Configuration of the Cisco Series Internet Router

Web Authentication Proxy on a Wireless LAN Controller Configuration Example

Lab Load Balancing Across Multiple Paths

Microsoft Windows 2003 DNS Server for Wireless LAN Controller (WLC) Discovery Configuration Example

Lab Review of Basic Router Configuration with RIP. Objective. Background / Preparation. General Configuration Tips

PIX/ASA 7.x and above: Mail (SMTP) Server Access on the DMZ Configuration Example

ASA 8.3 and Later: Mail (SMTP) Server Access on Inside Network Configuration Example

ROM Monitor. Entering the ROM Monitor APPENDIX

Password Recovery Procedure for the Cisco Catalyst Fixed Configuration Layer 2 and Layer 3 Switches

Lab QoS Classification and Policing Using CAR

Backup and Recovery Procedures

How To Install Cisco Asr 9000 Series Router Software On A Mini Mini Mini (Cisco Ios) Router

Configuring TACACS+, RADIUS, and Kerberos on Cisco Catalyst Switches

Cisco DNS-AS Troubleshooting

Unity Express Voice Mail Transfer Behavior

File Transfers. Contents

Loading IOS Image with Xmodem when TFTP is unavailable

Configuring System Message Logging

IOS NAT Load Balancing for Two ISP Connections

Configuring System Message Logging

Router Recovery with ROM Monitor

ASA 8.X: Routing SSL VPN Traffic through Tunneled Default Gateway Configuration Example

Lab Configure IOS Firewall IDS

Consolidated Packages and SubPackages Management

Connect the Host to attach to Fast Ethernet switch port Fa0/2. Configure the host as shown in the topology diagram above.

Configuring EtherChannel and 802.1Q Trunking Between Catalyst L2 Fixed Configuration Switches and Catalyst Switches Running CatOS

Lab 5.3.9b Managing Router Configuration Files Using TFTP

SNMP and Network Management

End of Sale/End of Life Report Tool Usage Notes for CiscoWorks NCM 1.6

Lab Configure Cisco IOS Firewall CBAC

Configuring LACP (802.3ad) Between a Catalyst 6500/6000 and a Catalyst 4500/4000

Troubleshooting Load Balancing Over Parallel Links Using Cisco Express Forwarding

Checking SQL Server or MSDE Version and Service Pack Level

Lab 8.4.3a Managing Cisco IOS Images with TFTP

SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP)

Configuring the Switch with the CLI-Based Setup Program

Transcription:

Moving Files and Images Between a Router and TFTP Server via SNMP Document ID: 7910 Contents Introduction Prerequisites Requirements Components Used Conventions Background Information Copy a Running Configuration File from the Router to the TFTP Server Copy a Configuration File from the TFTP Server to the Router Copy a Cisco IOS Image from the Router to the TFTP Server Copy a Cisco IOS Image from the TFTP Server to the Router Appendix A Details Related Information Introduction This document describes how to move configuration files and Cisco IOS images between a router and a Trivial File Transfer Protocol (TFTP) server with the use of Simple Network Management Protocol (SNMP). Prerequisites Requirements Readers of this document should be knowledgeable of SNMP and s. Components Used The information in this document is based Cisco IOS Software Release 10.2 or later. The s that these examples use are OLD CISCO SYS and OLD CISCO FLASH, which are supported in Cisco IOS Software Release 10.2 and later. Cisco recommends that you use a more recent release of Cisco IOS software such as Cisco IOS Software Release 12.0. The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions In all the examples that this document shows, these values are used for illustration purposes: 172.16.99.20IP address of the router. 171.68.191.135IP address of the TFTP server. privatesnmp read write community string. Make sure that you use the read write string configured on your router. Issue the show running config command on the router CLI in order to verify this. The syntax for when you issue the snmpset and snmpwalk commands are in these examples: snmpset [options...] <hostname> {<community>} [<objectid> <type> <value>...] snmpwalk [options...] <hostname> {<community>} [<objectid>] Note: In order to increase the timeout, use the t <timeticks> option in the snmpset command. For more information on document conventions, refer to Cisco Technical Tips Conventions. Background Information Verify that you can ping the IP address of the TFTP server from the router: Router#ping 171.68.191.135 escape sequence to abort. Sending 5, 100 byte ICMP Echos to 171.68.191.135, timeout is 2 seconds:!!!!! Success rate is 100 percent (5/5), round trip min/avg/max = 1/2/4 ms: The procedures are: Not applicable for Catalyst switches based on Cisco IOS software, such as the Catalyst 2900/3500XL series. Not applicable for Catalyst switches based on CatOS software, such as the Catalyst 4000/5000/6000 series. Not applicable for Catalyst 6000 series Multilayer Switch Feature Card (MSFC) and MSFC2 modules that run Cisco IOS software. Not applicable if SNMP Read Write community string in not configured or not known on the router. Refer to How to Configure SNMP Community Strings on Routers, Cisco IOS Software Based XL Switches, RSMs, MSFCs and Catalyst Switches for the detailed procedure on how to configure the SNMP community strings. This is not recommended if you use a run from Flash device such as the Cisco 2500 series router. This is not recommended if you use Cisco devices that run Cisco IOS Software Release 12.0 (on some devices, as early as Cisco IOS Software Release 11.2P) or later. This is because the OLD CISCO* (OLD CISCO SYS ) s are deprecated since Cisco IOS Software Release 12.0. Therefore, if you run Cisco IOS Software Release 12.0 or later, you must use the CISCO CONFIG COPY. Based on command line syntax of NET SNMP (previously known as UCD SNMP) Utilities. If you use some other SNMP applications like HP Open View or NetView, make sure that you verify the syntax which can be different from the one shown in the examples in this document. Based on OLD CISCO SYS and OLD CISCO FLASH. The objects from this are used: Name

writenet hostconfigset writemem flashtonet flasherase nettoflash.1.3.6.1.4.1.9.2.1.55.1.3.6.1.4.1.9.2.1.53.1.3.6.1.4.1.9.2.1.54.1.3.6.1.4.1.9.2.10.9.1.3.6.1.4.1.9.2.10.6.1.3.6.1.4.1.9.2.10.12 For further information on the objects in this table (includes definitions), see Appendix A of this document. Follow the Cisco bug ID links here in order to see detailed bug information. Cisco bug ID CSCdk33879 (registered customers only) : Deprecate all OLD CISCO * S Cisco bug ID CSCdt11311 (registered customers only) : SNMP request for a configuration that uses OLD CISCO SYSTEM brings ISDN down. Copy a Running Configuration File from the Router to the TFTP Server 1. Create a new file, router config, in the /tftpboot directory of the TFTP server. On UNIX, use the syntax: touch <filename>. touch router config 2. Change the permissions of the file to 777 with the syntax: chmod <permissions> <filename>. chmod 777 router config 3. From the management station command line, with the use of the object writenet enter this information: % snmpset 172.16.99.20 private.1.3.6.1.4.1.9.2.1.55.171.68.191.135 s router config enterprises.9.2.1.55.171.68.191.135 = "router config" Verify that the router config file in the /tftpboot directory of the TFTP server copies over successfully. Copy a Configuration File from the TFTP Server to the Router 1. Perform one of these tasks:

Create a new file, router config in the /tftpboot directory of the TFTP server. On UNIX, use the syntax touch <filename>. touch router config Place your current configuration file in the /tftpboot directory of the TFTP server. 2. Change the permissions of the file to 777 with the use of the syntax chmod <permissions> <filename>. chmod 777 router config 3. From the management station command line, with the use of the object hostconfigset, enter this: % snmpset t 60 172.16.99.22 private.1.3.6.1.4.1.9.2.1.53.171.68.191.135 s router config OR % snmpset t 60 172.16.99.22 private enterprises.9.2.1.53.171.68.191.135 = "router config" Where t 60 equals a timeout of 60 timeticks. 4. After the file is written to RAM, copy it to NVRAM with the use of the object writemem: % snmpset t 60 172.16.99.22 private.1.3.6.1.4.1.9.2.1.54.0 i 1 enterprises.9.2.1.54.0 = 1 Copy a Cisco IOS Image from the Router to the TFTP Server 1. Perform one of these tasks: Create a new file, router image, in the /tftpboot directory of the TFTP server. On UNIX, use the syntax touch <filename>. touch router image Use the same file name shown in the show flash output in order to create the file on the /tftpboot directory of the TFTP server. For this example, the router lists c2600 i mz.122 2.XA as the output for the show flash: command. touch c2600 i mz.122 2.XA 2. Change the permissions of the file to 777 with syntax chmod <permissions> <filename>. chmod 777 c2600 i mz.122 2.XA 3. From the management station command line, with the use of the object flashtonet, enter this information: % snmpset 172.16.99.22 private.1.3.6.1.4.1.9.2.10.9.171.68.191.135 s c2600 i mz.122 2.XA enterprises.9.2.10.9.171.68.191.135 = "c2600 i mz.122 2.XA" After the file transfer completes, verify that the file size (bytes) is the same on the file in the /tftpboot directory and on the router.

Copy a Cisco IOS Image from the TFTP Server to the Router 1. Place the IOS image in the /tftpboot directory of the TFTP server. Make sure that you consult with the Download Software Area (registered customers only). 2. Change the permissions of the file to 777 with the use of the syntax chmod <permissions> <filename> chmod 777 <IOS image file> 3. Before you start the file transfer via SNMP, perform a dir flash: or show flash: in order to verify that you have enough space for the new IOS image file. If you do not have the necessary space in your Flash, the file transfer fails. Alternately, you can erase the Flash first to make room for the new IOS software via SNMP. If so, use the object flasherase command in order to enter this information from the management station command line: % snmpset 172.16.99.22 private.1.3.6.1.4.1.9.2.10.6.0 i 1 enterprises.9.2.10.6.0 = 1 Note: You can also erase the router's Flash manually when you issue the CLI command erase flash:. 4. Verify that the Flash is erased completely. Issue the dir flash: or show flash: command. Router#show flash: System flash directory: No files in System flash [0 bytes used, 33030144 available, 33030144 total] 32768K bytes of processor board System flash (Read/Write) Router #dir flash: Directory of flash:/ No files in directory 33030144 bytes total (33030144 bytes free) 5. From the management station command line, use the object nettoflash to enter this information in order to transfer the IOS image file to the router: % snmpset 172.16.99.22 private.1.3.6.1.4.1.9.2.10.12.171.68.191.135 s c2600 i mz.122 2.XA.bin enterprises.9.2.10.12.171.68.191.135 = "c2600 i mz.122 2.XA.bin" Note: In this example, the IOS image file, c2600 i mz.122 2.XA.bin, is used for illustration. 6. Based upon the file size (bytes) of the IOS image, this step can take a few minutes in order to complete. If you try to perform the CLI command dir flash: during the file transfer on the router, this output appears. This output indicates that the file transfer has not yet completed. Router#dir flash: %Error opening flash:/ (Device in exclusive use) 7. Once the IOS image file transfer completes, perform the CLI command dir flash: or show flash: in order to verify that both the file name and the file size (bytes) exactly match with the file that is used/present in the /tftpboot directory of the TFTP server. You can then set the config register to the appropriate value and reload the router (if needed) to load

the new IOS image file. Refer to the Cisco IOS Software Configuration documentation for further details on how to do this. Appendix A Details in Tree writenet.1.3.6.1.4.1.9.2.1.55 OLD CISCO SYS Write configuration to host that uses TFTP. ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) cisco(9) local(2) lsystem(1) 55 } in Tree hostconfigset.1.3.6.1.4.1.9.2.1.53 obsolete OLD CISCO SYS Causes a new host confg file to load with the use of TFTP. ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) local(2) lsystem(1) 53 } in Tree writemem.1.3.6.1.4.1.9.2.1.54 OLD CISCO SYS Causes a new host confg file to load with the use of TFTP. ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) local(2) lsystem(1) 54 } flashtonet.1.3.6.1.4.1.9.2.10.9

OLD CISCO FLASH Write Flash entry to the TFTP server. The value needs to be the name of the Flash entry to send. Instance is the IP address of the TFTP host. in Tree ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) local(2) lflash(10) 9 } in Tree flasherase.1.3.6.1.4.1.9.2.10.6 Integer OLD CISCO FLASH Request to erase Flash memory. ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) local(2) lflash(10) 6 } nettoflash.1.3.6.1.4.1.9.2.10.12 OLD CISCO FLASH Write Flash entry from the TFTP server. The value needs to be the name of the Flash entry to write. Instance is the IP address of the TFTP host. in Tree ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) local(2) lflash(10) 12 } Related Information Technical Support & Documentation Cisco Systems Contacts & Feedback Help Site Map 2014 2015 Cisco Systems, Inc. All rights reserved. Terms & Conditions Privacy Statement Cookie Policy Trademarks of Cisco Systems, Inc. Updated: Jul 05, 2006 Document ID: 7910