Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference, Release 2.x
Configuring SNMP

Table Of Contents

Configuring SNMP

SNMP Security

Adding or Deleting Communities

Assigning SNMP Switch Contact Information

Configuring SNMP Notifications

Enabling SNMP Notifications

Displaying SNMP Security Information


Configuring SNMP


This chapter includes the following sections:

SNMP Security

Adding or Deleting Communities

Assigning SNMP Switch Contact Information

Configuring SNMP Notifications

Displaying SNMP Security Information

SNMP Security

SNMP is an application layer protocol that facilitates the exchange of management information between network devices. In the Cisco MDS 9020 Fabric Switch, two SNMP versions are available: SNMPv1 and SNMPv2c. (See Figure 10-1.)

Figure 10-1 SNMP Security

Adding or Deleting Communities

You can configure read-only or read-write access for SNMP users. To create an SNMPv1 or SNMPv2c community, perform this task:

 
Command
Purpose

Step 1 

switch# config t

Enters configuration mode.

Step 2 

switch(config)# snmp-server community snmp_Community ro

Adds read-only access for the specified SNMP community.

switch(config)# snmp-server community snmp_Community rw

Adds read-write access for the specified SNMP community.

switch(config)# no snmp-server community snmp_Community

Deletes access for the specified SNMP community (default).

Assigning SNMP Switch Contact Information

The switch contact information is limited to 32 characters (without spaces).

Use the snmp-server command to set the contact information and the switch location. Use the no form of the command to remove the system contact information.

To configure contact information, perform this task:

 
Command
Purpose

Step 1 

switch# config t

Enters configuration mode.

Step 2 

switch(config)# snmp-server contact NewUser

Assigns the contact name for the switch.

switch(config)# no snmp-server contact NewUser

Deletes the contact name for the switch.

Step 3 

switch(config)# snmp-server location SanJose

Assigns the switch location.

switch(config)# no snmp-server location SanJose

Deletes the switch location.

Configuring SNMP Notifications

You can configure the Cisco MDS 9020 Fabric Switch using the CLI to send notifications to SNMP managers when changes occur that affect the switch configuration or status. You can send these notifications as traps.

To configure notifications, perform this task:

 
Command
Purpose

Step 1 

switch# config t

Enters configuration mode.

Step 2 

switch(config)# snmp-server host 172.16.187.101 traps version 2c private udp-port 1163

Configures the specified host to receive SNMP version 2c trap notifications on a private port number 1163.

switch(config)# no snmp-server host 172.18.2.247 version 2c public udp-port 2162

Prevents the specified host to receive SNMP version 2c inform notifications on a private port number 2162.

switch(config)# snmp-server host 10.1.1.1 fsdf

Configures the specified host to receive SNMP inform notifications with the default noauth option on the default UDP port (162).

Enabling SNMP Notifications

Notifications (traps) are system alerts that the switch generates when selected changes occur that affect the switch configuration or status. By default, no notification is defined or issued.

To enable notifications, perform this task:

 
Command
Purpose

Step 1 

switch# config t

Enters configuration mode.

Step 2 

switch(config)# snmp-server enable traps

Enables SNMP traps.

switch(config)# no snmp-server enable traps

Disables SNMP traps.

Displaying SNMP Security Information

Use the show snmp commands to display configured SNMP information. (See Example 10-1 to 10-3.)

Example 10-1 Displays SNMP User Details

switch# show snmp user
Host                            Port Version  Type   SecName
____                            ____ _______  _____  ______
10.0.0.254                      162  2c       trap   public

Example 10-2 Displays SNMP Community Information

switch# show snmp community 
Community Group/Access
--------- ------------
public    network-operator

Example 10-3 Displays SNMP Host Information

switch# show snmp host
Host                            Port Version  Level  Type   SecName
____                            ____ _______  ______ ____  ______
172.16.126.34                   2162 v2c      noauth trap   public
172.16.75.106                   2162 v2c      noauth trap   public
...
172.31.58.97                    2162 v2c      auth   trap   public
...

The show snmp command displays counter information for SNMP contact, location, and packet settings. This command provides information that is used entirely by the Cisco MDS 9000 Family Fabric Manager (refer to the Cisco MDS 9000 Family Fabric Manager Configuration Guide). (See Example 10-4.)

Example 10-4 Displays SNMP

switch# show snmp
sys contact: <sysContact undefined>

sys location: <sysLocation undefined>

Community  Group/Access
---------  ------------
public     network-operator