top of page

NTP and Syslog Protocols

In this blog you will learn how to configure Syslog protocol to send logs from network devices to a central log server. NTP will be configured to synchronize all device clocks and correlate all log events correctly.

Router1 Configuration interface Loopback0 ip address 1.1.1.1 255.255.255.255 interface GigabitEthernet0/0 ip address 10.10.1.130 255.255.255.224 interface Serial0/0/0 ip address 10.10.1.229 255.255.255.252 router ospf 1 area 10 virtual-link 1.1.1.2 network 1.1.1.1 0.0.0.0 area 10 network 10.10.1.128 0.0.0.31 area 11 network 10.10.1.228 0.0.0.3 area 10

Router2 configuration hostname 1R2 interface Loopback0 ip address 1.1.1.2 255.255.255.255 interface Serial0/0/0 ip address 10.10.1.230 255.255.255.252 interface Serial0/1/0 ip address 10.10.1.226 255.255.255.252 clock rate 2000000 interface GigabitEthernet0/2/0 ip address 192.168.100.1 255.255.255.0 router ospf 1 area 10 virtual-link 1.1.1.4 area 10 virtual-link 1.1.1.1 network 1.1.1.2 0.0.0.0 area 0 network 10.10.1.224 0.0.0.3 area 10 network 10.10.1.228 0.0.0.3 area 10 network 192.168.100.0 0.0.0.255 area 0

R3 configuration hostname 1R3 interface Loopback0 ip address 1.1.1.3 255.255.255.255 interface GigabitEthernet0/0 ip address 10.10.1.129 255.255.255.224 interface GigabitEthernet0/1 ip address 10.10.1.34 255.255.255.240 interface GigabitEthernet0/2 ip address 10.10.1.161 255.255.255.224 router ospf 1 router-id 1.1.1.3 network 1.1.1.3 0.0.0.0 area 11 network 10.10.1.32 0.0.0.15 area 11 network 10.10.1.128 0.0.0.31 area 11 network 10.10.1.160 0.0.0.31 area 11 no logging console logging trap debugging logging facility local5 logging 192.168.100.11 logging synchronous

R4 configuration hostname 1R4 interface Loopback0 ip address 1.1.1.4 255.255.255.255 interface GigabitEthernet0/1 ip address 10.10.1.162 255.255.255.224 interface Serial0/0/0 ip address 10.10.1.225 255.255.255.252 router ospf 1 router-id 1.1.1.4 area 10 virtual-link 1.1.1.2 network 1.1.1.4 0.0.0.0 area 10 network 10.10.1.160 0.0.0.31 area 11 network 10.10.1.224 0.0.0.3 area 10

Configuring NTP Use the network built previously as an environment into which NTP will be introduced.

Task 1 - Configure NTP servers 1. Check the current clock settings then do the new clock settings on XR1. XR1#show clock XR1#clock timezone AST -4 (or clock timezone ADT -3) XR1#clock set <hh:mm:ss (1-31) Month YYYY>

2. Configure the router XR1 as an NTP server using a stratum of 2. XR1(config)#ntp master 2 3. Configure all other routers to synchronize their clock to XR1’s clock. XR2(config)#ntp server X.X.X.1 XR3(config)#ntp server X.X.X.1 XR4(config)#ntp server X.X.X.1

Configuring Syslog

# no logging console # logging on # logging trap debugging # logging facility local5 # logging 192.168.100.11

Verification Commands

Router# show ip route Router# show ip ospf Router# show ip ospf interface <interface_number> Router# show ip ospf database

# Show ntp status # Show clock

bottom of page