cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
888
Views
10
Helpful
5
Replies

Querying Cat3750 for certain data

themartinez
Level 1
Level 1

Hi,

Could you please tell me what SNMP OIDs should I query on Cat3750 to obtain following informations (if available at all):

* The name of the switch

I believe this one is 1.3.6.1.4.1.9.2.1.3.0

* The MAC address of the port

* The number of bytes sent from the client since the last switch reset

* The number of bytes sent to the client since the last switch reset

* The date of the last switch reset

* The current timestamp from the switch

Where and how to search for OIDs with concrete data? I've done some research with limited success on following sites:

http://tools.cisco.com/Support/SNMP/do/SearchOID.do?local=en&step=1

http://www.mibdepot.com/

and using snmpwalk on device.

Thanks in advance,

Best regards,

Marcin Al-Jawahiri

1 Accepted Solution

Accepted Solutions

Actually, what might be easier for you is to use ifPhysAddress from the IF-MIB. This object is indexed by ifIndex just like the Octets objects, so you would not need to do any additional mapping.

View solution in original post

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

For the switch name you can use sysName or 1.3.6.1.2.1.1.5.

For the MAC address of the port, you will want to use the BRIDGE-MIB and the dot1dTpFdbTable. Ports with a dot1dTpFdbStatus of self(4) are actually the MAC of the switchport itself.

Byte counts can be obtained using ifInOctets and ifOutOctets (or better yet, ifHCInOctets and ifHCOutOctets). The In counters will tell you bytes sent from the attached host, and the Out counters will tell you bytes sent to the attached host.

sysUpTime will tell you how long the switch has been online. This object is of type Timeticks which is in 1/100s of a second. You will need to work backwards to obtain the date at which it was rebooted.

The current time of the switch is not available via SNMP.

You can use the Search & Translate tool at http://jaguar.ir.miami.ed/~marcus/snmptrans.html to search through MIB object names and descriptions (including regular expressions) for matching strings.

Thank you, you were very helpful. Forgive my ignorance but MAC address part is still unclear for me. Given VLAN OID of the port (e.g. 1.3.6.1.4.1.9.9.68.1.2.2.1.2.101) how can I obtain its MAC address? For in/out byte count it seems to be easy because I can see corresponding OIDs so I believe that VLAN OID 1.3.6.1.4.1.9.9.68.1.2.2.1.2.101 corresponds to ifIn counter 1.3.6.1.2.1.2.2.1.10.101 (ifInOctets.10101) OID. Or is my observation flawed and I'm not guaranteed such a correspondence exists? However with MAC address I don't see any corresponding OIDs at all. Is it actually possible to retrieve MAC address of the port given its VLAN OID? If yes how can I get it? If no what should I actually be given as an query input and how to use it to retrieve MAC address? (I'm using snmpget/snmpwalk and SNMP4J for data retrieval)

Thanks in advance,

Best regards,

Marcin Al-Jawahiri

This is not possible. The MAC addresses of ports are indexed by the dot1dBasePort and not ifIndex (like the Octet objects). To map those MACs back to an ifIndex, you need to use dot1dBasePortIfIndex. This tech tip will give you more information. It talks about finding MAC addresses attached to switch ports, but the same principle applies to finding the MAC addresses of switch ports.

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a9b.shtml

Actually, what might be easier for you is to use ifPhysAddress from the IF-MIB. This object is indexed by ifIndex just like the Octets objects, so you would not need to do any additional mapping.

Perfect. Thank you.

Best regards,

Marcin Al-Jawahiri

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: