Email Subscription Notifications Suspended Temporarily
We are in the process of making navigation in the Servers and Operating Systems forums simpler and more direct. While doing this, we have to temporarily suspend email notifications for subscriptions. If you are subscribed to one or more discussion boards or blogs in the community, please check them daily to see new content. Notifications will be turned back on in a few days. We apologize for any inconvenience this may cause. Thanks, Warren_Admin
Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

Linux, snmpwalk, hp switch mibs

Jose Guevarra
Occasional Contributor

Linux, snmpwalk, hp switch mibs

Hi,

I'm pretty new to snmp so bare with me. I have hp 4000/8000/2650/2626
switches.
I'm trying to get which vlan each port is configured to and any PC's
that are connected to which port. For the most part, I think this
information can be found within the switch nnmp mibs. However, when I
do snmpwalk from a linux box, I don't get lots of the HP proprietary
OIDs(no suprise).

This is where my ignorance with SNMP comes in. I've downloaded the
latest HP MIBS for linux but, I don't know what to do with them. I'm
supposed to compile them somehow? Any tutorials on this would be
helpful. I'm running Mandriva Linux if that helps.

Thanks,

Reply
2 REPLIES
Martin_251
Occasional Advisor

Re: Linux, snmpwalk, hp switch mibs

Hello Jose,

In order to see which interfaces are assigned to which VLAN you can use the OIDs below.

The 2600 is compatible with the industry standard IEEE802.1q Q-BRIDGE-MIB. The port VLAN association can be read from:

Name: dot1qPvid
Type: OBJECT-TYPE
OID: 1.3.6.1.2.1.17.7.1.4.5.1.1
Full path: iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).dot1dBridge(17).qBridgeMIB(7).qBridgeMIBObjects(1).dot1qVlan(4).dot1qPortVlanTable(5).dot1qPortVlanEntry(1).dot1qPvid(1)
Module: Q-BRIDGE-MIB

I ran the following command from Net-SNMP to get the output:

snmpwalk -c -v2c .1.3.6.1.2.1.17.7.1.4.5.1.1

If you need the VLAN association for a specific port, just add the port ID to the OID following the 'ifIndex' OID.



The 4000M/8000Ms are responding to the older HP-VLAN-MIB. You probably want:

Name: hpVlanMemberIndex
Type: OBJECT-TYPE
OID: 1.3.6.1.4.1.11.2.14.11.5.1.3.1.1.5.1.2
Full path: iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).hp(11).nm(2).icf(14).hpicfObjects(11).hpicfSwitch(5).hpSwitch(1).hpVLAN(3).hpVlanLevelOne(1).hpVlanObjects(1).hpVlanMemberTable(5).hpVlanMemberEntry(1).hpVlanMemberIndex(2)
Module: HP-VLAN

Description: The VLAN ID identifies the VLAN the interface is in. The corresponding row in the VLAN Ident Table must exist prior to the index being used in this table.


For the MAC addresses per port I have not found the answer. You could use

Name: dot1dTpFdbAddress
Type: OBJECT-TYPE
OID: 1.3.6.1.2.1.17.4.3.1.1
Full path: iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).dot1dBridge(17).dot1dTp(4).dot1dTpFdbTable(3).dot1dTpFdbEntry(1).dot1dTpFdbAddress(1)
Module: BRIDGE-MIB

The ouput shows the MAC addresses in decimals, rather than Hex. You can also use:

Name: dot1dTpFdbPort
Type: OBJECT-TYPE
OID: 1.3.6.1.2.1.17.4.3.1.2
Full path: iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).dot1dBridge(17).dot1dTp(4).dot1dTpFdbTable(3).dot1dTpFdbEntry(1).dot1dTpFdbPort(2)
Module: BRIDGE-MIB

and get the MAC table in decimals and hex, but then you're left without a port number. However, if you'd mix the two, you'd have what you want.

I hope this helps somewhat.

Martin.
Martin_251
Occasional Advisor

Re: Linux, snmpwalk, hp switch mibs

Hi Jose,

I happened to run into this. I think it serves your purpose if you hadn't figured it out already:

Name: hpSwitchPortFdbAddress
Type: OBJECT-TYPE
OID: 1.3.6.1.4.1.11.2.14.11.5.1.9.4.2.1.2
Full path: iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).hp(11).nm(2).icf(14).hpicfObjects(11).hpicfSwitch(5).hpSwitch(1).hpSwitchStatistics(9).hpSwitchFdbInfo(4).hpSwitchPortFdbAddrTable(2).hpSwitchPortFdbAddrEntry(1).hpSwitchPortFdbAddress(2)
Module: STATISTICS-MIB

Parent: hpSwitchPortFdbAddrEntry
Prev sibling: hpSwitchPortFdbId

Numerical syntax: Octets
Base syntax: OCTET STRING
Composed syntax: MacAddress
Status: mandatory
Max access: read-only

Description: A unicast MAC address for which the port has forwarding and/or filtering information.