logging syslog-server

Configures a switch to forward system messages to the specified syslog servers.

Syntax

logging syslog-server ip_address [ use-vrf vrf-name ]
no logging syslog-server ip_address [ use-vrf vrf-name ]

Parameters

ip_address
Specifies the IP address of the syslog server in IPv4 or IPv6 format.
use-vrf vrf-name
Specifies a VRF through which to communicate with the server. See the Usage Guidelines.

Modes

Global configuration mode

Usage Guidelines

Use this command to configure a switch to forward all error log entries to the specified servers. You can configure up to four syslog servers; this includes all VRFs. You must execute the command for each server.

The certutil import syslogca command is required for a secure syslog to be fully functional.

After specifying the ip_address and vrf-name, the secure sub-command can be used to specify the secure default port (6514) or specify a secure non-default syslog server port. These sub-commands are only available after specifying the ip_address and vrf-name parameters.

Use the no logging syslog-server command with the optional use-vrf keyword to remove the specified IP address and VRF.

By default, all management services are enabled on the management VRF ("mgmt-vrf") and the default VRF ("default-vrf").

Examples

To configure a server IPv4 address to which system messages are sent on a user-specified VRF:

device# configure terminal
device(config)# logging syslog-server 192.168.163.233 use-vrf myvrf
device(config-syslog-server-192.168.163.233/myvrf)#
To configure a secure server with a non-default port nunber:
device(config)# logging syslog-server 1.1.1.1 use-vrf mgmt-vrf
device(config-syslog-server-1.1.1.1/mgmt-vrf)# secure port 6502
device(config-syslog-server-1.1.1.1/mgmt-vrf)# 

To remove a configured syslog server:

device# configure terminal
device(config)# no logging syslog-server 192.168.163.233