Configuring SNMP
Procedure
Example 1
This example creates the following configuration:
- Enables SNMP on the out-of-band management interface (VRFmgmt).
- Sets the contact, location, and description for the switch to:JaniceM,Building2,LabSwitch.
- Sets the community string toLab8899X.
switch(config)#snmp-server vrf mgmtswitch(config)#snmp-server system-contact JaniceMswitch(config)#snmp-server system-location Building2switch(config)#snmp-server system-description LabSwitchswitch(config)#snmp-server community Lab8899XExample 2
This example creates the following configuration:
- Creates an SNMPv3 user namedAdminusingshaauthentication with the plaintext passwordmypasswordand usingdessecurity with the plaintext passwordmyprivpass.
- Associates the SNMPv3 user
Admin
with a context namednewContext
.
switch(config)#snmpv3 user Admin auth sha auth-pass plaintext mypassword priv des priv-pass plaintext myprivpassswitch(config)#snmpv3 user Admin context newContext