Identify links topology in Junos

‎02-01-2019 09:24 PM

Hi Team,

I understand we able to verify links that created on the equipment. Protocols lldp, lsp, ospf can provide those information but what is the best command that able to show link between neighbors? I try to understand how link is created with the neighbours and at the same time able to provide local and neighbour links information. Is there any specific command that able to provide local and neighbor info that created the link (source port/ip/mac address/destn port/ip/mac address) . I have lookup example of show lldp neighbor and show ospf neighbour


Local Interface   Parent Interface   Chassis Id          Port info    System Name
xe-3/0/4.0        ae31.0             b0:c6:9a:63:80:40   xe-0/0/0.0   host.jnpr.net
xe-3/0/5.0        ae31.0             b0:c6:9a:63:80:40   xe-0/0/1.0   host.jnpr.net
Address         Interface             State      ID              Pri  Dead        so-0/0/0.0             Full         128   39        so-0/0/1.0             Full         128   39        so-0/0/2.0             Full         128   33 

 show lldp neighbr does not show interface/mac address of neighbor device.

What is the initial info require to create a link between 2 devices?

Im sorry ..noob in this but learning from you guyz and hope you could enlighten me. Thanks you for you support.


Re: Identify links topology in Junos

‎02-02-2019 04:44 AM

Most NMS software will use LLDP to discover and build link level topologies.

lldp is a link layer protocol so by default you see the interface and mac address of the neighbor link.

But in order for this to work lldp has to be enabled on both the local and connected port.


If you add the management address of the device, typically the loopback address, to the configuration this will also appear.

set protocols lldp management-address

example configuration



OSPF is layer 3 by default so does show the router-id ip address in the return.  But generally this will not be active on all links only layer 3 connections out of a device so is less comprehensive for building topologies.


Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)

Re: Identify links topology in Junos

‎02-02-2019 04:58 AM

Hello Jar.


There are LLDP show commands providing information about local device and providing more details about neighbor on specific interface. The support of the commands and their output is platform and version specific.

device > show lldp neighbors interface <interface-name>
device > show lldp local-information


You can more information and example output in command reference in TechLibrary:




More information about working with LLDP:




You can capture the control traffic on specific device interface if needed to further decode more information. You can capture only traffic destined to control plane (Routing Engine - RE). Use command:

device > monitor traffic interface <interface-name> layer2-headers no-resolve [ matching <regexp>]


Option layer2-headers will show you also source and destination MAC address. The keyword matching can narrow captured traffic (syntax is similar to tcpdump).  There is also hidden option to write output to PCAP file ( write-file <file-name>) - one can analyze output later in Wireshark for example.


One example - capture the OSPFv2 traffic on interface ge-0/0/1.0 :

device > monitor traffic interface ge-0/0/1.0 layer2-headers no-resolve matching "proto 89"


More options are in command reference for "monitor traffic" :



Could you please elabore more on question below? It is not clear to me what do you mean.

@jar wrote:

What is the initial info require to create a link between 2 devices?


Have a nice day.


Luděk Matoušek