Rate-Limiting Syslog Traffic
Problem
You wish to rate-limit the syslog traffic to your server.
Solution
Use the logging rate-limit configuration command to limit the number of syslog packets sent to your server:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#logging hostRouter(config)#172.25.1.1logging rate-limitRouter(config)#30 except warningsendRouter#
To rate limit the number of log messages sent to the console port, use the following command:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#logging rate-limitconsole25exceptRouter(config)#warningsendRouter#
This feature became available starting in IOS Version 12.1(3)T.
Discussion
By default, a router that is configured for remote logging will forward all log messages to the syslog server as they are created, regardless of how many there are. The rate-limit command will throttle the number of packets to ensure that router won’t flood the network or syslog server. It is particularly useful to throttle syslog messages when forwarding debug traces or if the network is congested.
Cisco provides the option to throttle log messages sent to the console port, as well. This feature is important, since all messages written to the console port cause CPU interrupts. If a large number of log messages are being sent to the console port, then the router can suffer noticeable service degradation. Being able to rate-limit messages ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access