Configure SNMP settings
Configure Simple Network Management Protocol (SNMP) to define or modify the SNMP settings, and specify the security level for SNMP communications.
Procedure
Example
Enable the generation of SNMP traps. Configure the contact information for the system. Configure the SNMP and IP sender flag to the same value. Configure hosts to receive SNMP notifications:
Note
Exception: configuring the SNMP and IP sender flag to the same value only applies to VSP 8600 Series.
Switch:1>enable Switch:1#configure terminal Switch:1(config)#snmp-server authentication-trap enable Switch:1(config)#snmp-server contact xxxx@company.com Switch:1(config)#snmp-server force-iphdr-sender enable Switch:1(config)#snmp-server host 192.0.2.16 port 1 v1 SNMPv1 filter SNMPfilterv1
Variable Definitions
The following table defines parameters for the snmp-server command.
Variable |
Value |
---|---|
authentication-trap {enable} |
Enables generation of SNMP server authentication traps. |
contact WORD<0-255> |
Changes the sysContact information for the switch. WORD<0-255> is an ASCII string from 0–255 characters (for example, a phone extension or email address). |
host WORD<1-256> [port <1-65535>] {v1 WORD<1-32>|v2c WORD<1-32> [inform] [timeout <1-2147483647>][retries <0-255>][mms <0-2147483647>]]|v3 {noAuthPriv|authNoPriv|authPriv} WORD<1-32> [inform [timeout <1-2147483647>][retries <0-255>]]} [filter WORD<1-32>] |
Configures hosts to receive SNMP notifications.
|
location WORD<0-255> |
Configures the sysLocation information for the system. <WORD 0-255> is an ASCII string from 0–255 characters. |
login-success-trap {enable} |
Enables generation of SNMP server login-success traps. |
name WORD<0-255> |
Configures the sysName information for the system. <WORD 0-255> is an ASCII string from 0–255 characters. |
notify-filter WORD<1-32> WORD<1-32> |
Creates a new entry in the notify filter table. The first WORD<1-32> specifies the filter profile name, and the second WORD<1-32> specifies the subtree object identifier (OID). |
sender-ip {A.B.C.D}
{A.B.C.D}
Note:
Exception: only supported on VSP 8600 Series. |
The first {A.B.C.D} configures the SNMP trap receiver and source IP addresses. Specify the IP address of the destination SNMP server that receives the SNMP trap notification in the first IP address. The second {A.B.C.D} specifies the source IP address of the SNMP trap notification packet that is transmitted in the second IP address. If you set this to 0.0.0.0, the system uses the IP address of the local interface that is closest (from an IP routing table perspective) to the destination SNMP server. |