1

According to Cisco documentation for logging, the logging source-interface command is optional. But if set up it specifies that

syslog packets contain the IPv4 or IPv6 address of a specific interface, regardless of which interface the packet uses to exit the router.

I am confused as to what it is doing and why it is optional. At first I thought it was to indicate what interface to send the logging information out of. However, the above documentation indicates that this is not the case. If it has nothing to do with what exit interface is being used to send the logging packets, then what is its purpose?

  • Is the loopback0 interface the best interface to put in you have an internal/LAN facing syslog server? logging source-interface Loopback0 – JJ Nace Jun 14 at 21:18
  • @JJNace It's a bit unclear what you are saying/asking. Are you trying to answer my question? Are you trying to ask your own unrelated question? If so, you should post your own question. – kojow7 Jun 14 at 22:38
4

The source interface command specifies which interface IP address will be used as the source IP address of the syslog packets. The actual outgoing interface will be determined by the routing table.

  • 3
    A common use case is to set the source-logging interface as the device's Loopback Address. – TDurden May 7 '17 at 5:23
  • why is it useful to set the source-logging interface, assuming the switch has only one route to the syslog server? It seems syslog server can determine the source without the source-logging command enabled? – goofology Oct 31 at 21:06
  • @goofology For a switch with one IP interface, it doesn't matter. But for a router with multiple interfaces, setting the source insures the messages always come form a consistent source. – Ron Trunk Nov 1 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.