Difference between revisions of "SNMP Cisco IOS"

From Teknologisk videncenter
Jump to: navigation, search
m (Links)
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Cisco]][[Category:CCNP]][[Category:IOS]][[Category:Network]]
+
[[Category:Cisco]][[Category:CCNP]][[Category:IOS]][[Category:Network Management]]
 
==Configuration==
 
==Configuration==
 
*Allows all NMS's to manage the device
 
*Allows all NMS's to manage the device
*Supports both version 1 and 2c
+
====SNMPv1+v2====
<br>
 
 
*Read-only access
 
*Read-only access
 
<pre>snmp-server community ciscodisco RO</pre>
 
<pre>snmp-server community ciscodisco RO</pre>
Line 13: Line 12:
 
access-list 2 permit 1.1.1.1</pre>
 
access-list 2 permit 1.1.1.1</pre>
  
*SNMPv3
+
====SNMPv3====
 +
* Choose one of the security models
 
<pre>snmp-server group snmp-group v3 priv
 
<pre>snmp-server group snmp-group v3 priv
!
+
or
snmp-server user snmp-user snmp-group v3 auth sha ciscodisco priv des ciscodisco</pre>
+
snmp-server group snmp-group v3 auth
 +
or
 +
snmp-server group snmp-group v3 noauth
 +
</pre>
 +
* Create a user and associate it with a group, specify the passwords and encryption
 +
<pre>snmp-server user snmp-user snmp-group v3 auth sha ciscodisco priv des56 ciscodisco</pre>
 +
*Syntax
 +
<pre>snmp-server user username groupname [remote ip-address [udp-port port]] {v1 | v2c | v3 [encrypted] [auth {md5 | sha} auth-password]} [access access-list]
 +
| [priv [des | 3des |aes] priv-password [access access-list] ]</pre>
  
 
==SNMP traps==
 
==SNMP traps==
 +
* Enable certain traps
 +
<pre>snmp-server enable traps config-copy
 +
snmp-server enable traps bgp
 +
...</pre>
 +
* Enable all traps
 +
<pre>snmp-server enable traps</pre>
 +
 +
*Control which traps are sent to who
 +
<pre>snmp-server host 1.1.1.1 ciscodisco bgp
 +
snmp-server host 2.2.2.2 ciscodisco config-copy</pre>
 +
 
===SNMPv1 traps===
 
===SNMPv1 traps===
*Sends traps to the NMS 1.1.1.1
 
 
<pre>snmp-server host 1.1.1.1 version 1 ciscodisco
 
<pre>snmp-server host 1.1.1.1 version 1 ciscodisco
snmp-server enable traps</pre>
+
</pre>
 
or
 
or
<pre>snmp-server host 1.1.1.1 ciscodisco
+
<pre>snmp-server host 1.1.1.1 ciscodisco</pre>
snmp-server enable traps</pre>
 
  
 
===SNMPv2 traps===
 
===SNMPv2 traps===
<pre>snmp-server host 1.1.1.1 version 2c ciscodisco
+
<pre>snmp-server host 1.1.1.1 version 2c ciscodisco</pre>
snmp-server enable traps</pre>
 
  
 
===SNMPv3 traps===
 
===SNMPv3 traps===
<pre>snmp-server host 1.1.1.1 version 3 priv snmp-user
+
<pre>snmp-server host 1.1.1.1 version 3 priv snmp-user</pre>
snmp-server enable traps</pre>
+
 
 +
==SNMP Informs==
 +
 
 +
<pre>snmp-server enable traps
 +
!
 +
snmp-server host 1.1.1.1 informs version 2c ciscodisco</pre>
 +
=Cisco MIB's=
 +
Get from [http://tools.cisco.com/ITDIT/MIBS/servlet/index Cisco MIB Locater]
 +
=Links=
 +
*[http://tools.cisco.com/ITDIT/MIBS/servlet/index Cisco MIB Locater]

Latest revision as of 12:57, 1 April 2010

Configuration

  • Allows all NMS's to manage the device

SNMPv1+v2

  • Read-only access
snmp-server community ciscodisco RO
  • Read-write access
snmp-server community ciscodisco RW
  • Only allow the NMS 1.1.1.1
snmp-server community ciscodisco RO 2
access-list 2 permit 1.1.1.1

SNMPv3

  • Choose one of the security models
snmp-server group snmp-group v3 priv
or
snmp-server group snmp-group v3 auth
or
snmp-server group snmp-group v3 noauth
  • Create a user and associate it with a group, specify the passwords and encryption
snmp-server user snmp-user snmp-group v3 auth sha ciscodisco priv des56 ciscodisco
  • Syntax
snmp-server user username groupname [remote ip-address [udp-port port]] {v1 | v2c | v3 [encrypted] [auth {md5 | sha} auth-password]} [access access-list]
 | [priv [des | 3des |aes] priv-password [access access-list] ]

SNMP traps

  • Enable certain traps
snmp-server enable traps config-copy
snmp-server enable traps bgp
...
  • Enable all traps
snmp-server enable traps
  • Control which traps are sent to who
snmp-server host 1.1.1.1 ciscodisco bgp
snmp-server host 2.2.2.2 ciscodisco config-copy

SNMPv1 traps

snmp-server host 1.1.1.1 version 1 ciscodisco

or

snmp-server host 1.1.1.1 ciscodisco

SNMPv2 traps

snmp-server host 1.1.1.1 version 2c ciscodisco

SNMPv3 traps

snmp-server host 1.1.1.1 version 3 priv snmp-user

SNMP Informs

snmp-server enable traps
!
snmp-server host 1.1.1.1 informs version 2c ciscodisco

Cisco MIB's

Get from Cisco MIB Locater

Links