cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4404
Views
10
Helpful
3
Replies

Tool/script to get information (i.e. model/ios ver) from cisco switch

kamil.swedrak
Level 1
Level 1

Hello all,

I'm looking for a tool/script which will scan my 3 subnets in the network and will gather some basic information from cisco switches (i.e. model, ios ver). Do you know how to automate this task?

I can check/log in to each IP "active" IP address in the network but this is time consuming process.

Please advise how to automate this task (script will be awsome, but some IP scanner will be also very desired) - thank you.

P.s. Perfect output for me:
cisco 2960 | 12.4(25)

Best regards,

/KS

1 Accepted Solution

Accepted Solutions

I have written a tool that will do host discovery and display SNMP information about each host discovered.   Host discovery uses NMAP to probe a subnet or subnets and writes IP addresses to a file that respond to ICMP.    Another script reads in the IP address file and polls each device with SNMP.   See attached for files.   Here is example output provided by the tool.

SNMP info for 192.168.0.251

SNMPv2-MIB::sysName.0 = STRING: Switch_1.cisco.com

SNMPv2-MIB::sysObjectID.0 = OID: CISCO-PRODUCTS-MIB::catalyst356024TS

SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE1, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Thu 02-Dec-10 07:17 by prod_rel_team

OLD-CISCO-CHASSIS-MIB::chassisId.0 = STRING: "FDO1119YXXX"

ENTITY-MIB::entPhysicalSerialNum.1001 = STRING: FDO1119XXX

SNMP info for 192.168.0.252

SNMPv2-MIB::sysName.0 = STRING: Switch_2.cisco.com

SNMPv2-MIB::sysObjectID.0 = OID: CISCO-PRODUCTS-MIB::catalyst356024TS

SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE1, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Thu 02-Dec-10 07:17 by prod_rel_team

OLD-CISCO-CHASSIS-MIB::chassisId.0 = STRING: "FDO1XXXY1CM"

ENTITY-MIB::entPhysicalSerialNum.1001 = STRING: FD01XXXY1CM

View solution in original post

3 Replies 3

Austin Sabio
Level 4
Level 4

I would suggest trying the 'cisco active advisor' or use snmp to collect network inventory. 

Product info

http://www.cisco.com/c/en/us/products/cloud-systems-management/active-advisor/index.html

Product login page

https://ciscoactiveadvisor.com

Otherwise, you can post your question in EMM scripting section. 

https://supportforums.cisco.com/community/5941/eem-scripting

Good luck!

Thanks engineer_aus for your reply and suggestion.

Cisco Active Advisor looks good, but I would like have this "functionality" without 3rd party software.

SNMP will be enough but don't know how to do that.

Question to you guys if you have any "ready" command which I can use to obtain this kind of information.

Thank you very much!

I have written a tool that will do host discovery and display SNMP information about each host discovered.   Host discovery uses NMAP to probe a subnet or subnets and writes IP addresses to a file that respond to ICMP.    Another script reads in the IP address file and polls each device with SNMP.   See attached for files.   Here is example output provided by the tool.

SNMP info for 192.168.0.251

SNMPv2-MIB::sysName.0 = STRING: Switch_1.cisco.com

SNMPv2-MIB::sysObjectID.0 = OID: CISCO-PRODUCTS-MIB::catalyst356024TS

SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE1, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Thu 02-Dec-10 07:17 by prod_rel_team

OLD-CISCO-CHASSIS-MIB::chassisId.0 = STRING: "FDO1119YXXX"

ENTITY-MIB::entPhysicalSerialNum.1001 = STRING: FDO1119XXX

SNMP info for 192.168.0.252

SNMPv2-MIB::sysName.0 = STRING: Switch_2.cisco.com

SNMPv2-MIB::sysObjectID.0 = OID: CISCO-PRODUCTS-MIB::catalyst356024TS

SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE1, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2010 by Cisco Systems, Inc.

Compiled Thu 02-Dec-10 07:17 by prod_rel_team

OLD-CISCO-CHASSIS-MIB::chassisId.0 = STRING: "FDO1XXXY1CM"

ENTITY-MIB::entPhysicalSerialNum.1001 = STRING: FD01XXXY1CM

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: