-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maen Artimy
committed
Mar 8, 2024
1 parent
e9eecfa
commit cb1803e
Showing
8 changed files
with
249 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,6 @@ | ||
# SNMP Demo | ||
|
||
The following is a demo of SNMP messages getRequest, getNextRequest, and getBulkRequest using Linux snmptools. | ||
The documentation of this lab is divided into sections: | ||
|
||
Make sure that topology is deployed and SNMP is enabled on all routers before proceeding. | ||
|
||
Notes: | ||
|
||
- You can limit the topology to teh routers and the management workstation only: | ||
|
||
``` | ||
sudo clab deploy -t cvx-dcn.clab.yaml --node-filter spine01,spine02,leaf01,leaf02,leaf03,nms | ||
``` | ||
|
||
- All examples use 'spine01' as target but you can change the address to any other router. | ||
|
||
|
||
The following commands can be executed after entering the 'nms' node or directly from Docker: | ||
|
||
``` | ||
docker exec -it clab-cdc-nms bash | ||
nms:~# snmpwalk -v 2c -c snmpcumulus 172.20.20.11 system | ||
``` | ||
|
||
or | ||
|
||
``` | ||
docker exec clab-cdc-nms snmpwalk -v 2c -c snmpcumulus 172.20.20.11 system | ||
``` | ||
|
||
## getRequest | ||
|
||
``` | ||
snmpget -v 2c -c snmpcumulus 172.20.20.11 sysName.0 | ||
snmpget -v 2c -c snmpcumulus 172.20.20.11 sysUpTime.0 | ||
``` | ||
|
||
Add the option '-On' to print the numeric value of the OID. | ||
|
||
|
||
## getNextRequest | ||
|
||
``` | ||
snmpgetnext -v 2c -c snmpcumulus 172.20.20.11 system | ||
snmpgetnext -v 2c -c snmpcumulus 172.20.20.11 sysDescr.0 | ||
``` | ||
|
||
|
||
## getBulkRequest. | ||
|
||
The last paramter r3 represent the number of number of OIDs requested | ||
|
||
``` | ||
snmpbulkget -v 2c -c snmpcumulus -C n0 -C r3 172.20.20.11 system | ||
``` | ||
|
||
This example explains the use of non-repeaters and max-repititions | ||
|
||
``` | ||
snmpbulkget -v 2c -c snmpcumulus 172.20.20.11 system tcp ifTable -C n2 -C r5 | ||
``` | ||
|
||
Notice what happens when the non-repeaters changes | ||
|
||
``` | ||
snmpbulkget -v 2c -c snmpcumulus 172.20.20.11 system tcp ifTable -C n1 -C r5 | ||
``` | ||
|
||
## snmpwalk | ||
|
||
snmpwalk gets the whole mib tree: | ||
|
||
``` | ||
snmpwalk -v 2c -c snmpcumulus 172.20.20.11 mib | ||
``` | ||
|
||
or part of it: | ||
|
||
``` | ||
snmpwalk -v 2c -c snmpcumulus 172.20.20.11 system | ||
``` | ||
|
||
## snmptable | ||
|
||
To display table: | ||
|
||
``` | ||
snmptable -v 2c -c snmpcumulus -Os -Cw 90 172.20.20.11 ifTable | ||
``` | ||
|
||
The -Cw 90 partitions the table to a maximum width of 90 characters. | ||
- [Monitoring with SNMP Tools](snmp.md) | ||
- [Monitoring with Observium](observium.md) | ||
- [Monitoring with SuzieQ](suzieq.md) |
Oops, something went wrong.