r/ccna • u/the-packet-thrower Meow 🐈🐈Meow 🐱🐱 Meow Meow🍺🐈🐱Meow A+! • Apr 19 '17
Fun with SNMP
Since we never see any SNMP posts around here lets have a quick look at how to add a router to Prime Infrastructure for the hell of it.
We'll setup SNMPv2 on R1 and R2
R01(config)#snmp-server community meowcatRO RO
R01(config)#snmp-server community meowcatRW RW
R02(config)#snmp-server community meowcatRO RO
R02(config)#snmp-server community meowcatRW RWAnd for fun we'll do SNMPv3 on R3
R03(config)#snmp-server group meowcatGROUP v3 priv
R03(config)#snmp-server user meowcatUSER meowcatGROUP v3 auth sha meowcatAUTH priv aes 128 meowcatPRIV
R03(config)#
*Apr 19 03:12:42.698: Configuring snmpv3 USM user, persisting snmpEngineBoots. Please Wait...We can have the router send SNMP traps by doing the following
R03(config)#snmp-server enable traps
R03(config)#snmp-server host 10.20.2.41 meowcatsWe can also set the router's contact and location like so.
R03(config)#snmp-server location "Calgary, AB"
R03(config)#snmp-server contact "The Packet Thrower"In Prime we enter in the router IP address as well as the SNMP + Login information
Once the router is discovered we can see various information about the router
If we cause a router to go offline we will see Prime declare the router down once it times out.
R03(config-if)#int g2
R03(config-if)#shut
R03(config-if)#
*Apr 19 04:27:08.524: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet2.13 from FULL to DOWN, Neighbor Down: Interface down or detachedAside from monitoring the router, Prime can also push configuration but we'll look at that another day.
1
u/lemaymayguy CCNA R&S, CCNP R&S Apr 19 '17
I love hate prime. It can do so much, but man is it clunky
1
u/SynapticStatic Apr 19 '17
Nice writeup. I'm very curious what kind of things you can push via SNMP. Add local accounts? Change interface config? Very interesting.
1
u/mrush842 Apr 19 '17
For school labs I've used cmd functions from Net-SNMP.
1
u/MyFirstDataCenter May 28 '17
Thanks for this post. Can you answer some question about SNMP for me?
In the first part when you configure snmpv2c /v3 and then add it to Prime, does that do anything w/o the traps configuration?
What does the traps actually do exactly?
Also can you please explain MIB? And how to configure it. Can you give example of something you can only monitor/see with configuring MIB
3
u/Al_Reid Apr 19 '17
Who would ever have thought we would see a post with SNMP and fun in the same title.
Dogs living with cats next.