cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3120
Views
8
Helpful
7
Replies

How to list the boot path via SNMP

andysainsbury
Level 1
Level 1

Hi there,

I've tried to grep the output of a full snmpwalk on a couple of different models but haven't found the answer.

I'm working with a variety of access layer switches (2950's, 2960's, 3550's, 3560's and 3750's) and would really like to find out how to poll a switch via snmp to discover the boot path settings, to get the output just as you would with the command:

#>show boot

BOOT path-list      :

Config file         : flash:/config.text

Private Config file : flash:/private-config.text

Enable Break        : no

Manual Boot         : no

HELPER path-list    :

Auto upgrade        : yes

Auto upgrade path   :

NVRAM/Config file

      buffer size:   65536

Timeout for Config

          Download:    0 seconds

Config Download

       via DHCP:       disabled (next boot: disabled)

Is there an oid that produces this info but presents it in a converted format?

Answers on a postcard!

7 Replies 7

IAN WHITMORE
Level 4
Level 4

Well the boot system commands are in the startup config (unless there are none in which case it will just look for the first file in flash). So you could grep the config and get this information.

I can't find an OID that specifically looks for it but it would be a private OID and not an industry standard so you could try the Cisco OIDs. It's really easy if you have something like SolarWinds to do an snmpwalk of the private Cisco OIDs. Maybe you will find the information you are looking for, other wise you try what I stated above.

HTH.

Ian

Hi Ian,

Boot system commands are not contained in the startup config, they are part of the 'hidden' command set, so I'm not sure what you are referring to there? Please correct me if you are talking about a different startup config:

switch#sh start | inc boot

boot-start-marker

boot-end-marker

switch#

If the boot path information is available via SNMP I think it might be in a non human readable format, with some sort of conversion but am not sure, and that is the question I'm asking.

I've searched the Cisco SNMP oid browser and looked at every line of output from a full snmpwalk with no joy.

Anybody else got out there got an idea?

Cheers

Andy

I use this .1.3.6.1.2.1.16.19.6.0  (it works on 3550/60's,ies-3000's,3750's, 6500's not sure about 2900's), I can't remember off the top of my head if it is the current boot string or the currently booted image, you may want to test that depending on what you are trying to see.

Currently booted image:

RMON2-MIB::probeConfig.6.0 = STRING: "flash:/c2960-lanbasek9-mz.122-53.SE2.bin"

aka:

.1.3.6.1.2.1.16.19.6.0

So my project is to write a Perl script to automate the deployment of IOS bin files, as we look after 800+ Cisco devices, and Cisco Works was terrible (Sorry Cisco!)

I'm uploadinng a new IOS to a switch that needs to be upgraded and I want to check to see if the boot path is set correctly to boot of the new IOS whilst keeping the old IOS (where the size of the flash is big enough) without having to logon to the switch, and I want to do this via snmp only.

Cheers

Andy

Thats if you don't use any boot system commands. By default the IOS looks for the first file in flash. If you use the #boot system commands then they show up in the config.

Regards,

Ian

Um, no they don't:

artfs10(config)#boot system hello     

artfs10(config)#end

artfs10#wr   

Building configuration...

[OK]

artfs10#sh boot

BOOT path-list       : hello

Config file              : flash:/config.text

Private Config file : flash:/private-config.text

Enable Break        : no

Manual Boot         : no

HELPER path-list    :

Auto upgrade        : yes

Auto upgrade path   :

NVRAM/Config file

      buffer size:   65536

Timeout for Config

          Download:    0 seconds

Config Download

       via DHCP:       disabled (next boot: disabled)

artfs10#sh run | inc hello

artfs10#sh start | inc hello

artfs10#

Well that's a bummer. Works fine on my routers though

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card