It's a time sync protocol that allows IT infrastructures to be one in time.
After that we will start the daemon server.
Why i need it?
When time sync it's a critical factor for the services to work. One clear example is Kerberos and Active Directory. SSO Web infrastructures like Oracle Access Manager require exact time sync in all components, all over the servers.
How does it work?
There are two actors in every ntp scenario:
- Client: is the final consumer of the service, which adecuates it's internal clock to the time set on the server
- Server: It's the reference for the time corrections and synchronization. But also it can act as a client for other servers which are authoritative sources for time sync, like NASA atomic time servers, etc
First of all: Let's configure it.
Configuration is quite simple:
- Server side:
+ Authoritative source: the server will be the main NTP server. No other servers will be requested for time sync.
+ Slave model : server will act as server for the client infrastructure, but also will contact
other time servers in order to have a more accurate referal.
Files for a basic configuration on a Linux NTP server:
+ ntp.conf:
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server 127.127.1.0
# local clock
#fudge
127.127.1.0 stratum 10
# and when no outside source of synchronized time is available.
server 127.127.1.0
# local clock
#fudge
127.127.1.0 stratum 10
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
On a Windows 2003 Server with AD acting as NTP server:
Please check the following registry key setting:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/W32Time/
TimeProviders/NTPserver/Enabled=1
Next step with Linux
To test the service we will use
ntpdate -d 132.236.56.250
After that we will need to perform an initial sync , with the command:
ntpdate 192.168.56.101
Once we have both machines synchronized we will start a new task on cron with the command
crontab -e
* * * * * /usr/sbin/ntpdate -s -b -p 8 -u 192.168.56.101
Next step with Windows
Please follow this procedure
Some final words.
This tip is an entry point for NTP configuration, if you need further info, please consider reading other
resources like the following ones:
- http://www.akadia.com/services/ntp_synchronize.html
- http://tldp.org/LDP/sag/html/index.html
- http://www.meinberg.de/english/sw/ntp.htm
No hay comentarios:
Publicar un comentario