Differents Way to Upload a Cisco Ios in a Router

Contents

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 Elementary Network Management Protocol (SNMP).

Prerequisites

Requirements

Readers of this certificate should be knowledgeable of SNMP and MIBs.

Components Used

The information in this certificate is based Cisco IOS Software Release 10.2 or later. The MIBs that these examples use are Onetime-CISCO-SYS-MIB and Old-CISCO-Flash-MIB, which are supported in Cisco IOS Software Release 10.two and subsequently. Cisco recommends that you employ a more than 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 surround. All of the devices used in this document started with a cleared (default) configuration. If your network is alive, brand certain that y'all empathize the potential affect of whatsoever command.

Conventions

In all the examples that this certificate shows, these values are used for illustration purposes:

  • 172.16.99.20—IP address of the router.

  • 171.68.191.135—IP address of the TFTP server.

  • private—SNMP read-write customs string. Make sure that yous use the read-write string configured on your router. Issue the testify running-config command on the router CLI in social club to verify this.

  • The syntax for when you issue the snmpset and snmpwalk commands are in these examples:

                    snmpset [options...] <hostname> {<community>} [<objectID> <blazon> <value> ...]  snmpwalk [options...] <hostname> {<customs>} [<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.

Groundwork Information

Verify that you can ping the IP address of the TFTP server from the router:

Router#ping 171.68.191.135            Type escape sequence to arrest. Sending 5, 100-byte ICMP Echos to 171.68.191.135, timeout is 2 seconds:  !!!!!  Success rate is 100 per centum (5/v), round-trip min/avg/max = 1/two/iv ms:

The procedures are:

  • Not applicative for Catalyst switches based on Cisco IOS® software, such equally the Goad 2900/3500XL serial.

  • 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 yous use a run-from-Flash device such equally the Cisco 2500 series router.

  • This is not recommended if you apply Cisco devices that run Cisco IOS Software Release 12.0 (on some devices, every bit early on as Cisco IOS Software Release 11.2P) or later. This is because the Quondam-CISCO* (OLD-CISCO-SYS-MIB) MIBs are deprecated since Cisco IOS Software Release 12.0. Therefore, if you run Cisco IOS Software Release 12.0 or later on, y'all must employ the CISCO-CONFIG-Re-create-MIB.

  • Based on command line syntax of NET-SNMP icon_popup_short.gif (previously known as UCD-SNMP) Utilities. If you utilise some other SNMP applications similar HP Open View or NetView, make sure that you verify the syntax which tin can be different from the one shown in the examples in this document.

  • Based on One-time-CISCO-SYS-MIB and OLD-CISCO-FLASH-MIB. The MIB objects from this MIB are used:

MIB Object Name OID
writeNet .1.iii.6.1.4.i.9.2.1.55
hostConfigSet .1.iii.6.ane.4.1.nine.2.i.53
writeMem .1.three.6.1.iv.ane.9.ii.one.54
flashToNet .1.3.vi.i.4.one.9.2.ten.9
flashErase .i.three.6.i.4.1.ix.2.10.6
netToFlash .1.3.half dozen.i.four.1.ix.two.ten.12

For farther information on the MIB objects in this table (includes definitions), see Appendix A of this document.

Follow the Cisco issues ID links here in order to see detailed bug data.

  • Cisco bug ID CSCdk33879 (registered customers only) : Deprecate all One-time-CISCO-* MIBS

  • Cisco bug ID CSCdt11311 (registered customers just) : SNMP request for a configuration that uses Sometime-CISCO-Arrangement-MIB brings ISDN down.

Re-create a Running Configuration File from the Router to the TFTP Server

Pace-by Step Instructions

Consummate these steps:

  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. Alter 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 MIB object writeNet enter this information:

    % snmpset 172.16.99.20 individual .i.3.6.i.4.one.9.ii.ane.55.171.68.191.135  s router-config enterprises.nine.2.1.55.171.68.191.135 = "router-config"

Verify the Configuration

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

Step-past Stride Instructions

Complete these steps:

  1. Perform ane 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
    • Identify your current configuration file in the /tftpboot directory of the TFTP server.

  2. Alter 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 MIB object hostConfigSet, enter this:

    % snmpset -t 60 172.16.99.22 private .1.three.vi.1.iv.1.9.2.one.53.171.68.191.135  due south router-config OR % snmpset -t 60 172.sixteen.99.22 individual  enterprises.9.2.1.53.171.68.191.135 = "router-config"

    Where - t threescore equals a timeout of 60 timeticks.

  4. After the file is written to RAM, copy it to NVRAM with the utilise of the MIB object writeMem:

    % snmpset -t threescore 172.16.99.22 individual .1.3.6.one.4.1.nine.ii.one.54.0 i 1  enterprises.9.2.i.54.0 = ane              

Copy a Cisco IOS Image from the Router to the TFTP Server

Step-by Step Instructions

Complete these steps:

  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 on <filename>.

      touch router-paradigm
    • Employ the aforementioned file proper 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 every bit the output for the show wink: 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 utilize of the MIB object flashToNet, enter this information:

    % snmpset 172.16.99.22 private .1.3.6.ane.4.1.9.ii.10.9.171.68.191.135  due south c2600-i-mz.122-2.XA enterprises.9.2.10.nine.171.68.191.135  = "c2600-i-mz.122-2.XA"

Verify the Configuration

Afterwards the file transfer completes, verify that the file size (bytes) is the aforementioned on the file in the /tftpboot directory and on the router.

Copy a Cisco IOS Paradigm from the TFTP Server to the Router

Footstep-by Step Instructions

Complete these steps:

  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 but) .

  2. Change the permissions of the file to 777 with the employ 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 prove flash: in order to verify that you have enough space for the new IOS image file.

    If yous practise not take the necessary space in your Wink, the file transfer fails. Alternately, y'all can erase the Flash get-go to make room for the new IOS software via SNMP. If so, use the MIB object flashErase control in social club to enter this information from the management station command line:

    % snmpset 172.xvi.99.22 private .i.3.half-dozen.1.four.ane.ix.ii.10.half-dozen.0 i 1 enterprises.9.2.10.6.0 = 1

    Notation:You tin also erase the router's Flash manually when you issue the CLI control erase wink:.

  4. Verify that the Wink is erased completely. Issue the dir flash: or evidence flash: control.

    Router#evidence wink:                System flash directory: No files in Organization flash [0 bytes used, 33030144 available, 33030144 total] 32768K bytes of processor lath 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 MIB object netToFlash to enter this information in order to transfer the IOS image file to the router:

    % snmpset 172.sixteen.99.22 private .one.iii.six.1.4.1.9.2.10.12.171.68.191.135  s c2600-i-mz.122-2.XA.bin enterprises.ix.ii.x.12.171.68.191.135  = "c2600-i-mz.122-two.XA.bin"

    Note:In this example, the IOS epitome file, c2600-i-mz.122-2.XA.bin, is used for illustration.

  6. Based upon the file size (bytes) of the IOS prototype, this stride tin have a few minutes in lodge 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 still completed.

    Router#dir wink:                %Mistake opening wink:/ (Device in exclusive use)
  7. Once the IOS image file transfer completes, perform the CLI command dir flash: or testify flash: in gild to verify that both the file name and the file size (bytes) exactly match with the file that is used/nowadays in the /tftpboot directory of the TFTP server.

    Y'all tin can then set up the config register to the advisable value and reload the router (if needed) to load the new IOS prototype file. Refer to the Cisco IOS Software Configuration documentation for farther details on how to do this.

