Uploaded by kahasi wejerat

Configure syslog

advertisement
Configure syslog & NTP (Network Time Protocol)
 Syslog is used to record and save allthe log files incurred in router and switches.
 Network Time Protocol (NTP) is a protocol that allows the synchronization of system clocks
(from desktops to servers).
 Used to synchronization clock time of the network
 Having synchronized clocks is not only convenient but required for many distributed
applications.
Configure Basic configuration based on below info and routing RIP or OSPF
Router0
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int
Router(config)#interface gi
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#ip add
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#no shu
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#exit
Router(config)#router eigrp 1
Router(config-router)#network 192.168.1.0 0.0.0.255
Router(config-router)#network 10.1.1.0 0.0.0.255
Router(config-router)#
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 10.1.1.2 (GigabitEthernet0/0) is up: new
adjacency
Router(config-router)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
Router#
Router1
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int
Router(config)#interface gi
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#ip add
Router(config-if)#ip address 10.1.1.2 255.255.255.0
Router(config-if)#no shu
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#exit
Router(config)#router eigrp 1
Router(config-router)#network 192.168.2.0 0.0.0.255
Router(config-router)#network 10.1.1.0 0.0.0.255
Router(config-router)#
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
Router#
Test connection and routing
Router0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#logging on
Router(config)#logging 192.168.2.4
Router(config)#logging tr
Router(config)#logging trap deb
Router(config)#logging trap debugging
Router(config)#logging trap debugging ?
<cr>
Router(config)#logging trap debugging
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
%SYS-6-LOGGINGHOST_STARTSTOP: Logging to host 192.168.2.4 port 514 started - CLI
initiated
Router#
Router1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#log
Router(config)#loggin
Router(config)#logging on
Router(config)#logging 192.168.2.4
Router(config)#logging tr
Router(config)#logging trap deb
Router(config)#logging trap debugging
Router(config)#logging trap debugging
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
%SYS-6-LOGGINGHOST_STARTSTOP: Logging to host 192.168.2.4 port 514 started - CLI
initiated
Router#
Then
Go to Syslog Server or open Syslog Server
go to service menu
click Syslog
click on
Network Time Protocol (NTP) is a protocol that allows the synchronization of system
clocks
 Lets check first the the routers and ntp server
Router0
Router(config)#do show clock detail
*1:46:22.211 UTC Mon Mar 1 1993
Time source is hardware calendar
Router(config)#
Router1
Router(config)#do show clock detail
*1:17:53.630 UTC Mon Mar 1 1993
Time source is hardware calendar
Router(config)#
NTP Server
Open NTP Server click the services menuclick NTPthen
So clock is not sync
Router0
Router(config)#
Router(config)#ntp server 192.168.2.3
Router(config)#service ti
Router(config)#service timestamps log dat
Router(config)#service timestamps log datetime mse
Router(config)#service timestamps log datetime msec
Router(config)#do sh clock
*1:57:26.404 UTC Mon Mar 1 1993
Router(config)#
Router(config)#
Router1
Router(config)#ntp serv
Router(config)#ntp server 192.168.2.3
Router(config)#service ti
Router(config)#service timestamps log d
Router(config)#service timestamps log datetime ms
Router(config)#service timestamps log datetime msec
Router(config)#
Router(config)#do sh clock
*1:33:48.732 UTC Mon Mar 1 1993
Router(config)#
It will take some time to synch
Click on fast forward time
Then again execute command do sh clock
The go to NTP server
Download