fir3net
PPS-Firenetbanner-780.5x190-30-03-17

How do I set up logging on my Cisco Switch ?

To setup logging on your Cisco switch is pretty straight forward, you enable logging, you tell it what to log and then were to send it.

Below is an example,

Switch1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1(config)#logging ?
  Hostname or A.B.C.D  IP address of the logging host
  buffered          Set buffered logging parameters
  console            Set console logging level
  facility             Facility parameter for syslog messages
  file                  Set logging file parameters
  monitor            Set terminal line (monitor) logging level
  on                   Enable logging to all supported destinations
  source-interface Specify interface for source address in logging transactions
  trap                 Set syslog server logging level

Switch1(config)#logging trap <level>
Switch1(config)#logging on
Switch1(config)#logging facility <facility number>
Switch1(config)#logging source-interface fastEthernet 0/23
Switch1(config)#logging <syslog ip>

For further information regarding the logging commands click here.

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001