Have you looked at this OID ?
Specific Object Information
Object clsPortLedStatus
OID 1.3.6.1.4.1.9.5.11.1.7.1.1.3
Type INTEGER
Permission read-only
Status current
Values 1 : unknown
2 : on
3 : off
MIB CISCO-RHINO-MIB
Description "Indicates the status of the LED.
Unknown(1) indicates either the LED status is
not supported or the status is none of the
defined."
And the related :
Specific Object Information
Object clsPortLedType
OID 1.3.6.1.4.1.9.5.11.1.7.1.1.2
Type INTEGER
Permission read-only
Status current
Values 1 : ledTx
2 : ledRx
3 : ledLink
4 : led100Mbps
5 : ledRxLoss
6 : ledRxFullOut
7 : ledRxSync
8 : ledFullDuplex
9 : ledOptDetect
Unfortunately the supported images/platforms are very limited : http://tools.cisco.com/ITDIT/MIBS/AdvancedSearch?MibSel=4682
I would say fake it, for link activity.
Poll interface stats (bytes or frames or packets in or out) and make the light in your application blink as long as either is increasing.
(Though I suppose technically some control traffic might or might not cause the physical LED to blink - for example, do BPDUs alone count towards link activity ? I do not know - I can check later, if you'd like.)
I searched and browsed the SNMP Object Navigator (http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en) last night for you, but found nothing suitable (not to say it doesn't exist), and any potentially interesting ones were marked as inaccessible ("Permission not-accessible").
If you're feeling especially crafty, and want the utmost accuracy, you could probably setup an ambient light sensor / "light to frequency converter" in front of each crucial port LED, and code to have that info passed to your application.
But that's not scalable, so it's probably easier to fake it.
EDIT, ROUND 2 !
How about :
"This object is used to indicate the current color of a LED."
Object c2900PortVisualIndicator
OID 1.3.6.1.4.1.9.9.87.1.4.1.1.24
Type INTEGER
Permission read-only
Status current
Values 1 : notused
2 : black
3 : amber
4 : green
MIB CISCO-C2900-MIB
Description "This object is used to indicate the current color of
a LED. If a LED is flashing, the value of this object will
represent the color of the LED at that instant in time.
The following conventions indicate port status:
Link healthy returns green(4)
Link activity usually green(4), but may return black(2).
Link faulty alternating green(4)/amber(3)
Port disabled returns amber(3)"
"The color of the LED."
Object ceExtEntityLEDColor
OID 1.3.6.1.4.1.9.9.195.1.3.1.2
Type INTEGER
Permission read-only
Status mandatory
Values 1 : off
2 : green
3 : amber
4 : red
MIB CISCO-ENTITY-EXT-MIB-V1SMI
Description The color of the LED.
"An integer value that describes the color of the
display"
Type CDisplayColor
Status current
Values 1 : unknown
2 : white
3 : red
4 : green
5 : yellow
6 : amber
7 : blue
8 : greenAndAmber
MIB CISCO-ENTITY-DISPLAY-MIB
Description "An integer value that describes the color of the display.
'greenAndAmber' - Indicates that the display color toggles between green and amber."
As well as,
mrStackUnitBasePortVisualIndicatorGreenMap,
mrStackUnitBasePortVisualIndicatorAmberMap,
mrStackUnitExpansionPortVisualIndicatorGreenMap,
mrStackUnitExpansionPortVisualIndicatorAmberMap, and
mrStackUnitActivityVisualIndicator
all under mrStackUnitEntry.
For ATM :
ciscoAtmIfXmitLed
ciscoAtmIfRecvLed
ciscoAtmIfCdLed
Finally, this nugget, from "CISCO-WIRELESS-EXP-MIB" :
"When the CISCO-LED-MIB.my becomes available and supports the functionality the LED group needs, the LED group will be migrated into that."
Apparently mention of a MIB that never came to be.
Cisco has all sorts of guides to configuring SNMP. For instance: Configuring SNMP. It is possible that some switches or IOS versions will vary. There are also some decision to be made, such as SNMP ACLs, which notifications, etc. You will need to make some decision and customize your configuration.
SNMP Configuration Guidelines
If the switch starts and the switch startup configuration has at least
one snmp-server global configuration command, the SNMP agent is
enabled.
An SNMP group is a table that maps SNMP users to SNMP views. An SNMP
user is a member of an SNMP group. An SNMP host is the recipient of an
SNMP trap operation. An SNMP engine ID is a name for the local or
remote SNMP engine.
When configuring SNMP, follow these guidelines:
- When configuring an SNMP group, do not specify a notify view. The snmp-server host global configuration command autogenerates a notify
view for the user and then adds it to the group associated with that
user. Modifying the group's notify view affects all users associated
with that group. See the Cisco IOS Network Management Command
Reference for information about when you should configure notify
views.
- To configure a remote user, specify the IP address or port number for the remote SNMP agent of the device where the user resides.
- Before you configure remote users for a particular agent, configure the SNMP engine ID, using the snmp-server engineID global
configuration with the remote option. The remote agent's SNMP engine
ID and user password are used to compute the authentication and
privacy digests. If you do not configure the remote engine ID first,
the configuration command fails.
- When configuring SNMP informs, you need to configure the SNMP engine ID for the remote agent in the SNMP database before you can
send proxy requests or informs to it.
- If a local user is not associated with a remote host, the switch does not send informs for the auth (authNoPriv) and the priv
(authPriv) authentication levels.
- Changing the value of the SNMP engine ID has important side effects. A user's password (entered on the command line) is
converted to an MD5 or SHA security digest based on the password
and the local engine ID. The command-line password is then
destroyed, as required by RFC 2274. Because of this deletion, if the value of the engine ID changes, the security digests of SNMPv3 users become invalid, and you need to reconfigure SNMP users by using the snmp-server user username global configuration command. Similar restrictions require the
reconfiguration of community strings when the engine ID changes.
Best Answer
So I've just tried this on an older 3750 (
12.2(52)SE
) and here's what I get - given the following configuration:SNMP gives back the bandwidth value for the
ifSpeed
OID (bps):and a value of
5
for theifHighSpeed
(Mbps):Now, knowing that the
ifIndex
forfa1/0/1
is10001
on this switch, I walked the entire MIB grepping for that index number, and there isn't a single relevant OID that gives a return value of100000000
or100
.So, long story short, it doesn't look like it is possible to return the physical link speed when the
bandwidth
parameter is set.