Details
Description
LLDP discovery inserts wrong links into the 'links' table when run against Juniper MX (running JunOS 11.4R5).
LLDP discovery cannot find the right port_id and as a last resort uses the remote MAC-Adress which actually discovers the wrong link on the remote side.
Solution:
Juniper returns the SNMP ifIndex of the remote port as lldpRemPortId. We can use this to find the correct port. Patch is attached.
And as a personal opinion: Perhaps the fallback to the mac-address should be removed. I would rather have no link discovered instead of the wrong one.