Configuring Traps

This section provides information for:

The system generates SNMP traps according to operating specifications defined in supported MIBs.

IP Hosts

Traps are sent to IP hosts. The IP hosts are configured in a proprietary trap host table maintained by the router (the server). Each entry in the table contains:

The maximum number of entries in the SNMP trap host table in each virtual router is eight.

Trap Categories

The router supports the following trap categories:

To enable global trap categories, use the snmp-server enable traps command. To enable trap categories for a specific host, use the snmp-server host command.

Trap Severity Levels

The router provides a method of filtering traps according to severity. Table 22 describes the supported severity levels.

Table 22: Trap Severity Descriptions

Severity Number

Severity Name

System Response

0

Emergency

System unusable

1

Alert

Immediate action needed

2

Critical

Critical conditions exist

3

Error

Error conditions exist

4

Warning

Warning conditions exist

5

Notice

Normal but significant conditions exist

6

Informational

Informational messages

7

Debug

Debug messages

You can set up one or more of the following types of trap filters:

Trap filters work as follows:

  1. An event is posted to the SNMP agent.
  2. The system determines whether the corresponding trap category is globally enabled and whether the trap meets the minimum severity level for the trap category. If the per-category filter is not defined for this trap, the global trap severity applies.
    • If the trap does not meet these criteria, the system discards the trap.
    • If the trap does meet these criteria, the trap goes to the trap host processor.
  3. The trap host processor determines whether the trap category is enabled on the host and whether the trap meets the minimum severity level set for the host.
    • If the trap does not meet these criteria, the system discards the trap.
    • If the trap does meet these criteria, the trap is sent to the trap recipient.

To set up global severity filters, use the snmp-server enable traps command. To specify the trap severity level for a particular category, use the snmp-server enable traps per-category-trapFilters command. To set up a severity filter for a specific host, use the snmp-server host command.

snmp-server enable traps

snmp-server enable traps per-category-trapFilters

snmp-server host

snmp-server trap-source

snmp trap ip link-status

snmp trap ip link-status

traps

Specifying an Egress Point for SNMP Traps

You can enable SNMP trap proxy, which allows you to specify a single SNMP agent as the egress point for SNMP traps from all other virtual routers. This feature removes the need to configure a network path from each virtual router to a single trap collector.

You can enable SNMP trap proxy from either SNMP or the CLI. Only one SNMP trap proxy can exist for a physical router.

The SNMP trap proxy does not forward global traps that it receives from other virtual routers. The corresponding SNMP agent handles global traps locally and does not forward them to the SNMP trap proxy.

To configure the SNMP trap proxy:

  1. Access the virtual router context.
  2. Enable or disable the SNMP trap proxy.

snmp-server trap-proxy

Configuring Trap Queues

You can control the SNMP trap egress rate, specify the method of handling a full queue, and specify the maximum number of traps kept in the queue.

snmp-server host

Configuring Trap Notification Logs

SNMP uses the User Datagram Protocol (UDP) to send traps. Because UDP does not guarantee delivery or provide flow control, some traps can be lost in transit to a destination address. The Notification Log MIB provides flow control support for UDP datagrams.

You should set up your management applications to periodically request the recorded traps to ensure that the host is up and the management applications have received all the generated traps.

To identify the location of traps logged in the notification log, the system assigns a consecutive index number to each SNMP trap message transmitted from the E Series router. Clients can use the index to detect missing traps.

To configure trap notification logs:

  1. Configure the notification log.
    host1(config)snmp-server notificationlog log 10.10.4.4 adminStatus includeVarbinds
  2. (Optional) Specify when the notification log ages out.
    host1(config)#snmp-server notificationlog ageout 5
  3. (Optional) Specify the maximum number of entries kept in the notification log.
    host1(config)#snmp-server notificationlog entrylimit 210
  4. (Optional) Enable the snmpTrap log to severity level info.
    host1(config)#log severity info snmpTrap

    Note: Enabling the snmpTrap log provides the same information in the router log as appears in the snmp-server notification log. However, long trap strings may appear truncated.

log severity

snmp-server notificationLog ageOut

snmp-server notificationLog entryLimit

snmp-server notificationLog log

Recovering Lost Traps

SNMP traps can be lost during startup of the E Series router for one of the following reasons:

  1. The SNMP agent begins sending SNMP traps to the host before the line module is initialized.
  2. If the SNMP proxy virtual router is initialized after other virtual routers, traps generated by the other virtual routers and sent to the proxy router are lost.

To recover SNMP traps that are lost during system startup, the SNMP agent pings the configured trap host to identify that there is a communication path between E Series router and host. On successful ping acknowledgment, the lost traps are reconstructed for each virtual router. In the case of scenario 1, the reconstructed traps are sent to the proxy virtual router to be routed to the appropriate hosts. In the case of scenario 2, the traps are sent directly to the appropriate hosts.

You can configure the ping timeout window with the snmp-server host command. The following are guidelines for setting the maximum ping window:

snmp-server host