Configures the agent with the SNMP trap destination information with the community or user-name attached to it.
Config mode
This command is available only to users with admin role.
This command combines a host and community string.
Only valid unicast IP addresses are supported, multicast IP addresses are not supported.
The [no] form of the command removes the corresponding configuration.
The following example configures the SNMP server with the community string using version 2c.
device# configure terminal device(config)# snmp-server host 10.23.17.128 public 162 version 2c device(config)# do show running-config snmp-server snmp-server host 10.23.17.128 public 162 version 2c
The following example removes the configured host and community string.
device# configure terminal device(config)# no snmp-server host 10.23.17.128 publicThe following examples show the error messages.
ngnpb(config)# snmp-server host 255.255.255.255 public Error: not a valid unicast address 255.255.255.255 ngnpb(config)# snmp-server host 224.1.1.1 public Error: not a valid unicast address 224.1.1.1 ngnpb(config)# snmp-server host 1.1.1.1 public 70000 version 2c % Value '70000' not in range <1-65535>.