Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and 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 table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Information About VRF-Aware Source Interfaces for Syslog Transactions

VRF-Aware Source Interfaces for Syslog Transactions

The VRF Aware Source Interfaces for Syslog Transactions feature allows logging source-interface setting capability to VRF syslog destinations on a per-VRF basis. Syslog packets can be configured to be sent to hosts with a desired source IP address. This source IP address is typically the interface source address and can be subjected to interface up and down events. The logging source-interface command allows the user to configure the desired source IP address (usually a loopback address) enabling the syslog listeners to filter packets coming from a fixed address.

How to Configure VRF-Aware Source Interfaces for Syslog Transactions

Configuring VRF-Aware Source Interfaces for Syslog Transactions

Perform this task to enable a VRF interface to be configured as the source interface when syslog messages are been exported to a VRF host.

SUMMARY STEPS

1.enable

2.configureterminal

3.loggingsource-interfacetypenumbervrfnumber

4.end

5.showrunninginterfacetypenumbervrfnumber

6.showrunning | includelogging

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configureterminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

loggingsource-interfacetypenumbervrfnumber

Example:

Device(config)# logging source-interface ethernet 0

Configures the syslog packets that contain the IPv4 or IPv6 address of a particular interface and specifies the source interface for syslog messages sent to remote syslog hosts.

Normally, a syslog message sent to remote hosts will use whatever interface is available at the time of the message generation. This command forces the device to send syslog messages to remote hosts only from the specified interface.

Step 4

end

Example:

Device(config)# end

Ends your current configuration session and returns the CLI to privileged EXEC mode.

Example: Source IP Tagging

The loggingsource-interface CLI command can be used to specify a source IP address in all syslog packets sent from the device. The following syslog filter module example demonstrates the use of show CLI commands (showrunning-config and showipinterface in this case) within a filter module to add the source IP address to syslog messages. The script looks for the local namespace variable "source_ip::init" first. If the variable is not defined in the first syslog message processed, the filter will run the show commands and use regular expressions to get the source interface and then its IP address.

Note that in this script the show commands are run only once. If the source interface or its IP address were to be changed, the filter would have to be reinitialized to pick up the new information. (You could have the show commands run on every syslog message, but this practice would not scale very well.)

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

The following command was introduced or modified: loggingsource-interface.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.