Showing posts with label ntp. Show all posts
Showing posts with label ntp. Show all posts

Friday, 10 July 2020

NTP CONFIGURATION






Server0


Edge_Router>en

Edge_Router#

Edge_Router#

Edge_Router#

Edge_Router#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Edge_Router(config)#ntp server 115.252.242.1 ?

key Configure peer authentication key

<cr>

Edge_Router(config)#ntp server 115.252.242.1

Edge_Router(config)#^Z

Edge_Router#

%SYS-5-CONFIG_I: Configured from console by console


Edge_Router#

Edge_Router#sh ntp ?

associations NTP associations

status NTP status


Edge_Router#sh ntp associations


address ref clock st when poll reach delay offset disp

*~115.252.242.1 127.127.1.1 1 10 16 7 0.00 -2.00 0.12

* sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

Edge_Router#

Edge_Router#sh ntp stat

Edge_Router#sh ntp status

Clock is synchronized, stratum 2, reference is 115.252.242.1

nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz, precision is 2**24

reference time is E287CFA2.00000054 (20:42:10.084 UTC Wed Jul 8 2020)

clock offset is 0.00 msec, root delay is 0.00 msec

root dispersion is 10.83 msec, peer dispersion is 0.12 msec.

loopfilter state is 'CTRL' (Normal Controlled Loop), drift is - 0.000001193 s/s system poll interval is 4, last update was 1 sec ago.

Edge_Router#



Edge_Router#sh clock

20:43:3.373 UTC Wed Jul 8 2020

Edge_Router#


==================================================================


SW1>en

SW1#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

SW1(config)#ntp server 10.1.1.1

SW1(config)#^Z

SW1#

%SYS-5-CONFIG_I: Configured from console by console


SW1#sh ntp associations


address ref clock st when poll reach delay offset disp

*~10.1.1.1 115.252.242.1 2 7 16 311 0.00 -2.00 0.00

* sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

SW1#

SW1#sh ntp stat

SW1#sh ntp status

Clock is synchronized, stratum 3, reference is 10.1.1.1

nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz, precision is 2**24

reference time is E287D1A5.000002D2 (20:50:45.722 UTC Wed Jul 8 2020)

clock offset is -2.00 msec, root delay is 0.00 msec

root dispersion is 20.84 msec, peer dispersion is 0.00 msec.

loopfilter state is 'CTRL' (Normal Controlled Loop), drift is - 0.000001193 s/s system poll interval is 4, last update was 13 sec ago.

SW1#

SW1#sh clock

20:51:7.338 UTC Wed Jul 8 2020

SW1#



Thanks for Reading



amartechstuff

Wednesday, 4 March 2020

NETWORK TIME PROTOCOL (NTP)

Network Time Protocol (NTP) is a protocol which used to synchronize the clocks of network infrastructure devices like Servers , Routers , Switches , Firewalls etc over a network.


It allows network infrastructure device to keep its system time synchronized to an external accurate time source.

Uses UDP Protocol port 123

NTP



========================================================================
Need of NTP  - 
========================================================================

Time stamps are used every where.

Digital Certificates: Digital Certificates include a validity period. If your Cisco Router/Switch clock is not configured properly, Digital Certificates may not work properly.

Syslogs:- If in your network you are using Syslogs to track the logs of the network infrastructure devices then it becomes very crucial that
all the devices should be configured with same clock i.e date and time.Otherwise it will be very difficult to co-relate events happened on the devices.

Policy Implemention - Incertain cases if you need to implement certain policy or policies on network infrastructure devices based on time.

========================================================================
Explanation 
========================================================================

In NTP time is distributed from a authorize, reference, high precision time device.

This distribution is done in an hierarchical way.

There is something known as Stratum levels in NTP which defines the distance of the device from a high precision clock.

A Stratum -0 device is assumed to be the most accurate one ,

A Stratum -1 which are connected to High Precision time source and are the primary servers.

A Stratume -2 the secondary servers which are connected to Stratum -1 and so on .


    |==========|
    | Stratum 0  |  HIGH PRECISION TIME SOURCE
    |==========|     

            |
            |
            |

    |==========|
    | Stratum 1  |  NTP TIME SERVER ; TIME SOURCE - STRATUM 0
    |==========| 

            |
            |
            |

    |==========|
    | Stratum 2  |  NTP TIME SERVER ; TIME SOURCE - STRATUM 1
    |==========| 
            |
            |
            |

    |==========|
    | Stratum 3  |  NTP TIME SERVER ; TIME SOURCE - STRATUM 2
    |==========|

========================================================================
NTP CONFIGURATION ON ROUTERS
========================================================================
R1 (config) # ntp master 2

STRATUM 0 -> High Precision time source ( GPS OR RADIO CLOCK)

STRATUM 1 -> Some Server

So lets consider stratum level of the routers as 2 or 3 (Here we will consider as 2)

R2 (config) # ntp server 10.10.10.10  ------> IP address of R1

R3 (config) # ntp server 10.10.10.10

To verify the stauts

R2 # sh ntp status
R2 # sh ntp associations
R2 # sh clock

Troubleshooting command

R2 # debug ntp all

Note - debug output may result in the high cpu utilization of the device.

Thanks for Reading !!!!!!