воскресенье, 18 мая 2014 г.

Log Commands


С версии IOS 12.2(25)S Cisco добавили функционал позволяющий вести журнал ВСЕХ изменений вносимых в running config
Режим конфигурации archive добавлен в IOS для реализации механизма сохранения конфигурационных файлов (формирования архива конфигураций). Также в нем реализован механизм ведения журнала всех изменений конфигурации. 

Наcтройка
 
(config)#archive
(config-archive)#log config
(config-archive-log-cfg)#logging enable
(config-archive-log-cfg)#logging size 500 
(config-archive-log-cfg)#notify syslog
(config-archive-log-cfg)#hidekeys
(config-archive-log-cfg)#exit
(config-archive)#exit
(config)#exit


Результат можно смотреть в разных вариантах с разной целью

R1#show history
  conf t
  show logging
  show logging his
  show logging count
  show logging xml
  show login
  conf t
  show history


R1#show history all

*Mar  1 00:00:08.275: %SNMP-5-COLDSTART: SNMP agent on host R1 is undergoing a cold start
*Mar  1 00:00:08.499: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
*Mar  1 00:00:08.503: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
*Mar  1 00:00:09.723: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar  1 00:00:09.727: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively downCMD: conf t' 00:00:50 UTC Fri Mar 1 2002
CMD: 'archive ' 00:01:03 UTC Fri Mar 1 2002
CMD: 'log config' 00:01:08 UTC Fri Mar 1 2002
CMD: 'logg' 00:01:11 UTC Fri Mar 1 2002
CMD: 'logging ' 00:01:13 UTC Fri Mar 1 2002
CMD: 'logging enable' 00:01:17 UTC Fri Mar 1 2002
CMD: 'logging size ' 00:01:22 UTC Fri Mar 1 2002
CMD: 'logging size 200' 00:01:27 UTC Fri Mar 1 2002
CMD: 'nnoti' 00:01:33 UTC Fri Mar 1 2002
CMD: 'noti' 00:01:35 UTC Fri Mar 1 2002
CMD: 'notify syslog' 00:01:39 UTC Fri Mar 1 2002

*Mar  1 00:01:39.087: %PARSER-5-CFGLOG_LOGGEDCMD: User:console  logged command:notify syslog CMD: 'hide' 00:0:42 UTC Fri Mar 1 2002
CMD: 'hidekeys ' 00:01:50 UTC Fri Mar 1 2002

*Mar  1 00:01:50.043: %PARSER-5-CFGLOG_LOGGEDCMD: User:console  logged command:hidekeys CMD: 'exit' 00:01:52 TC Fri Mar 1 2002

*Mar  1 00:01:52.747: %PARSER-5-CFGLOG_LOGGEDCMD: User:console  logged command:exit CMD: 'exit' 00:01:53 UTC ri Mar 1 2002

*Mar  1 00:01:53.575: %PARSER-5-CFGLOG_LOGGEDCMD: User:console  logged command:exit CMD: 'exit' 00:01:54 UTC ri Mar 1 2002

*Mar  1 00:01:54.407: %SYS-5-CONFIG_I: Configured from console by consoleCMD: 'sgow log' 00:02:02 UTC Fri Mar1 2002
CMD: 'sgow log' 00:02:03 UTC Fri Mar 1 2002
CMD: 'show log' 00:02:07 UTC Fri Mar 1 2002
CMD: 'show logging' 00:02:14 UTC Fri Mar 1 2002
CMD: 'show logging ' 00:02:47 UTC Fri Mar 1 2002
CMD: 'show logging his' 00:02:51 UTC Fri Mar 1 2002
CMD: 'show logging count' 00:03:13 UTC Fri Mar 1 2002
CMD: 'show logging xml' 00:03:18 UTC Fri Mar 1 2002
CMD: 'show lo' 00:03:29 UTC Fri Mar 1 2002
CMD: 'show log' 00:03:31 UTC Fri Mar 1 2002
CMD: 'show log' 00:03:32 UTC Fri Mar 1 2002
CMD: 'show login' 00:03:35 UTC Fri Mar 1 2002
CMD: 'kron ' 00:04:50 UTC Fri Mar 1 2002
CMD: 'wr' 00:12:00 UTC Fri Mar 1 2002
CMD: 'wrr-queue ' 00:12:01 UTC Fri Mar 1 2002
CMD: 'show his' 00:15:23 UTC Fri Mar 1 2002
CMD: 'show hist' 00:15:24 UTC Fri Mar 1 2002

*Mar  1 00:15:26.903: %SYS-5-CONFIG_I: Configured from console by consoleCMD: 'show his' 00:15:28 UTC Fri Mar1 2002
CMD: 'show history ' 00:15:30 UTC Fri Mar 1 2002
CMD: 'show history ' 00:15:32 UTC Fri Mar 1 2002
CMD: 'show history all' 00:15:39 UTC Fri Mar 1 2002

R1#


Комментариев нет:

Отправить комментарий