Display remote port name in LLDP output
Closed, ResolvedPublic

Description

Our current LLDP neighbor output show the SNMP ID of the remote interface, which is not very useful.

From https://kb.juniper.net/InfoCenter/index?page=content&id=KB27575

I'm suggesting to test then deploy the following to all the Juniper devices:

[edit protocols lldp]
port-id-subtype {
    interface-name;
}

Related Objects

ayounsi created this task.Nov 2 2018, 9:11 PM
ayounsi triaged this task as Low priority.
Restricted Application added a project: Operations. · View Herald TranscriptNov 2 2018, 9:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
faidon added a comment.Nov 5 2018, 1:50 PM

Hmmm, weird. In the previous generation of stacks, this was different; compare:

Chassis:
  [...]
  SysName:      asw2-c-eqiad
  [...]
Port:        
  PortID:       local 791
  PortDescr:    bast1002
  MFS:          9192

vs.

Chassis:
  [...]
  SysName:      asw-a-eqiad
  [...]
Port:        
  PortID:       local 950
  PortDescr:    ge-2/0/3.0
  MFS:          9192

Neither is really correct, but at least the older behavior was more useful. Your propose change sounds like it would have the effect of setting the PortID to the interface while keeping PortDescr set to the port description, right? If so, that sounds ideal, so +1 :)

Mentioned in SAL (#wikimedia-operations) [2018-11-05T16:49:06Z] <XioNoX> Update LLDP config on cr3-ulsfo - T208630

Confirmed working.
I updated cr3-ulsfo, and seen on the cr4-ulsfo side:
Before:

cr4-ulsfo> show lldp neighbors 
Local Interface    Parent Interface    Chassis Id          Port info          System Name
[...]
xe-0/1/7           ae0                 f0:4b:3a:ef:82:2c   541                cr3-ulsfo           
et-0/0/0           ae0                 f0:4b:3a:ef:82:2c   549                cr3-ulsfo

After:

cr4-ulsfo> show lldp neighbors    
Local Interface    Parent Interface    Chassis Id          Port info          System Name
[...]
et-0/0/0           ae0                 f0:4b:3a:ef:82:2c   et-0/0/0           cr3-ulsfo           
xe-0/1/7           ae0                 f0:4b:3a:ef:82:2c   xe-0/1/7           cr3-ulsfo

To confirm, the Port description stays the same (with the remote description) only Port ID change from useless SNMP ID to ifName. Which is what we want.

That's great! +1 in deploying this more widely! :)

Might be prudent to double-check the behavior before/after this change on the older switch stacks (and JunOS versions in general?), like e.g. asw-a-eqiad above.

From https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/port-id-subtype-edit-protocols-lldp.html

Statement introduced in Junos OS Release 12.3R1

So that's not going to be for the old ones (at this point eqiad A and C only). But will deploy carefully anyway.

Mentioned in SAL (#wikimedia-operations) [2018-11-06T15:08:35Z] <XioNoX> push lldp port-id-subtype interface-name to all routers - T208630

Mentioned in SAL (#wikimedia-operations) [2018-11-06T15:16:03Z] <XioNoX> push lldp port-id-subtype interface-name to all compatible switches - T208630

Looks like an esthetic Juniper bug:
On asw2-a-eqiad:

show lldp neighbors 
Local Interface    Parent Interface    Chassis Id          Port info          System Name
[...]
xe-2/0/44          ae1                 5c:5e:ab:3d:87:c0   Core: asw2-a-eqiad:xe-2/0/44 {#4776} [10Gbps DF] re0.cr1-eqiad

While:

show lldp neighbors interface xe-2/0/44
[...]
Neighbour Information:
[...]
Port ID            : xe-3/0/0
Port description   : Core: asw2-a-eqiad:xe-2/0/44 {#4776} [10Gbps DF]

So it seems like it sometimes uses the PortDescr as Port Info instead of Port ID.
Not a blocker as it's at least slightly more useful than the SNMP ID.

ayounsi closed this task as Resolved.Nov 6 2018, 3:47 PM

Pushed everywhere possible and so far looks sane.
I also updated jnt.

faidon reopened this task as Open.Nov 6 2018, 5:44 PM

Looks like an esthetic Juniper bug:
<snip>

Sounds like there is a statement, neighbor-port-info-display, that can fix this as well -- let's try it?

Also, I still see this as not fixed e.g. here:

faidon@asw2-a-eqiad> show lldp neighbors interface xe-2/0/43
[...]
Port ID            : 1235
Port description   : xe-1/1/0.0

Sounds like there is a statement, neighbor-port-info-display, that can fix this as well -- let's try it?

I tested it on asw2-a-eqiad and asw2-ulsfo.
The issue is that it shows the proper port ID (default is to show port desc) of neighbor network devices.
But this also change the output on server ports, displaying the neighbor MAC address instead of the interface name.

So unless we get into the configuring LLDP on the server side rabbit hole (if it's even possible), we have the choice between:

  • Displaying network neighbor interface description and server neighbor interface name
  • Displaying network neighbor interface name and server neighbor MAC address

At this point I'm not sure it's worth changing the configuration, especially as people might be using the server interface information (or we should ask around first, again might not be worth the time/effort).

Also, I still see this as not fixed e.g. here:

faidon@asw2-a-eqiad> show lldp neighbors interface xe-2/0/43
[...]
Port ID            : 1235
Port description   : xe-1/1/0.0

This is expected, as it's asw-a-eqaid advertising its info to asw2, port-id-subtype is configured on the sender side.
and asw-a-eqiad is too old for that configuration option.

faidon added a comment.Nov 6 2018, 7:25 PM

Mmmm OK, that's not super consistent :( It's possible to change the lldpd config and set configure lldp portidsubtype ifname, but it might be complex because of our Puppet facts and is probably not worth our time in general indeed.

So on which devices has this setting not been applied to?

port-id-subtype not applied on asw-a-eqiad, asw-c-eqiad (soon decom in T208734), and asw2-a5-eqiad

neighbor-port-info-display has Port Description by default on all the EX/QFX switches, Port ID on all the other devices (routers).

faidon closed this task as Resolved.Nov 6 2018, 7:40 PM

Cool, thanks :)