Skip to content

lldpRemManAddrTable SNMP failure due to DHCP on Mgmt interface #6636

@tbgowda

Description

@tbgowda

Description

Sonic node configured with DHCP fails the SNMP query for OID : 1.0.8802.1.1.2.1.4.2 (lldpRemManAddrTable)

Steps to reproduce the issue:

  1. Have a Sonic box connected either back-to-back or with LLDP enabled peer.
  2. Remove static IP address on Mgmt interface if configured. Make sure there is no entry for MGMT_INTERFACE in config_db.json.
  3. Reload lldp service
  4. Query SNMP for the OID provided above on Sonic box: snmpwalk -v 2c -c public 1.0.8802.1.1.2.1.4.2

Describe the results you received:

iso.0.8802.1.1.2.1.4.2 = No Such Object available on this agent at this OID

Describe the results you expected:

Expected the sonic node to return LLDP information for the SNMP query

Additional information you deem important (e.g. issue happens only occasionally):

The issue seems to be with the way lldpd configuration file is formed and the presence of IPv6 address in the redisDB. When the SNMP query comes in the code that handles it is unable to decode the IPv4 address from redisDB since it also has IPv6 address.

It looks like IPv6 issue was addressed by changing the lldpd configuration in two places:

a. Does this one fix it for 1.0.8802.1.1.2.1.3.8: sonic-net/sonic-snmpagent#106 ?
b. This one seems to disallow IPv6 addresses altogether if there is a static IP: #5699 ?

On chassis with issue:

[lldpcli] # show chassis

Local chassis:

Chassis:
ChassisID: mac 02:0a:99:b9:bb:7e
SysName: sonic
SysDescr: Debian GNU/Linux 9 (stretch) Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64
TTL: 120
MgmtIP: 192.168.122.56
MgmtIP: fd00:c0:a8:7a:1::4d
Capability: Bridge, on
Capability: Router, on
Capability: Wlan, off
Capability: Station, off

root@sonic:/# cat /etc/lldpd.conf
configure system hostname sonic
pause

127.0.0.1:6379> HGETALL LLDP_LOC_CHASSIS

  1. "lldp_loc_sys_cap_supported"

  2. "28 00"

  3. "lldp_loc_sys_cap_enabled"

  4. "28 00"

  5. "lldp_loc_sys_desc"

  6. "Debian GNU/Linux 9 (stretch) Linux 4.19.0-9-amd64 Update README.md #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64"

  7. "lldp_loc_sys_name"

  8. "sonic"

  9. "lldp_loc_man_addr"

  10. "192.168.122.56,fd00:c0:a8:7a:1::4d"

  11. "lldp_loc_chassis_id"

  12. "02:0a:99:b9:bb:7e"

  13. "lldp_loc_chassis_id_subtype"

  14. "4"

    Output of show version:
    branch 201911

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions