snmp-server host
snmp-server host{host-ipaddr|ipv6host-ipv6-addr}[version{v1|v2c}[community-string[portport-num]]]no snmp-server host{host-ipaddr|ipv6host-ipv6-addr}[version{v1|v2c}[community-string[portport-num]]]snmp-server host{host-ipaddr|ipv6host-ipv6-addr}[versionv3{auth|noauth|priv}name[portport-num]]no snmp-server host{host-ipaddr|ipv6host-ipv6-addr}[versionv3{auth|noauth|priv}name[portport-num]]The SNMP trap receiver is not configured.
- auth
- Specifies that only authenticated packets with no privacy are allowed to access the specified view. This parameter is available only for SNMPv3 user groups.
- noauth
- Specifies that no authentication and no privacy are required to access the specified view. This parameter is available only for SNMPv3 user groups.
- priv
- Specifies that authentication and privacy are required from the users to access the view. This parameter is available only for SNMPv3 user groups.
Global configuration mode
The device sends all the SNMP traps to the specified hosts and includes the specified community string. Administrators can therefore filter for traps from a device based on IP address or community string. When you add a trap receiver, the software automatically encrypts the community string you associate with the receiver when the string is displayed by the CLI or Web Management interface. The software does not encrypt the string in the SNMP traps sent to the receiver.
The SNMP community string configured can be a read-only string or a read-write string. The string is not used to authenticate access to the trap host but is instead a useful method for filtering traps on the host. For example, if you configure each of your devices that use the trap host to send a different community string, you can easily distinguish among the traps from different devices based on the community strings.
The Multiple SNMP Community Names feature introduced the ability to configure one
default community string (where a community string is not mapped to any SNMP context)
and one community string per SNMP context for a single trap host. One community name
per line is allowed. For protocol-specific MIBS, devices send the trap originating
from specific VRF instance and the corresponding community name mapped to the SNMP
context associated with that VRF is sent in the trap. When the devices send the trap
originating from a default VRF instance, the default community string is sent in the
trap. Using the community string in the trap, administrators can easily distinguish
among the traps originated from different VRF instances. if you enter the
show running-config command it displays multiple
snmp-server host command instances for each host; one community name per line.
Specifying the port allows you to configure several trap receivers in a system. With this parameter, a network management application can coexist in the same system. Devices can be configured to send copies of traps to more than one network management application.
The
no form of the command removes the configured SNMP server host.