cisco snmp device type-how to find?

Unanswered Question
Nov 7th, 2008

Dear sir,

We are regular customer of cisco. We have a query about snmp devices.

we have cisco2621 which has system object id .

By "snmp get" command to cisco2621 for sysObjectID ., we get value . .

For this we should first know that . is cisco2621. which is router.

My question is how we can find out that particular snmp device is router or switch. Is there any OID for retriveing the type of snmp device.

We need it on vey priority basis. I request you to please reply the answer as early as possible.

Thanks in advance,



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Fri, 11/07/2008 - 09:58

If by router vs. switch you mean whether or not a device is forwarding IP packets, then this can be determined by querying the ipForwarding object from the IP-MIB. If the device returns 1, then it is forwarding IP packets (i.e. the device is routing). If the object's value is 2, then it is not routing.

That said, many modern switches are capable of layer 3 switching, and will indicate that they are routing (because they are). Another method you could use is to get the cdpCacheCapabilities objects from a CDP neighbor of the device in question. If the value of the capabilities is 0x1 when logically OR'd with 0x1, then the device is a router.

vaibhavlimaye Mon, 11/10/2008 - 21:29


Thanks for reply. I still have not cleared regarding my posted query.

I wanted to know that how can we find out the particular type of any network device which is snmp enabled. Any MIB tells us about device type?

The question was not only for router or switch, It can be any device. Kindly let me know if you understood my query or not.

waiting for your reply,

Joe Clarke Mon, 11/10/2008 - 22:01

You can use the CISCO-PRODUCTS-MIB to map sysObjectID to an object name (like you did for the 2621). Alternatively, sysDescr.0 usually tells you enough about the device type. sysObjectID is what is typically used by Network Management applications to obtain the device type.

Joe Clarke Mon, 11/10/2008 - 22:07

I should clarify that other than the objects I have already said, there is no object that will return "router," "switch, "Access Point," etc. Most NMSes will take the sysObjectID and map it to a device type in order to poll platform-specific objects.

vaibhavlimaye Mon, 11/10/2008 - 22:30

Thanks for reply. I have few questions. You mean that sysObjectID is the only way to find out particular device. right? If so then we should have database table for sysObjectIDs and known type for all types of devices. right? That we have have to get from CISCO-PRODUCTS-MIB. right?

If so then what should we do for other company's devices which is other than ciscoproducts?

And in sysdescr we do not get type of device, which is as follows,

SNMPv2-MIB::sysDescr.0 = STRING: "Cisco Internetwork Operating System Software

IOS (tm) C2600 Software (C2600-D-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)

Copyright (c) 1986-1999 by cisco Systems, Inc.

Compiled Tue 07-Dec-99 01:20 by phanguye"

Waiting for your reply.

Joe Clarke Mon, 11/10/2008 - 22:46

Other vendors have their own MIBs to translate their sysObjectIDs. As for finding the device "type," this is nebulous as I have already said. That is, one device can be capable of being a router, switch, AP, firewall, etc. all at the same time. So, once you know the model name, you'd have to search the vendor's product or support site to get the capabilities.

vaibhavlimaye Mon, 11/10/2008 - 22:59

This means we have to have database created for all types of devices and corresponding sysObjectIDs. Is any latest readymade list availabe? Or we have to do it by our own by geting product mib of all other companies.


This Discussion