Find Neighbour with SNMP LLDP

user2260979 picture user2260979 · Apr 9, 2013 · Viewed 19.6k times · Source

i have several switches (Hirschmann Mach1040, RS40) connected together. So i want to elict the mac address/ip address of the connected neigbour switch on port x with the snmp. is there a lldp mib_value which tells me the neihbour mac or ip at the specific port on the swich??

Thanks a lot for the help!!!

Answer

Colby Blair picture Colby Blair · Apr 9, 2013

I think you are wanting lldpRemLocalPortNum, which is of syntax type LldpPortNumber. The definition of LldpPortNumber says:

        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.

InterfaceIndex is the IF-MIB::ifIndex, which should map to the correct interface on the device. Does that help?