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

snmpd ipv6 supports multiple community strings #3523

Merged
merged 1 commit into from
Sep 27, 2019

Conversation

qiluo-msft
Copy link
Collaborator

- What I did

- How I did it

- How to verify it
Modify the /etc/sonic/snmp.yml

snmp_rocommunity: public
snmp_location: public
snmp_rocommunities: ['public', 'private1']

Then query inside snmp docker container:

root@sonic:/# snmpwalk -v2c -c private1 ::1 iso.3.6.1.2.1.4.24.4.1.1
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.57 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.59 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.61 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.63 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.65 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.67 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.69 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.71 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.10.1.0.32.255.255.255.255.0.0.0.0.0 = IpAddress: 10.1.0.32
root@sonic:/# snmpwalk -v2c -c public ::1 iso.3.6.1.2.1.4.24.4.1.1
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.57 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.59 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.61 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.63 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.65 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.67 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.69 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.0.0.0.0.0.0.0.0.0.10.0.0.71 = IpAddress: 0.0.0.0
iso.3.6.1.2.1.4.24.4.1.1.10.1.0.32.255.255.255.255.0.0.0.0.0 = IpAddress: 10.1.0.32

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@jleveque
Copy link
Contributor

jleveque commented Sep 26, 2019

Per your example,

snmp_rocommunity: public
snmp_location: public
snmp_rocommunities: ['public', 'private1']

You have defined both snmp_rocommunity and snmp_rocommunities. Does one take precedence over the other?

Would it make more sense to deprecate snmp_rocommunity altogether and replace with snmp_rocommunities, where if there is only one community string, the value will be a list with only one value? #Resolved

@qiluo-msft
Copy link
Collaborator Author

snmp_rocommunities takes precedence over snmp_rocommunity.

snmp_rocommunity will be deprecated in future. Currently the design here is to help automation system migrate from old config to new config. Automation could blindly provide both single string and a list of strings, and it will work on both old image and new image, while old image only respect the single string and new image only respect the list.


In reply to: 535721416 [](ancestors = 535721416)

@qiluo-msft qiluo-msft merged commit 8c46787 into sonic-net:master Sep 27, 2019
@qiluo-msft qiluo-msft deleted the qiluo/fix-snmpv6 branch September 27, 2019 01:23
mssonicbld added a commit that referenced this pull request Sep 16, 2024
…atically (#20268)

#### Why I did it
src/sonic-utilities
```
* ed624895 - (HEAD -> master, origin/master, origin/HEAD) SONIC CLI for CLI-Sessions feature (#3175) (2 hours ago) [i-davydenko]
* c6637553 - Move from bootctl to mokutil when checking for Secure Boot status (#3486) (3 hours ago) [DavidZagury]
* 5fc0ee6c - [spm]: Clean up timers auto generation logic. (#3523) (3 hours ago) [Nazarii Hnydyn]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants