The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The Reliable Delivery and Filtering for Syslog feature allows a device to be customized for receipt of syslog messages. This feature provides reliable and secure delivery for syslog messages using Blocks Extensible Exchange Protocol (BEEP). Additionally, it allows multiple sessions to a single logging host, independent of the underlying transport method, and provides a filtering mechanism called a message discriminator.
This module describes the functions of the Reliable Delivery and Filtering for Syslog feature and how to configure them in a network.
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "Feature Information for Reliable Delivery and Filtering for Syslog" section.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
•Prerequisites for Reliable Delivery and Filtering for Syslog
•Restrictions for Reliable Delivery and Filtering for Syslog
•Information About Reliable Delivery and Filtering for Syslog
•How to Configure Reliable Delivery and Filtering for Syslog
•Configuration Examples for Reliable Delivery and Filtering for Syslog
•Feature Information for Reliable Delivery and Filtering for Syslog
•Router level rate limit is set to meet business needs, network traffic requirements, or performance requirements.
•Each BEEP session must have an RFC 3195-compliant syslog-RAW exchange profile.
•A Simple Authentication and Security Layer (SASL) profile specifying "DIGEST-MD5" for provisioning services must be established when a crypto image is used.
•Syslog servers must be compatible with BEEP.
•Syslog server applications must be capable of handling multiple sessions to use the multiple session capability of the Reliable Delivery and Filtering for Syslog feature.
•Only the syslog-RAW, SASL, and Transport Layer Security (TLS) profiles are supported.
•Both ends of a syslog session must use the same transport method.
•A message discriminator must be defined before it can be associated with a specific syslog session.
•A syslog session can be associated with only one message discriminator.
•Message delivery with User Datagram Protocol (UDP) will be faster than with either TCP or BEEP.
To use the Reliable Delivery and Filtering for Syslog feature, you should understand the following concepts:
•Benefits of Reliable Delivery and Filtering for Syslog
BEEP is a generic application protocol framework for connection-oriented, asynchronous interactions. It is intended to provide the features that traditionally have been duplicated in various protocol implementations. BEEP typically runs on top of TCP and allows the exchange of messages. Unlike HTTP and similar protocols, either end of the connection can send a message at any time. BEEP also includes facilities for encryption and authentication and is highly extensible.
BEEP as a transport protocol for syslog messages provides multiple channels. Each channel can be configured for a separate session to the same host. BEEP provides reliable transport. Syslog messages sent over a BEEP connection are guaranteed to be delivered in sequence.
With command-line interface (CLI) commands introduced in the Reliable Delivery and Filtering for Syslog feature, you can configure a new BEEP session to have a maximum of eight channels.
Figure 1 shows a BEEP session with eight channels, allowing eight separate syslog sessions.
Figure 1
BEEP Session with Eight Channels
Channels are identified as 1, 3, 5, 7, 9, 11, 13, and 15. The number of available channels (eight) was designed to correspond to the number of severity levels of classic RFC-3164 syslog messages (0 to 7). Message discriminators can be used such that severity levels are mapped to BEEP channels. An intelligent BEEP syslog server (depending upon the BEEP stack used) could use this mapping to prioritize messages with higher severity (see RFC 3081, section 3.1.4). Unless associated with a message discriminator, all syslog sessions (channels) receive all syslog messages.
A syslog message has a sequence number that allows the host to use the number as an identifier for the message as well as to detect whether there were any gaps in the messages that were received. Syslog messages are numbered consecutively. The reliability of BEEP does not replace the need for sequence numbers, which are required for the following reasons:
•A sequence number provides an easy way to identify a syslog message. Independent of reliability considerations, the sequence number serves as a message identifier.
•A BEEP session may not be in place for the entire time that a device sending syslog messages is up. Sequence numbers provide a way for management applications to assess whether messages were missed between BEEP sessions.
•BEEP is only one of several transports. Unreliable transports are also used and the syslog protocol should not rely on a reliable transport always being provided.
The existing numbering scheme for syslog messages is limited with the extension of syslog to accommodate advanced message discrimination features and multiple hosts. Message discrimination leads to gaps in the sequence numbers, meaning that hosts lose the ability to detect whether they have missed a message. If syslog messages are numbered consecutively on each session to avoid the gaps in sequence numbers, it will not be possible to easily correlate which messages are the same and which ones are different because the sequence number would no longer uniquely identify a message.
To separate identification from sequencing and reliability, the following changes to syslog messages were made:
•The sequence number is retained as an identifier for the message. Messages with a lower number precede messages with a higher number, but they are not guaranteed to be consecutive.
•An additional field is added in the body portion of a syslog message to help ensure sequencing. The contents of this field contain a sequence number for a particular session. The same message transmitted over different sessions may have a different sequence number.
A syslog session is a logical link from the syslog agent on a router to the recipient of a syslog message. For example, a syslog session can be established between a syslog agent and any of the following:
•Router console
•Router logging buffer
•Router monitor
•External syslog server
A syslog session runs over a transport connection between the syslog source and the syslog destination. A transport connection can use any of the following protocols:
•TCP
•UDP (association to one remote address and port)
•BEEP (channel within a BEEP session)
Figure 2 shows a mapping of syslog sessions and transport protocols between a router and a syslog server using an Open Systems Interconnection (OSI) model.
Note Figure 2 is best viewed using Internet Explorer.
Figure 2
Router to Syslog Server Mapping of Syslog Sessions and Transport Protocols
Figure 3 shows multiple syslog sessions from a single syslog agent to different hosts using UDP, TCP and BEEP.
Figure 3
Multiple Syslog Sessions from One Syslog Agent to Multiple Hosts
A syslog session is independent of a transport connection. A Cisco router can support multiple syslog sessions, each running over its own transport connection. Multiple syslog sessions cannot share the same transport connection, but multiple syslog sessions may terminate at the same remote host, each running over its own transport connection. An example is a BEEP session in which multiple channels are used.
Figure 4 shows an end-to-end view of a syslog session. Note the three syslog sessions within a single BEEP session.
Figure 4
End-to-End View of a Syslog Session
The TCP and UDP protocols do not have multiplexed channels but the protocols do allow for using multiple ports to establish multiple syslog sessions to the same syslog host. To enable the UDP and TCP transport methods to have capability similar to BEEP's multiple channel capability, the Reliable Delivery and Filtering for Syslog feature allows multiple syslog sessions to be established via the UDP and TCP transport methods to the same logging host. Multiple syslog sessions going over BEEP sessions is also supported.
A message discriminator is a syslog processor. A message discriminator is associated with a syslog session and binds that session to a transport connection.
Prior to message delivery, the message is subject to the message discriminator with a user-specified list of criteria. After the first filtering criterion results in a message being blocked, the filtering check stops.
Note The sequence of criteria in the CLI does not affect the sequence in which criteria is checked.
•Following are filtering criteria. These criteria are checked in the order listed here:
–Severity level or levels specified
–Facility within the message body that matches a regular expression
–Mnemonic that matches a regular expression
–Part of the body of a message that matches a regular expression
A message discriminator offers the following capabilities:
•Optional rate limiting—Specifying a transmission rate of messages per time interval that is not to be exceeded. If the rate limit is exceeded, messages are either delayed or dropped, at the discretion of the device. The application of a rate limiter means that reliable delivery of syslog messages over that syslog session is no longer guaranteed. The purpose of a rate limiter is to avoid potential "flooding" at recipient syslog servers for applications that do not require guaranteed syslog delivery.
•Correlating—Inspecting candidate event messages and possibly aggregating information across events, creating a new event that contains the aggregated information. Correlating functions include:
–Elimination of duplicate messages by maintaining a message count and waiting a specific time period between sending the first message of a certain type and sending the next message of that type
–Elimination of oscillating messages
–Simple message correlation; for example, if one message is a symptom of a cause reported by another message, one consolidated message is reported
A message discriminator can be associated with a specific destination and transport; that is, the filter can be host dependent. For this reason, a message discriminator is attached to a syslog session, transport, or channel, with possible device support for multiple sessions, transports, or channels, each of which can be attached to a different discriminator.
The establishment of a message discriminator should be separate from the establishment of a syslog session. A message discriminator should refer to the syslog session, transport, or channel to which it should be attached. The reasons for the separation are the following:
•Message discriminators can be managed separately from the connections, and refinements in the capabilities available to set up message discriminators need not affect how syslog sessions are set up and vice versa.
•Multiple connections can be attached to the same message discriminator, allowing for various syslog redundancy topologies.
When an explicit message discriminator is not associated with a syslog session, the generic message discriminator from the router-wide global settings is used. You can create an "empty" message discriminator without specifying attribute values (no rate limit and no filter configured).
The router-wide rate limiting capability in Cisco IOS syslog is preserved in the Reliable Delivery and Filtering for Syslog feature and is referred to as "global rate limiting." If you do not use global rate limiting, all event messages are sent to remote syslog hosts if system resources can support the volume. When global rate limiting is set, it applies to all destinations. The value is set to the rate-limit attribute of the "generic message discriminator" if one has been set. The disadvantage of global rate limiting is that the rate limit of the least performing remote syslog host sets the rate for how fast a router can send out syslog messages.
The Reliable Delivery and Filtering for Syslog feature provides syslog session-based rate limiting to bypass the effects of global rate limiting. This session-based rate limiting is associated with a specific message discriminator and allows you to set the rate acceptance level independently for each syslog session.
Use of global rate limiting is not recommended when session-based rate limiting is in effect. A rate limit in a message discriminator specifies a not-to-exceed rate of syslog messages but does not guarantee that this rate will be reached. A configured global rate limit may cause messages on a session to be dropped even if the rate limit for that session has not been reached. These actions are important to understand if global rate limiting and session-based rate limiting are used concurrently.
•Authentication and encryption capabilities in BEEP provide reliable and secure delivery for syslog messages
•Multiple sessions to a single logging host independent of the underlying transport method
•Session-based message filtering and rate limiting
•Multiple connections can be attached to the same message discriminator, allowing various syslog redundancy topologies
•New CLI command to disable the default syslog count
•New CLI command to help identify relative positions of syslog messages that are dropped due to rate limiting
To configure Reliable Delivery and Filtering for Syslog, perform the following tasks:
•Creating a Message Discriminator
•Associating a Message Discriminator with a Logging Buffer
•Associating a Message Discriminator with a Console Terminal
•Associating a Message Discriminator with Terminal Lines
•Adding and Removing a BEEP Session
Perform this task to create a message discriminator for syslog messages.
1. enable
2. configure terminal
3. logging discriminator discr-name [[facility] [mnemonics] [msg-body] {drops string | includes string}] [severity {drops sev-num | includes sev-num}] [rate-limit msglimit]
4. end
Perform this task to associate a message discriminator with a specific buffer.
1. enable
2. configure terminal
3. logging discriminator discr-name [[facility] [mnemonics] [msg-body] {drops string | includes string}] [severity {drops sev-num | includes sev-num}] [rate-limit msglimit]
4. logging buffered [discriminator discr-name | xml] [buffer-size] [severity-level]
5. end
Perform this task to associate a message discriminator with a console terminal.
1. enable
2. configure terminal
3. logging discriminator discr-name [[facility] [mnemonics] [msg-body] {drops string | includes string}] [severity {drops sev-num | includes sev-num}] [rate-limit msglimit]
4. logging console [discriminator discr-name | xml] [severity-level]
5. end
Perform this task to associate a message discriminator with terminal lines and have messages display at a monitor.
1. enable
2. configure terminal
3. logging discriminator discr-name [[facility] [mnemonics] [msg-body] {drops string | includes string}] [severity {drops sev-num | includes sev-num}] [rate-limit msglimit]
4. logging monitor [discriminator discr-name | xml] [severity-level]
5. end
Perform this task to enable logging of debug, log, or syslog messages.
1. enable
2. configure terminal
3. logging message-counter {debug | log | syslog}
4. end
Perform this task to add and remove a BEEP session.
1. enable
2. configure terminal
3. logging host {{ip-address | hostname} [vrf vrf-name] | ipv6 {ipv6-address | hostname}} [discriminator discr-name | [[filtered [stream stream-id] | xml]] [transport {[beep [audit] [channel chnl-number] [sasl profile-name] [tls cipher [cipher-num] trustpoint trustpt-name]]] | tcp [audit] | udp} [port port-num]] [sequence-num-session] [session-id {hostname | ipv4 | ipv6 | string custom-string}]
4. end
This section provides the following configuration example:
•Configuring Transport and Logging: Example
Router(config)# show running-config | include logging
logging buffered xml
logging
logging
logging host 209.165.201.1 transport udp port 601
logging synchronous
Router(config)# logging host 209.165.201.1 transport beep port 600 channel 3
Router(config)# logging host 209.165.201.1 transport tcp port 602
Router(config)# show running-config | include logging
logging buffered xml
logging
logging
logging host 209.165.201.1 transport udp port 601
logging host 209.165.201.1 transport beep port 600 channel 3
logging host 209.165.201.1 transport tcp port 602
logging synchronous
Router(config)#
The following sections provide references related to the Reliable Delivery and Filtering for Syslog feature.
|
|
---|---|
Syslog logging |
|
Network Management commands (including logging commands): complete command syntax, defaults, command mode, command history, usage guidelines, and examples |
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
|
|
---|---|
RFC 3195 |
Reliable Delivery for Syslog |
RFC 3081, section 3.1.4 |
Mapping the BEEP Core onto TCP, "Use of Flow Control" |
RFC 3164 |
The BSD Syslog Protocol |
Table 1 lists the release history for this feature.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS, Catalyst OS, and Cisco IOS XE software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.