[Contents] [Prev] [Next] [Index] [Report an Error]


Configuring SNMP Trap Groups

You can create and name a group of one or more types of SNMP traps and then define which systems receive the group of SNMP traps. The trap group must be configured for SNMP traps to be sent. To create an SNMP trap group, include the trap-group statement at the [edit snmp] hierarchy level:

[edit snmp]
trap-group group-name { 
    categories [ categories ]; 
    destination-port <port-number>;
    targets { 
        address;
    }
    version (all | v1 | v2); 
}

The trap group name can be any string and is embedded in the community name field of the trap. To configure your own trap group port, include the destination-port statement. The default destination port is port 162.

Each trap group you define must have a name and one or more targets, which are the systems that receive the SNMP traps. Specify the targets by IPv4 or IPv6 address, not by hostname.

Specify the types of traps the trap group can receive in the categories statement. For information about which category traps belong to, see Standard SNMP Traps and Juniper Networks Enterprise-Specific SNMP Traps.

A trap group can receive the following categories:

The version statement allows you to specify the SNMP version of the traps sent to targets of the trap group. If you specify v1 only, SNMPv1 traps are sent. If you specify v2 only, SNMPv2 traps are sent. If you specify all, both an SNMPv1 and an SNMPv2 trap are sent for every trap condition. For more information on the version statement, see version.

Example: Configuring SNMP Trap Groups

Set up a trap notification list named urgent-dispatcher for link and startup traps. This list is used to identify the network management hosts (1.2.3.4 and fe80::1:2:3:4) to which traps generated by the local router should be sent. The name specified for a trap group is used as the SNMP community string when the agent sends traps to the listed targets.

[edit]
snmp {
    trap-group "urgent-dispatcher" {
        version v2;
        categories link startup;
        targets {
            1.2.3.4;
            fe80::1:2:3:4;
        }
    }
}

[Contents] [Prev] [Next] [Index] [Report an Error]