cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

2112
Views
8
Helpful
7
Replies
Highlighted
Beginner

How to list the boot path via SNMP

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!

Everyone's tags (2)
7 REPLIES 7
Enthusiast

Re: How to list the boot path via SNMP

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

Beginner

Re: How to list the boot path via SNMP

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

Beginner

Re: How to list the boot path via SNMP

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.

Beginner

Re: How to list the boot path via SNMP

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

Enthusiast

Re: How to list the boot path via SNMP

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

Beginner

Re: How to list the boot path via SNMP

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#

Enthusiast

Re: How to list the boot path via SNMP

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

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards