< Home

snmp-agent target-host inform

Function

The snmp-agent target-host inform command sets the target host for receiving Inform messages.

The undo snmp-agent target-host command cancels the target host set to receive Inform messages.

By default, the target host for receiving Inform messages is not set.

Format

snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname { security-name | cipher security-name } v2c [ notify-filter-profile profile-name | ext-vb ] *

snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname security-name v3 [ authentication | privacy ] [ notify-filter-profile profile-name | ext-vb ] *

undo snmp-agent target-host ip-address securityname { security-name | cipher security-name } [ vpn-instance vpn-instance-name ]

undo snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname { security-name | cipher security-name }

Parameters

Parameter Description Value

address

Specifies the IP address of a specified target host.

-

udp-domain ip-address

Specifies the IP address of a specified target host, with the transmission domain being based on UDP.

It is dotted decimal notation.

udp-port port-number

Specifies the UDP port of the specified target host for receiving Inform messages.

The value is an integer ranging from 0 to 65535. The default value is 162.

source interface-type interface-number

Specifies the source interface of the device for sending Inform messages.

-

vpn-instance vpn-instance-name

Specifies VPN instance to which the target host belongs.

The value must be an existing VPN instance name.

public-net

Indicates the target host is on the public network.

-

params

Indicates information about the target host that generates SNMP notifications.

-

securityname security-name

Specifies the user security name displayed on the NMS.

For SNMPv3, securityname must be configured as the user name. securityname configured on the host needs to be the same as that configured on the NMS, or the NMS cannot receive the trap messages sent from the host. Ensure that the security-name value is the same as the created user name; otherwise, the NMS cannot access the device.

For SNMPv1 and SNMPv2c, the NMS can receive trap messages from all hosts without having securityname configured. securityname is used to distinguish multiple hosts that generate trap messages.

The value is a string of 1 to 32 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

cipher security-name

Indicates the unencrypted or encrypted string of security name.

The value is a string of 1 to 32 case-sensitive characters or a string of 32, 48, 56, or 68 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • When the community name is a string of 1 to 32 characters, the string is processed as plain text by default and will be encrypted.
  • When the community name is a string of 32 48, 56, or 68 characters, the string is processed as cipher text by default, and the system will determine whether the string can be parsed.

v2c

Indicates the SNMP version is SNMPv2c.

-

v3

Indicates the SNMP version is SNMPv3.

-

authentication | privacy

Specifies the security mode.
  • authentication: authenticates SNMP messages without encryption.
  • privacy: authenticates and encrypts SNMP messages.

This parameter takes effect only in SNMPv3.

-

notify-filter-profile profile-name

Specifies the filtering view name.

The filtering view must exists.

ext-vb

Indicates that traps sent to a target host carry extended bound variables.

If a Huawei data communication device extends the trap objects defined in the public MIB, you can configure this parameter to determine whether traps sent to the NMS carry extended bound variables.

  • If this parameter is not configured, the traps sent from the Huawei data communication device do not carry extended bound variables.

    If you are using a third-party NMS tool, you are not advised to configure this parameter, which ensures that the NMS tool can receive alarms sent from the Huawei device.

    By default, a trap sent from a Huawei data communication device does not carry extended bound variables.

  • If this parameter is configured, the traps sent from the Huawei data communication device carry extended bound variables.

    If you are using a Huawei NMS tool, you are advised to configure this parameter, which allows you to view more information carried in a trap.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After sending an Inform message, the device waits for an Inform ACK message from the NMS and will retransmit the same Inform message only when no Inform ACK message is received from the NMS within the specified period. If the SNMP agent does not receive the inform ACK message from the NMS during the retransmission period, the SNMP agent deletes this inform message from the trap queue. This ensures that the NMS can receive the SNMP Inform messages to the maximum extent.

If there are multiple target hosts, you need to run the snmp-agent target-host inform command on each target host. If the snmp-agent target-host inform command is executed for multiple times on the target host, only the last successful operation takes effect.

The rules for selecting the target host are as follows:
  • If the public-net parameter is specified, the system accesses the target host on the public network.
  • If the vpn-instance vpn-instance-name parameter is specified, the system accesses the target host in the specified VPN instance.
  • If both the public-net and vpn-instance vpn-instance-name parameters are not specified:
    1. If the source interface-type interface-number parameter is specified and a VPN instance is bound to the specified interface, the system accesses the target host in the VPN instance. If no VPN instance is bound to the specified interface, the system accesses the target host on the public network.
    2. If the snmp-agent trap source command is run to configure a source interface for sending trap packets and a VPN instance is bound to the interface, the system accesses the target host in the VPN instance. If no VPN instance is bound to the interface, the system accesses the target host on the public network.
    3. If the set net-manager vpn-instance command is run to configure a network management VPN instance, the system accesses the target host in this VPN instance.
    4. If none of the preceding conditions is met, the system accesses the target host on the public network.

Configuration Impact

The transmission of Inform messages, however, consumes more resources than that of traps.

Precautions

The snmp-agent notify-filter-profile command is used to create or update the trap filtering information. The NMS filters trap messages according to the profile and sends only the eligible trap messages to the target host. If notify-filter-profile is not configured, all trap messages are sent to the target host.

Ensure that the security level of a trap host is not higher than that of the user specified by securityname and not lower than that of the user group. Otherwise, the trap host cannot send trap messages properly. The user security level can be (in descending order):
  • Level 1: privacy (authentication and encryption)
  • Level 2: authentication (without encryption)
  • Level 3: noauthentication (no authentication or encryption)

When SNMPv3 is used to send Inform messages, run the snmp-agent remote-engineid usm-user v3 command to configure a remote SNMPv3 user whose remote engine ID must be the same as the engine ID of the destination host.

The securityname configuration of an SNMPv2c alarm host is displayed in ciphertext, whereas the securityname configuration of an SNMPv3 alarm host is displayed in simple text. For SNMPv2c, when a user with a level lower than the level configured using this command queries the securityname configured using the display this command, the securityname is displayed as asterisks (******).

Example

# Configure alarms to be sent in inform mode, set the security name of the host to 123 and protocol version to SNMPv2c, and send alarms to the NMS host with the IP address of 192.168.10.1.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable
[HUAWEI] snmp-agent target-host inform address udp-domain 192.168.10.1 params securityname 123 v2c
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >