263 | | Now we will add the same SNMPv3 user to your PC. We need to stop snmpd before adding the user, and restart it to read the above changes as well as the new user: |
264 | | {{{ |
265 | | $ sudo service snmpd stop |
266 | | $ sudo net-snmp-create-v3-user -a SHA -A <class password> admin |
267 | | $ sudo service snmpd start |
268 | | }}} |
269 | | |
270 | | Check that snmpd is working: |
271 | | {{{ |
272 | | $ snmpstatus localhost |
273 | | }}} |
274 | | |
275 | | Test your neighbors |
276 | | {{{ |
277 | | $ snmpstatus <Neighbor IP Address> |
278 | | }}} |
| 263 | Now Go to the SNMP Manager and enter below, |
| 264 | {{{ |
| 265 | snmpwalk -v 2c 192.248.4.23 upTime |
| 266 | }}} |
| 267 | |
| 268 | The request should be successful. Now enter the below, |
| 269 | {{{ |
| 270 | snmpwalk -v 3 192.248.4.23 upTime |
| 271 | }}} |
| 272 | |
| 273 | It should give an error. This is because we haven't created a SNMP v3 user at the Agent. Now we will add the same SNMPv3 user to your PC. We need to stop snmpd before adding the user, and restart it to read the above changes as well as the new user: |
| 274 | {{{ |
| 275 | $ sudo systemctl stop snmpd.service |
| 276 | $ sudo net-snmp-config --create-snmpv3-user -a NetAdmin@1 -A SHA -x NetPrivacy@1 -X DES admin |
| 277 | $ sudo systemctl start snmpd.service |
| 278 | }}} |
| 279 | |
| 280 | Now check whether SNMP v3 is working: |
| 281 | {{{ |
| 282 | $ snmpwalk -v 3 192.248.4.23 upTime |
| 283 | $ snmpwalk 192.248.4.23 sysServices |
| 284 | }}} |
| 285 | |