snmp subagent loses all subsequent lldpRemSysName (1.0.8802.1.1.2.1.4.1.1.9) after entry with missing SysName is added.
Using lldpd version around 1.0.4 (patch 990e4e38431 Oct 19, 2019) and
snmpd version 5.8.0 (patch 0a6e8c331159 Oct 28, 2019)
All the information from lldpctl is correct.
It's only the entries in the after the entry missing a SysName in lldpRemSysName table that disappear from the snmp subagent.
This is easy to reproduce. Simply inject the packet that is missing a SysName
early after lldpd starts up. I'll attach the pcap to this bug. But the pcap just
contains the following decode:
Start lldpd and inject the packet (tcpreplay -i ethX connectx.pcap) fairly early
so that you get other lldp neighbors after it. The point is that entries after this
one entry are missing from lldpRemSysName.
Check the two tables by doing some snmp walks. You should see something like this:
Notice that the entry in lldpRemSysName table for our injected packet 58000.29.2
is missing because it has no name. But the problem is all the other entries after that
are also missing.
Entries for lldpRemSysName 58000.29.2, .59200.4.3-59200.31.7 are missing.
If we do not inject the packet with missing SysName, we do see the other entries:
The lldpRemSysName table should continue with the other SysNames.
These normally exist if the oddball packet was not injected:
As you can see, lldpctl handles the packets just fine. It is the snmp subagent that
seems to drop all lldpRemSysName entries after the packet with a missing SysName
is injected: (The entry with the missing SysName is on swp26)
root@cel-redxp-01:~# lldpctl [223/1892]
LLDP neighbors:
Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:00:36
Chassis:
ChassisID: mac 6c:64:1a:00:0d:83
SysName: pioneerMS7.it.cumulusnetworks.com
SysDescr: Cumulus Linux version 2.5.4 running on cel kennisis
MgmtIP: 172.17.1.14
MgmtIface: 2
Capability: Bridge, on
Capability: Router, on
Port:
PortID: ifname swp25
PortDescr: swp25
TTL: 120
Interface: swp1, via: LLDP, RID: 3, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 00:01:00:00:01:00
SysName: host1
SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996)
MgmtIP: 192.168.0.15
MgmtIface: 2
MgmtIP: fe80::201:ff:fe00:100
MgmtIface: 2
Capability: Bridge, off
Capability: Bridge, off [147/1843]
Capability: Router, on
Port:
PortID: ifname swp1
PortDescr: swp1
TTL: 120
PMD autoneg: supported: no, enabled: no
MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable
LLDP-MED:
Device Type: Network Connectivity Device
Capability: Capabilities, yes
Capability: Policy, yes
Capability: Location, yes
Capability: MDI/PSE, yes
Capability: MDI/PD, yes
Capability: Inventory, yes
Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba
Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil
Serial Number: Not Specified
Manufacturer: QEMU
Model: Standard PC (i440FX + PIIX, 1996
Interface: swp2, via: LLDP, RID: 6, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 00:01:00:00:02:00
SysName: host2
SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996)
MgmtIP: 192.168.0.15
MgmtIface: 2
MgmtIP: fe80::201:ff:fe00:200
MgmtIface: 2
Capability: Bridge, off
Capability: Router, on
Port:
PortID: ifname swp1
PortDescr: swp1
TTL: 120
PMD autoneg: supported: no, enabled: no
MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable
LLDP-MED:
Device Type: Network Connectivity Device
Capability: Capabilities, yes
Capability: Policy, yes
Capability: Location, yes
Capability: MDI/PSE, yes
Capability: MDI/PD, yes
Capability: Inventory, yes
Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba
Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil
Serial Number: Not Specified
Manufacturer: QEMU
Model: Standard PC (i440FX + PIIX, 1996
Interface: swp3, via: LLDP, RID: 5, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 00:01:00:00:03:00
SysName: host3
SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996)
MgmtIP: 192.168.0.15
MgmtIface: 2
MgmtIP: fe80::201:ff:fe00:300
MgmtIface: 2
Capability: Bridge, off
Capability: Router, on
Port:
PortID: ifname swp1
PortDescr: swp1
TTL: 120
PMD autoneg: supported: no, enabled: no
MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable
LLDP-MED:
Device Type: Network Connectivity Device
Capability: Capabilities, yes
Capability: Policy, yes
Capability: Location, yes
Capability: MDI/PSE, yes [70/1843]
Capability: MDI/PD, yes
Capability: Inventory, yes
Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba
Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil
Serial Number: Not Specified
Manufacturer: QEMU
Model: Standard PC (i440FX + PIIX, 1996
Interface: swp4, via: LLDP, RID: 8, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 00:01:00:00:04:00
SysName: host4
SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996)
MgmtIP: 192.168.0.15
MgmtIface: 2
MgmtIP: fe80::201:ff:fe00:400
MgmtIface: 2
Capability: Bridge, off
Capability: Router, on
Port:
PortID: ifname swp1
PortDescr: swp1
TTL: 120
PMD autoneg: supported: no, enabled: no
MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable
LLDP-MED:
Device Type: Network Connectivity Device
Capability: Capabilities, yes
Capability: Policy, yes
Capability: Location, yes
Capability: MDI/PSE, yes
Capability: MDI/PD, yes
Capability: Inventory, yes
Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba
Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil
Serial Number: Not Specified
Manufacturer: QEMU
Model: Standard PC (i440FX + PIIX, 1996
Interface: swp25, via: LLDP, RID: 9, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 00:01:00:00:05:00
SysName: host5
SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996)
MgmtIP: 192.168.0.15
MgmtIface: 2
MgmtIP: fe80::201:ff:fe00:500
MgmtIface: 2
Capability: Bridge, off
Capability: Router, on
Port:
PortID: ifname swp1
PortDescr: swp1
TTL: 120
PMD autoneg: supported: no, enabled: no
MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable
LLDP-MED:
Device Type: Network Connectivity Device
Capability: Capabilities, yes
Capability: Policy, yes
Capability: Location, yes
Capability: MDI/PSE, yes
Capability: MDI/PD, yes
Capability: Inventory, yes
Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba
Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil
Serial Number: Not Specified
Manufacturer: QEMU
Model: Standard PC (i440FX + PIIX, 1996
Bug Description
snmp subagent loses all subsequent lldpRemSysName (1.0.8802.1.1.2.1.4.1.1.9) after entry with missing SysName is added.
Using lldpd version around 1.0.4 (patch 990e4e38431 Oct 19, 2019) and snmpd version 5.8.0 (patch 0a6e8c331159 Oct 28, 2019)
All the information from lldpctl is correct.
It's only the entries in the after the entry missing a SysName in lldpRemSysName table that disappear from the snmp subagent.
This is easy to reproduce. Simply inject the packet that is missing a SysName early after lldpd starts up. I'll attach the pcap to this bug. But the pcap just contains the following decode:
LLDP-MIB::lldpRemSysName.57800.2.1 = STRING: pioneerMS7.it.cumulusnetworks.com root@cel-redxp-01:~#
root@cel-redxp-01:~# snmpwalk -v2c -cpublic localhost 1.0.8802.1.1.2.1.4.1.1.8; snmpwalk -v2c -cpublic localhost 1.0.8802.1.1.2.1.4.1.1.9 LLDP-MIB::lldpRemPortDesc.57800.2.1 = STRING: swp25 LLDP-MIB::lldpRemPortDesc.59200.4.3 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.5.6 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.6.5 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.7.8 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.28.9 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.30.4 = STRING: swp1 LLDP-MIB::lldpRemPortDesc.59200.31.7 = STRING: swp1 LLDP-MIB::lldpRemSysName.57800.2.1 = STRING: pioneerMS7.it.cumulusnetworks.com LLDP-MIB::lldpRemSysName.59200.4.3 = STRING: host1 LLDP-MIB::lldpRemSysName.59200.5.6 = STRING: host2 LLDP-MIB::lldpRemSysName.59200.6.5 = STRING: host3 LLDP-MIB::lldpRemSysName.59200.7.8 = STRING: host4 LLDP-MIB::lldpRemSysName.59200.28.9 = STRING: host5 LLDP-MIB::lldpRemSysName.59200.30.4 = STRING: host7 LLDP-MIB::lldpRemSysName.59200.31.7 = STRING: host8
root@cel-redxp-01:~# lldpctl [223/1892]
LLDP neighbors:
Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:00:36 Chassis:
ChassisID: mac 6c:64:1a:00:0d:83 SysName: pioneerMS7.it.cumulusnetworks.com SysDescr: Cumulus Linux version 2.5.4 running on cel kennisis MgmtIP: 172.17.1.14 MgmtIface: 2 Capability: Bridge, on Capability: Router, on Port:
PortID: ifname swp25 PortDescr: swp25 TTL: 120
Interface: swp1, via: LLDP, RID: 3, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:01:00 SysName: host1 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:100 MgmtIface: 2 Capability: Bridge, off Capability: Bridge, off [147/1843] Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp2, via: LLDP, RID: 6, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:02:00 SysName: host2 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:200 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp3, via: LLDP, RID: 5, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:03:00 SysName: host3 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:300 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes [70/1843] Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp4, via: LLDP, RID: 8, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:04:00 SysName: host4 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:400 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp25, via: LLDP, RID: 9, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:05:00 SysName: host5 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:500 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp26, via: LLDP, RID: 2, Time: 0 day, 00:00:34 Chassis:
ChassisID: mac 50:6b:4b:f6:1e:b3 Port:
PortID: mac 50:6b:4b:f6:1e:b1 PortDescr: ConnectX-4 Lx, 25G/10G/1G SFP TTL: 48
Interface: swp27, via: LLDP, RID: 4, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:07:00 SysName: host7 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:700 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996
Interface: swp28, via: LLDP, RID: 7, Time: 0 day, 00:00:22 Chassis:
ChassisID: mac 00:01:00:00:08:00 SysName: host8 SysDescr: Cumulus Linux version (hydra-15.mvlab /tmp/stannous/BasicRouterConfig/)4.1.2~1588807579.1d071f8f running on QEMU Standard PC (i440FX + PIIX, 1996) MgmtIP: 192.168.0.15 MgmtIface: 2 MgmtIP: fe80::201:ff:fe00:800 MgmtIface: 2 Capability: Bridge, off Capability: Router, on Port:
PortID: ifname swp1 PortDescr: swp1 TTL: 120 PMD autoneg: supported: no, enabled: no MAU oper type: 10GigBaseCX4 - X copper over 8 pair 100-Ohm balanced cable LLDP-MED:
Device Type: Network Connectivity Device Capability: Capabilities, yes Capability: Policy, yes Capability: Location, yes Capability: MDI/PSE, yes Capability: MDI/PD, yes Capability: Inventory, yes Inventory:
Software Revision: (hydra-15.mvlab /tmp/stannous/Ba Firmware Revision: rel-1.11.0-0-g63451fca13-prebuil Serial Number: Not Specified Manufacturer: QEMU Model: Standard PC (i440FX + PIIX, 1996