Appendix A - MIB Object Details

Object writeNet
OID .1.three.half-dozen.1.iv.one.9.two.one.55
Type DisplayString
Permission write-only
Status mandatory
MIB OLD-CISCO-SYS-MIB
Description Write configuration to host that uses TFTP.
OID in Tree ::= { iso(1) org(3) dod(half-dozen) net(i) private(4) enterprises(1) cisco(9) local(2) lsystem(ane) 55 }
Object hostConfigSet
OID .one.3.6.1.4.1.9.2.1.53
Type DisplayString
Permission write-only
Condition obsolete
MIB OLD-CISCO-SYS-MIB
Description Causes a new host-confg file to load with the use of TFTP.
OID in Tree ::= { ISO(1) org(3) DOD(6) Cyberspace(1) private(four) enterprises(ane) cisco(9) local(2) lsystem(1) 53 }
Object writeMem
OID .1.3.six.ane.4.1.ix.2.1.54
Blazon DisplayString
Permission write-only
Status mandatory
MIB Sometime-CISCO-SYS-MIB
Description Causes a new host-confg file to load with the apply of TFTP.
OID in Tree ::= { ISO(1) org(iii) DOD(half dozen) Internet(1) individual(4) enterprises(1) cisco(9) local(two) lsystem(1) 54 }
Object flashToNet
OID .1.3.6.1.4.1.ix.2.ten.9
Type DisplayString
Permission write-merely
Status mandatory
MIB OLD-CISCO-FLASH-MIB
Clarification Write Wink entry to the TFTP server. The value needs to be the proper name of the Flash entry to ship. Example is the IP accost of the TFTP host.
OID in Tree ::= { ISO(1) org(3) DOD(6) Cyberspace(1) private(4) enterprises(1) cisco(9) local(2) lflash(ten) nine }
Object flashErase
OID .ane.three.6.1.4.1.ix.2.10.half-dozen
Type Integer
Permission write-merely
Status mandatory
MIB Quondam-CISCO-Flash-MIB
Description Request to erase Flash memory.
OID in Tree ::= { ISO(i) org(three) DOD(6) Internet(i) private(4) enterprises(1) cisco(9) local(2) lflash(10) 6 }
Object netToFlash
OID .1.3.6.i.iv.1.9.two.ten.12
Type DisplayString
Permission write-simply
Status mandatory
MIB Erstwhile-CISCO-FLASH-MIB
Clarification 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.
OID in Tree ::= { ISO(1) org(3) DOD(6) Net(ane) private(4) enterprises(1) cisco(9) local(ii) lflash(10) 12 }

jumponigh1944.blogspot.com

Source: https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/7910-11-7910.html

0 Response to "Differents Way to Upload a Cisco Ios in a Router"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel