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

SNMP_AGENT_ADDRESS_CONFIG configuration does not work for link local IP #10766

Open
SuvarnaMeenakshi opened this issue Nov 16, 2023 · 2 comments
Assignees
Labels

Comments

@SuvarnaMeenakshi
Copy link
Contributor

Description

Steps to reproduce the issue:

  1. Bring up VS testbed with sonic-vs.img with changes from [SNMP]: Modify minigraph parser to update SNMP_AGENT_ADDRESS_CONFIG sonic-buildimage#17045
  2. test_snmp_link_local test will fail
    This failure is seen because the test updates the MGMT_INTERFACE IP in config_db and expects snmpd to listen on mgmt IP, which was the design earlier. But after PR 17045, the SNMP_AGENT_ADDRESS_CONFIG should be updated with the right IP on which the snmpd should listen on.
    For snmpd to listen on link local IP, the snmpd.conf should use the "zone id" which is the "interface name" associated with the IP address. If snmpd.conf.j2 uses SNMP_AGENT_ADDRESS_CONFIG IP addresses, there is no associated "interface name" therefore, zone id is not known and snmpd is not able to listen on the right IP%interface.
    More information on link local IP issue and change [SNMP][IPv6]: Fix to use link local IPv6 address as snmp agentAddress sonic-buildimage#16013

Todo:

  1. Update test_snmp_link_local to modify SNMP_AGENT_ADDRESS_CONFIG with link local IP instead of updating mgmt_interface IP.
  2. Update required in snmpd.conf.j2 file to handle zone id.

Describe the results you received:
test_snmp_link_local test will failure

Describe the results you expected:

test_snmp_link_local test should pass
Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@levhuan
Copy link

levhuan commented Jun 14, 2024

Any plan to get this fix? Also note, ip_prefix is expected when configuring MGMT_INTERFACE, not just IPv6 as in https://github.com/sonic-net/sonic-mgmt/blob/master/tests/snmp/test_snmp_link_local.py#L48

@SuvarnaMeenakshi
Copy link
Contributor Author

Any plan to get this fix? Also note, ip_prefix is expected when configuring MGMT_INTERFACE, not just IPv6 as in https://github.com/sonic-net/sonic-mgmt/blob/master/tests/snmp/test_snmp_link_local.py#L48

Fix for this is added here: Fix to use IPv6 linklocal address as snmp agent address by SuvarnaMeenakshi · Pull Request #18350 · sonic-net/sonic-buildimage (github.com)
Below changes are needed to ensure that the sonic-mgmt test works, and Config command enhanced to accept link local IP as agent address along with zone id.
Fix to use IPv6 linklocal address as snmp agent address by SuvarnaMeenakshi · Pull Request #3215 · sonic-net/sonic-utilities (github.com)
Modify snmp link local test to use config cli by SuvarnaMeenakshi · Pull Request #13070 · sonic-net/sonic-mgmt (github.com)

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

No branches or pull requests

2 participants