Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os-lldpd: Add additional configuration input field #4561

Open
3 tasks done
emw1086 opened this issue Feb 23, 2025 · 0 comments
Open
3 tasks done

os-lldpd: Add additional configuration input field #4561

emw1086 opened this issue Feb 23, 2025 · 0 comments

Comments

@emw1086
Copy link

emw1086 commented Feb 23, 2025

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.
Would it be possible to add a multi-line text input field to the Services -> LLDPs page to input arbitrary lldp configuration commands, one per line?

There are a few lldp commands that I use to make the "show lldp neighbors" output from connected switches a bit easier to interpret. The first two are good candidates for setting as defaults or maybe check boxes. The last would really benefit from the multi-line input field.

This would also be a solution to Add ability to set chassis management ip via LLDP plugin #4418.

Describe the solution you'd like
I would like a multi-line text input field on /ui/lldpd/general/index which would accept arbitrary lldp configuration commands.

Describe alternatives you've considered
This can be done with lldpcli from the shell but I have not found a way to make the changes permanent.

Additional context
The first change I make is "configure lldp portidsubtype ifname" This is needed because the default behavior of lldp is to use the MAC address as port identifier and the interface name as port description, unless the interface has an alias. This is not a problem for most interfaces since you can specify a description on the appropriate page under Interfaces. However, interfaces that are part of a LAG do not have an individual page under Interfaces and so there is no way to set a description. In this case a show lldp neighbors from the switch lists a MAC address for the two interfaces. By issuing "configure lldp portidsubtype ifname" on OPNsense it sets the default to the interface name so now they show up as igb2, etc. There is probably no reason this should not be the default.

Here is a before and after from the switch:

SW03#sh ll n            
Last table change time   : 0:38:13 ago
Number of table inserts  : 9
Number of table deletes  : 6
Number of table drops    : 0
Number of table age-outs : 0

Port       Neighbor Device ID               Neighbor Port ID           TTL
Et31       RTR01                            7c5a.1c49.f062             120
Et32       RTR01                            7c5a.1c49.f062             120
Ma1        0026.f2fe.2f19                   g4                         120
SW03#sh ll n
Last table change time   : 0:00:32 ago
Number of table inserts  : 15
Number of table deletes  : 12
Number of table drops    : 0
Number of table age-outs : 0

Port       Neighbor Device ID               Neighbor Port ID           TTL
Et31       RTR01                            igb2                       120
Et32       RTR01                            igb3                       120
Ma1        0026.f2fe.2f19                   g4                         120

The second is "configure system chassisid OPNsense" which overrides the default of using a MAC address to say OPNsense which is far more useful. There is probabbly no reason this should not also be the default.

Here is a before and after from the switch: (this is with the first change above already completed)

SW03#sh ll n e 31 d
Interface Ethernet31 detected 1 LLDP neighbors:

  Neighbor 7c5a.1c49.f061/7c5a.1c49.f062, age 15 seconds
  Discovered 0:26:45 ago; Last changed 0:26:45 ago
  - Chassis ID type: MAC address (4)
    Chassis ID     : 7c5a.1c49.f061
  - Port ID type: MAC address (3)
    Port ID     : 7c5a.1c49.f062
  - Time To Live: 120 seconds
  - Port Description: "igb2"
  - System Name: "RTR01"
  - System Description: " FreeBSD 14.1-RELEASE-p6 FreeBSD 14.1-RELEASE-p6 stable/24.7-n267992-a8a728bd015 SMP amd64"
  - System Capabilities : Bridge, WLAN Access Point, Router, Station Only
    Enabled Capabilities: Router
  - Management Address Subtype: IPv4 
    Management Address        : 10.0.0.153
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 1
    OID String                : 
  - Management Address Subtype: IPv6 
    Management Address        : fe80::1
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 9
    OID String                : 
  - IEEE802.1 VLAN Name
    VLAN ID  : 1000
    VLAN Name: "vlan1000"
  - IEEE802.1/IEEE802.3 Link Aggregation
    Link Aggregation Status: Capable, Enabled (0x03)
    Port ID                : 13
  - IEEE802.3 MAC/PHY Configuration/Status
    Auto-negotiation       : Supported, Enabled
                             10BASE-T (full-duplex)
                             100BASE-TX (half-duplex)
                             100BASE-TX (full-duplex)
                             1000BASE-T (half-duplex)
                             1000BASE-T (full-duplex)
    Operational MAU Type   : 1000BASE-T (full-duplex)
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 1):
      00 3f 04
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 5):
      32 31 30 72 33
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 6):
      35 2e 31 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 7):
      31 34 2e 31 2d 52 45 4c 45 41 53 45 2d 70 36
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 8):
      43 32 33 30 37 36 4d 57 42 34 48 34 57 34 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 9):
      53 6f 70 68 6f 73
SW03#sh ll n e 31-32 d
Interface Ethernet31 detected 1 LLDP neighbors:

  Neighbor "OPNsense"/"igb2", age 13 seconds
  Discovered 0:01:43 ago; Last changed 0:01:43 ago
  - Chassis ID type: Locally assigned (7)
    Chassis ID     : "OPNsense"
  - Port ID type: Interface name (5)
    Port ID     : "igb2"
  - Time To Live: 120 seconds
  - Port Description: "igb2"
  - System Name: "RTR01"
  - System Description: " FreeBSD 14.1-RELEASE-p6 FreeBSD 14.1-RELEASE-p6 stable/24.7-n267992-a8a728bd015 SMP amd64"
  - System Capabilities : Bridge, WLAN Access Point, Router, Station Only
    Enabled Capabilities: Router
  - Management Address Subtype: IPv4 
    Management Address        : 10.0.0.153
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 1
    OID String                : 
  - Management Address Subtype: IPv6 
    Management Address        : fe80::1
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 9
    OID String                : 
  - IEEE802.1 VLAN Name
    VLAN ID  : 1000
    VLAN Name: "vlan1000"
  - IEEE802.1/IEEE802.3 Link Aggregation
    Link Aggregation Status: Capable, Enabled (0x03)
    Port ID                : 13
  - IEEE802.3 MAC/PHY Configuration/Status
    Auto-negotiation       : Supported, Enabled
                             10BASE-T (full-duplex)
                             100BASE-TX (half-duplex)
                             100BASE-TX (full-duplex)
                             1000BASE-T (half-duplex)
                             1000BASE-T (full-duplex)
    Operational MAU Type   : 1000BASE-T (full-duplex)
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 1):
      00 3f 04
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 5):
      32 31 30 72 33
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 6):
      35 2e 31 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 7):
      31 34 2e 31 2d 52 45 4c 45 41 53 45 2d 70 36
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 8):
      43 32 33 30 37 36 4d 57 42 34 48 34 57 34 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 9):
      53 6f 70 68 6f 73

The last one is to add descriptions to the interfaces so that it is obvious from the switch not only the physical ports on the OPNsense router they are connected to but also of which LAG they are members. Since the LAG is visible on the Interfaces -> Assignments page this speeds up troubleshooting.

configure ports igb2,igb3 lldp portdescription lagg0
configure ports igb4,igb5 lldp portdescription lagg1

These would be especially nice to have on the Services -> LLDPd page so they saved with the config and so they are visible when they need to be changed.

Here is the last switch output above after the the change:

SW03#sh ll n e 31-32 d
Interface Ethernet31 detected 1 LLDP neighbors:

  Neighbor "OPNsense"/"igb2", age 2 seconds
  Discovered 0:11:31 ago; Last changed 0:00:37 ago
  - Chassis ID type: Locally assigned (7)
    Chassis ID     : "OPNsense"
  - Port ID type: Interface name (5)
    Port ID     : "igb2"
  - Time To Live: 120 seconds
  - Port Description: "lagg0"
  - System Name: "RTR01"
  - System Description: " FreeBSD 14.1-RELEASE-p6 FreeBSD 14.1-RELEASE-p6 stable/24.7-n267992-a8a728bd015 SMP amd64"
  - System Capabilities : Bridge, WLAN Access Point, Router, Station Only
    Enabled Capabilities: Router
  - Management Address Subtype: IPv4 
    Management Address        : 10.0.0.153
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 1
    OID String                : 
  - Management Address Subtype: IPv6 
    Management Address        : fe80::1
    Interface Number Subtype  : ifIndex (2)
    Interface Number          : 9
    OID String                : 
  - IEEE802.1 VLAN Name
    VLAN ID  : 1000
    VLAN Name: "vlan1000"
  - IEEE802.1/IEEE802.3 Link Aggregation
    Link Aggregation Status: Capable, Enabled (0x03)
    Port ID                : 13
  - IEEE802.3 MAC/PHY Configuration/Status
    Auto-negotiation       : Supported, Enabled
                             10BASE-T (full-duplex)
                             100BASE-TX (half-duplex)
                             100BASE-TX (full-duplex)
                             1000BASE-T (half-duplex)
                             1000BASE-T (full-duplex)
    Operational MAU Type   : 1000BASE-T (full-duplex)
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 1):
      00 3f 04
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 5):
      32 31 30 72 33
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 6):
      35 2e 31 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 7):
      31 34 2e 31 2d 52 45 4c 45 41 53 45 2d 70 36
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 8):
      43 32 33 30 37 36 4d 57 42 34 48 34 57 34 31
  - Unknown organizationally-defined TLV (OUI 00-12-BB, subtype 9):
      53 6f 70 68 6f 73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant