Configures the SNMP trap server host attributes.
Specifies a VRF though which to communicate with the SNMP host. By default, all management services are enabled on the management VRF ("mgmt-vrf") and the default VRF ("default-vrf").
Global configuration mode
This command sets the trap destination IP addresses and SNMP version, associates a community string with a trap host community string (for v1 and v2c), and specifies the UDP destination port where SNMP traps will be received.
To configure SNMP trap hosts associated with community strings, you must create the community string using the snmp-server community command before configuring the host.
The host supports six communities and their associated trap recipients and trap recipient severity levels. The default value for the trap recipient of each community is 0.0.0.0. The length of the community string should be between 2 and 64 characters.
The no snmp-server host host community-stringversion 2c command brings version 2c down to version 1.
The no snmp-server host host community-string command removes the SNMP server host from the device configuration altogether.
The no form of the command can be used to remove the following configuration for a given host: version, udp-port, severity-level, and use-vrf.
The following example creates an entry for trap host 1050:0:0:0:5:600:300c:326b associated with community “public.” The trap host receives traps from the configured device.
device(config)# snmp-server host 1050:0:0:0:5:600:300c:326b public severity-level Info
The following example creates an entry for trap host brcd.extremenetworks.com associated with community “public.” The trap host receives traps from the configured device.
device(config)# snmp-server host brcd1.extremenetworks.com public severity-level info
The following example associates “commaccess” as a read-only community and set 10.32.147.6 as a trap recipient with SNMP version 2c on target port 162.
device(config)# snmp-server host 10.32.147.6 commaccess version 2c udp-port 162
The following example creates a trap host (10.23.23.45) associated with the community “public”, which will receive all traps with the severity level of Info.
device(config)# snmp-server host 10.23.23.45 public severity-level info
The following example resets the severity level to None.
device(config)# snmp-server host 10.23.23.45 public severity-level None
The following example specifies a VRF to communicate with the host.
device(config)# snmp-server host 10.24.61.10 public use-vrf myvrfThe following example removes the SNMP host.
device(config)# no snmp-server host 10.24.61.10 publicThe following example removes the udp-port configuration and resets the default to 162.
device(config)# no snmp-server host 10.24.61.10 public udp-port