The MIB is indexed differently depending on whether the device views itself as a router or switch. The failsafe determination of router or switch must be done without reference to the LLDP capabilities string as this may not be adhered to by all manufacturers.
A port number has no mandatory relationship to an
InterfaceIndex object (of the interfaces MIB, IETF RFC 2863).
If the LLDP agent is a IEEE 802.1D, IEEE 802.1Q bridge, the
LldpPortNumber will have the same value as the dot1dBasePort
object (defined in IETF RFC 1493) associated corresponding
bridge port. If the system hosting LLDP agent is not an
IEEE 802.1D or an IEEE 802.1Q bridge, the LldpPortNumber
will have the same value as the corresponding interface's
InterfaceIndex object.
The MIB is indexed differently depending on whether the device views itself as a router or switch. The failsafe determination of router or switch must be done without reference to the LLDP capabilities string as this may not be adhered to by all manufacturers.
https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib