Trap and Get in SNMP

What's the difference between trap and get in SNMP ?

Tks
AXISHKAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Trap is a generated event from a system to the defined destination (trap destination). Get is a polling whereby a monitoring system connects and requests status of a particular informational counter..
Trap is more like an alarm event, while get is a status inquiry mechanism.
One is generated as soon as a preconfigured event occurs (trap), the other depends on the monitoring system's polling interval.

Hope this clarifies it.
AXISHKAuthor Commented:
For trap, it also need to point to a server where it will receive the trap message, correct ?

Can I say

trap - push message
get   - receive message


Tks
arnoldCommented:
Yes, for trap you would need a system that will be running the snmptrap receiving tool.

Trap is an event/trigger
Get is more of a statistical status inquiry that is the calculated based on a configuration to indicate an issue.

Lets try it thus way.
You configure a router/switch to send traps on change of port  link status (network connection status)
You have a monitoring tool nagios, zabbix, or cacti to graph bandwidth/usage.

Router loosing wan connection will generate an event/trap status down. When the connection comes backup an up event/trap is sent.
Similarly a switch. Will generate events when ports go up or down.

The monitoring tool will query the counters on the port,
Nagios/zabbix will reflect issues on the systems connected to ports on a switch when they are unreachable. For a wan of router, to determine the status of the link is based on whether an external resource is accessible.


The reason for the above is that push/receive depends on the side

Trap is more of a send event from the system that triggers it and received by a server/collector.

Get is a request from a polling server for information to which the monitored system responds.

I.e.
 A person enters a party, "Hi, I'm Joe" (trap)
A person enters a party, asked, "what's your name?" (Get)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Tks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Management

From novice to tech pro — start learning today.