Configuring SNMP
Procedure
Example 1
This example creates the following configuration:
- Enables SNMP on the out-of-band management interface (VRF mgmt).
- Sets the contact, location, and description for the switch to: JaniceM, Building2, LabSwitch.
- Sets the community string to Lab8899X.
switch(config)# snmp-server vrf mgmt switch(config)# snmp-server system-contact JaniceM switch(config)# snmp-server system-location Building2 switch(config)# snmp-server system-description LabSwitch switch(config)# snmp-server community Lab8899XExample 2
This example creates the following configuration:
- Creates an SNMPv3 user named Admin using sha authentication with the plaintext password mypassword and using des security with the plaintext password myprivpass.
- 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 myprivpass switch(config)# snmpv3 user Admin context newContext