SNMP setup for CISCO switches

Hi Experts,

I have some Cisco switches in my network.
Can you show me with some commands how to setup SNMP ?
Lets say errors and link changes should be sent to my SPICEWORKS server and should create an email.
Eprs_AdminSystem ArchitectAsked:
Who is Participating?

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

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.

spicework does not process snmp traps or syslog (ar least not officially documenting it), so you are out of luck.
Well, Spiceworks actually does provide a snmp management and monitoring software (free with Ads). I have not used it, but it's there.


Here are the switch commands for getting snmp and syslog working"


logging trap critical
! (choose how much alerts do you require between 0 - 7. The higher the number the more alerts you will get. On a core switch I would do notifications or warnings. On an access switch I would do critical)

logging origin-id hostname
! (this uses the switch's host name as the source of the alert0

logging facility local6
logging source-interface <"Enter name of the interface to use as the source of the message>
logging <"Enter IP Address of your syslog server">


snmp-server community <Enter your Read-Only community string. Do not use public. This needs to match the setting on the server> RO

snmp-server trap-source < enter an interface as the source of the alert. This helps with recognizing who is sending the alert>

snmp-server location <enter switch's location to help you with the alert>

snmp-server enable traps
snmp-server host < enter ip address of hte snmp server> version 2c <enter same RO community string as before>

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
And, for SNMP V3 follow these steps:
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Nexus cisco switch tooo...
Eprs_AdminSystem ArchitectAuthor Commented:
one more question,

you gave me commands for logging and for snmp
Do I need both to enter to my switches ?

I thought just the snmp commands enough ?
Eprs_AdminSystem ArchitectAuthor Commented:
today evening I start with the snmp and syslog config
Eprs_AdminSystem ArchitectAuthor Commented:
Do I need this command ?

snmp-server trap-source < enter an interface as the source of the alert. This helps with recognizing who is sending the alert>

I don´t understand it !
the logging commands are for a syslog server; if you use that. The snmp commands are for an snmp trap receiver.

The snmp-server trap-source helps with identifying the device sending snmp alarms and messages. On our syslog and snmp receivers we have access-lists that only allow certain IP addresses. This command will help with that. You don't have to use it.
Eprs_AdminSystem ArchitectAuthor Commented:
Thanks a lot
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
Switches / Hubs

From novice to tech pro — start learning today.