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

lldpRemManAddrTable SNMP failure due to DHCP on Mgmt interface #6636

Closed
tbgowda opened this issue Feb 1, 2021 · 4 comments
Closed

lldpRemManAddrTable SNMP failure due to DHCP on Mgmt interface #6636

tbgowda opened this issue Feb 1, 2021 · 4 comments
Assignees

Comments

@tbgowda
Copy link
Contributor

tbgowda commented Feb 1, 2021

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

@lguohan
Copy link
Collaborator

lguohan commented Feb 3, 2021

can @abdosi take a look is it a 201911 image?

@abdosi
Copy link
Contributor

abdosi commented Feb 11, 2021

@tbgowda

For the MIB snmpwalk -v 2c -c public 1.0.8802.1.1.2.1.4.2 (Remote Peer) the data is generated from table LLDP_ENTRY_TABLE from APPDB . Can you provide o/p of that table when issue is seen .

Above information you provided is for Local Table/Mib.

@tbgowda
Copy link
Contributor Author

tbgowda commented Feb 18, 2021

@abdosi , thanks for looking at this issue. The reason why I gave the local chassis info is because that is what is being sent to the remote end through LLDP, I should have been clearer in my description of the issue.

In any case, here is the output from the LLDP_ENTRY_TABLE.

127.0.0.1:6379> hgetall LLDP_ENTRY_TABLE:Ethernet0

  1. "lldp_rem_index"
  2. "1"
  3. "lldp_rem_port_id"
  4. "Ethernet0"
  5. "lldp_rem_chassis_id_subtype"
  6. "4"
  7. "lldp_rem_time_mark"
  8. "2470"
  9. "lldp_rem_sys_name"
  10. "sonic"
  11. "lldp_rem_chassis_id"
  12. "02:23:05:95:5a:71"
  13. "lldp_rem_sys_desc"
  14. "Debian GNU/Linux 10 (buster) Linux 4.19.0-9-amd64 Update README.md #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64"
  15. "lldp_rem_port_id_subtype"
  16. "7"
  17. "lldp_rem_sys_cap_enabled"
  18. "28 00"
  19. "lldp_rem_man_addr"
  20. "192.168.122.242,fd00:c0:a8:7a:1::2d"
  21. "lldp_rem_port_desc"
  22. "Ethernet0"
  23. "lldp_rem_sys_cap_supported"
  24. "28 00"

abdosi added a commit to abdosi/sonic-snmpagent that referenced this issue Mar 12, 2021
sonic-net/sonic-buildimage#7036
sonic-net/sonic-buildimage#6636

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to sonic-net/sonic-snmpagent that referenced this issue Mar 15, 2021
…ciated with interface. (#201)

Fixes:-
sonic-net/sonic-buildimage#7036
sonic-net/sonic-buildimage#6636

Updated to use prefix of 16 byte instead of 6 byte for Ipv6 Management Address. Confirmed with other Vendor Nos

Fixed lookup() so that get-next work correctly from test-cases.

Updated all files to use new utility API ip2byte_tuple()
abdosi added a commit to sonic-net/sonic-snmpagent that referenced this issue Mar 15, 2021
…ciated with interface. (#201)

Fixes:-
sonic-net/sonic-buildimage#7036
sonic-net/sonic-buildimage#6636

Updated to use prefix of 16 byte instead of 6 byte for Ipv6 Management Address. Confirmed with other Vendor Nos

Fixed lookup() so that get-next work correctly from test-cases.

Updated all files to use new utility API ip2byte_tuple()
@abdosi
Copy link
Contributor

abdosi commented Apr 3, 2021

@tbgowda this issue should be fixed now in both master and 201911.
Please confirm.

praveen-li pushed a commit to praveen-li/sonic-snmpagent that referenced this issue Jun 2, 2021
…ciated with interface. (sonic-net#201)

Fixes:-
sonic-net/sonic-buildimage#7036
sonic-net/sonic-buildimage#6636

Updated to use prefix of 16 byte instead of 6 byte for Ipv6 Management Address. Confirmed with other Vendor Nos

Fixed lookup() so that get-next work correctly from test-cases.

Updated all files to use new utility API ip2byte_tuple()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants