Module-18.1 Network Time Protocol (NTP)

What is NTP?

NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference.

Most people assume that computer clocks in servers, workstations and network devices are inherently accurate.  This is incorrect.  Most of these clocks are set by hand to within a minute or two of actual time and are rarely checked after that.  Many of these clocks are maintained by a battery-backed, clock-calendar device that may drift as much as a second per day.  Having any sort of meaningful time synchronization is impossible if such clocks are allowed to run on their own.

ntp

The Importance of Time Synchronization for Your Network:

  • Tracking security breaches, network usage, or problems affecting a large number of components can be nearly impossible if timestamps in logs are inaccurate. Time is often the critical factor that allows an event on one network node to be mapped to a corresponding event on another.
  • To reduce confusion in shared filesystems, it is important for the modification times to be consistent, regardless of what machine the filesystems are on.
  • Billing services and similar applications must know the time accurately.
  • Some financial services require highly accurate timekeeping by law.
  • Sarbanes-Oxley and HIPAA Security Rules both require accurate timestamping.

 

 

 

 

 

 

Step:1   Install  & verify NTP server package

      # yum install –y ntp*

      # rpm -qa | grep ntp*

Step:2  Update /etc/ntp.conf

Vi /etc/ntp.conf

restrict 192.168.16.0 mask 255.255.255.0 nomodify notrap       —>  (Add specific host / network)

restrict 127.0.0.1                                                                        ——->  ( localhost needs to have the full access to query or modify)

driftfile /var/lib/ntp/drift                                                                —->  (Specify the drift file and the log file location in your ntp.conf file)

logfile /var/log/ntp.log

# Use public servers from the pool.ntp.org project.                 (Public time servers)

server pool.ntp.org

:wq!

 

Step:3 Restart NTP server

  # service ntpd restart

Step:4 Add NTP service in startup

  # chkconfi ntpd on

Step:5 To check NTP functioning

# ntpq -p

     remote           refid     st t when poll reach   delay   offset jitter

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

pool.ntp.org 127.67.113.92   2 u   63   64   3   49.334 477.421 68.289

 

 NTP Client Configuration to SYNC time from NTP Server:

 

Step:1   Install  & verify NTP server package

      # yum install –y ntp*

      # rpm -qa | grep ntp*

Step:2  Update /etc/ntp.conf

Vi /etc/ntp.conf

restrict 192.168.16.0 mask 255.255.255.0 nomodify notrap       —>  (Add specific host / network)

restrict 127.0.0.1                                                                        ——->  ( localhost needs to have the full access to query or modify)

driftfile /var/lib/ntp/drift                                                                —->  (Specify the drift file and the log file location in your ntp.conf file)

logfile /var/log/ntp.log

# Use public servers from the pool.ntp.org project.                 (Public time servers)

server yourmasterserverIP or name

:wq!

Step:3 Restart NTP server

  # service ntpd restart

Step:4 Add NTP service in startup

  # chkconfi ntpd on

Step:5 To check NTP functioning

# ntpq -p

     remote           refid     st t when poll reach   delay   offset jitter

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

yourserverip 127.67.113.92   2 u   63   64   3   49.334 477.421 68.289

 

Sometime….??

To manually update time at client server from NTP server

# ntpdate –u 192.168.1.x  ( NTP server IP)

# ntpdc -c sysinfo

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>