12-27-2021 02:41 AM - edited 12-27-2021 02:42 AM
Hi,
Please, what is the difference between these 2 commandes under the global config mode:
#logging trap critical
#logging snmp-trap critical
when can I use one than the other ?
12-27-2021 05:26 AM
- The logging trap critical command is a bit confusing and does not related to the snmp configuration, it denotes from which event-levels on , syslog messages should be send to the syslog-server (in this case that will be from critical events and everything else down the ladder), they would have better called that logging syslog-catch critical (e.g.) The logging snmp-trap critical in contrast will send critical snmp traps only (which are not related to syslog messages and also depend on the snmp-MIBS that the particular device supports). To enable all snmp trap levels you must do that explicitly as in :
logging trap notifications
logging snmp-trap emergencies
logging snmp-trap alerts
logging snmp-trap critical
logging snmp-trap errors
logging snmp-trap warnings
logging snmp-trap notifications
M.
12-27-2021 07:44 AM
Just to add a bit to the information @Mark Elsen has already provided, syslog and SNMP are two completely different protocols, although information provided by them might overlap.
Syslog, as @Mark Elsen also describes, might go to a syslog (external) server, but in might also (and/or) go the the device's internal syslog.
SNMP traps (or the later variant, informs) always (I believe) go to some form of SNMP management server, which might also also use SNMP to "poll" the device and/or make changes to the device (via SNMP). This is unlike syslog which just "logs" system information.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide