current ← nicolas-fort:T4857-frr-fix
opened 01:30PM - 08 Feb 23 UTC
## Change Summary
After including FRR recommendations on snmp, we get error w…hen not defining client or network under community.
Error reported in this [blog post](https://forum.vyos.io/t/unable-to-query-snmp-anymore-in-a-more-recent-1-4-version/10388).
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes)
- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
- [ ] Other (please describe):
## Related Task(s)
* https://phabricator.vyos.net/T4857
## Component(s) name
snmp
## Proposed changes
## How to test
```
## Simple config, with no client/network defined
vyos@vyos:~$ show config comm | grep snmp
set service snmp community FOO authorization 'ro'
set service snmp contact 'EMAIL'
set service snmp location 'LOCATION'
## Check service is running (before this patch an error was noted here)
vyos@vyos:~$ sudo systemctl status snmpd
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; disabled; vendor preset: enabled)
Drop-In: /run/systemd/system/snmpd.service.d
└─override.conf
Active: active (running) since Wed 2023-02-08 13:24:31 UTC; 1min 12s ago
Process: 3918 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS)
Main PID: 3919 (snmpd)
Tasks: 1 (limit: 536)
Memory: 7.5M
CPU: 73ms
CGroup: /system.slice/snmpd.service
└─3919 /usr/sbin/snmpd -LS0-5d -Lf /dev/null -u Debian-snmp -g Debian-snmp -f -p /run/snmpd.pid
Feb 08 13:24:31 vyos systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
Feb 08 13:24:31 vyos systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..
vyos@vyos:~$
## Check snmpwalk from localhost
vyos@vyos:~$ snmpwalk -v 2c -c FOO localhost
SNMPv2-MIB::sysDescr.0 = STRING: VyOS 1.4-rolling-202302080317
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.44641
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (17050) 0:02:50.50
SNMPv2-MIB::sysContact.0 = STRING: EMAIL
...
...
# Check restrictions when trying to get routing table:
vyos@vyos:~$ snmpwalk -v 2c -c FOO localhost .1.3.6.1.2.1.4.21
IP-MIB::ip.21 = No Such Object available on this agent at this OID
```
## Checklist:
- [x] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document
- [x] I have linked this PR to one or more Phabricator Task(s)
- [x] I have run the components [**SMOKETESTS**](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) if applicable
- [x] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly