Page MenuHomeVyOS Platform

show more detail when using lldp
Open, NormalPublicFEATURE REQUEST

Description

current lldp implementation on vyos does not provide very much information; you can only see the remote device platform and port description, but there is no way to view management IP, remote port, PVID, etc.

i remember vyos used to do this, but it appears to have been removed at some point in the 1.5 (or 1.4?) rolling release.

can vyos re-implement the following commands?
show lldp neighbors details - analogous to lldpctl
show lldp neighbors interface eth0 detail - analogous to lldpctl eth0

additionally the "remote port" column prints out the PortDescr element instead of interface name, which can be confusing. is it more logical to use the PortID element which corresponds to the neighbor/remote physical port?

in my example the remote port Gi0/2 has the description "lab-rt1"

asw1#show running-config interface gigabitEthernet 0/2
Building configuration...

Current configuration : 166 bytes
!
interface GigabitEthernet0/2
 description lab-rt1
[...]

which vyos uses as the remote port

testuser@testlab1:~$ show lldp neighbors 
Capability Codes: R - Router, B - Bridge, W - Wlan r - Repeater, S - Station
                  D - Docsis, T - Telephone, O - Other

Device         Local Port    Protocol    Capability    Platform                               Remote Port
-------------  ------------  ----------  ------------  -------------------------------------  -------------
asw1.testlab   eth5          LLDP        BR            Cisco IOS Software, C2960L Software (  lab-rt1

raw output of lldpctl on that interface:

testuser@testlab1:~$ lldpctl eth5
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth5, via: LLDP, RID: 1, Time: 0 day, 00:30:21
  Chassis:     
    ChassisID:    mac c4:c6:03:d4:ca:80
    SysName:      asw1.testlab
    SysDescr:     Cisco IOS Software, C2960L Software (C2960L-UNIVERSALK9-M), Version 15.2(7)E8, RELEASE SOFTWARE (fc1)
                  Technical Support: http://www.cisco.com/techsupport
                  Copyright (c) 1986-2023 by Cisco Systems, Inc.
                  Compiled Thu 09-Mar-23 02:15 by mcpre
    MgmtIP:       10.69.10.10
    Capability:   Bridge, on
    Capability:   Router, on
  Port:        
    PortID:       ifname Gi0/2
    PortDescr:    lab-rt1
[...]

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)

Event Timeline

dmbaturin triaged this task as Normal priority.Feb 17 2024, 7:56 PM

I'll see if I can whip up a patch for the detail commands.

On the subject of the portID <-> portDescr swap, I've found this infuriating in the past - net-snmp and various other full-OS diagnostic stacks also tend to do it the opposite way around to vendor hardware. For example, 2 VyOSes seeing each other over the network report correctly (as far as they're concerned):

$ show lldp neighbors 
Capability Codes: R - Router, B - Bridge, W - Wlan r - Repeater, S - Station
                  D - Docsis, T - Telephone, O - Other

Device           Local Port    Protocol    Capability    Platform                       Remote Port
---------------  ------------  ----------  ------------  -----------------------------  -------------
TEST-VYOS-RIGHT  eth1          LLDP        R             VyOS 1.5-rolling-202406020021  eth1

With this in the lldpctl output:

Port:        
  PortID:       mac bc:24:11:f3:ab:a8
  PortDescr:    eth1
  TTL:          120

I've seen a mix and match of those 2 fields even with vendor hardware, so I'm not going to swap them as part of any patch. We *could* build in some vendor-specific logic to figure out which field is "most correct" to show as the Remote Port, but ideally, that logic would be in lldpd - it might be an idea to throw the suggestion upstream. In any case, providing a detail view again will clear up any uncertainties.

EDIT: After having a look, it might not be as painful as expected, the PortID has a type field with constrained values so we can figure out what it is.

I've created a PR for this one: https://github.com/vyos/vyos-1x/pull/3590 covering both pieces - for Remote Port, if the PortID type is ifname, we use the PortID before falling through to Descr and so on. The detail view side of things is a straightforward call to lldpcli in this PR but could be improved.

@Thunderstorm looks like this one made it to the current rolling, if you're able to try it out?