Setting SNMP Queue Size
Problem
You want to increase the size of a router’s SNMP trap queue.
Solution
The following command increases the size of a router’s SNMP trap queue:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server queue-length
Router(config)#
25
end
Router#
To increase the size of the router’s SNMP inform queue, use the following configuration command:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server inform pending 40
Router(config)#end
Router#
Discussion
By default, the router can hold 10 trap messages in its queue. The queue holds traps until the router can forward them to the NMS. The queue fills when the router generates traps faster than it can forward them. If it generates additional traps when the queue is already full, these new trap messages are dropped. The router has only one SNMP message queue for all trap recipients.
Regardless of the network’s capacity, the router will never send SNMP messages faster than four traps per second. This rate is hardcoded into the router and is not configurable. So if you have several NMS systems, or if your router creates a particularly large number of traps, you might want to increase the size of this queue to help prevent inadvertent discarding of traps.
The snmp-server queue-length command will accept any integer between 1 and 1,000, representing the maximum number of packets that can be held at a time.
To show ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.