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
Showing results for 
Search instead for 
Did you mean: 

using snmp to identify uplink port on 5308 and 4108

mack ragan_1
Occasional Contributor

using snmp to identify uplink port on 5308 and 4108

I have some php scripts that use SNMP to search a group of switches for a particular client's MAC address, with a goal of manipulating some of the interface's characteristics (vlan membership, adminstatus, etc.). The problem: occasionally the MAC will be found on an uplink interface. Typically the uplinks are fiber module interfaces (a1, a2, etc.), but sometimes they are simply one of the ports on a standard 24-port RJ45 module (d24, g10, etc.). Does anyone know of OID(s) that could help me distinguish between uplinks and regular ports?

Kell van Daal
Respected Contributor

Re: using snmp to identify uplink port on 5308 and 4108

You could try using the dot1dTpFdbPort variable. It is the OID for the MAC-addres forwarding table. If multiple instances exist with the same port, than that port is an uplink (or at least has multiple mac-addresses connected).

Or if you have CDP running on all your network switches and stuff, you could try any of the cdpCache variables like: cdpCacheAddressType
If the port is directly behind it (like cdpCacheAddressType.1.etc (1 is the portnumber here)), it is connected with a cdp enabled device. In most circumstances this would be another switch or router. But if you know your network environment, you should know what devices talk CDP.

A clear OID to query that will return a different value for being an uplink or not does not exist to my knowledge.