UNIT - III
Time Server It is a daemon that runs on one machine and to which other systems synchronize their system clocks. It is a service that provides authoritative clock against which all other systems on the LAN sync their clocks. In most cases, machine synchronizes time server clock against reference time servers.
But in some cases, the time server synchronizes its time against a specially designed clock named as hardware clock, that maintains extremely accurate time. The motivation to keep a time server is to keep the system time consistent throughout the LAN so that time sensitive operations like NFS can work reliably. There are no inconsistencies in time stamp.
Time Server Solution The user has three choices of time server : hardware, software and both. The hardware solution involves installing a high resolution clock for users facility and then to configure client systems to synchronize client system clocks against that device. The hardware solution is expensive as it requires cesium clock to be installed, which is highly accurate and capable of receiving radio frequencies which carries time signals broadcasted by satellites.
The most common time server solution especially for small networks and organization is based on software. The simplest approach is to use the date program to set your system clock to the time broadcasted by another system i.e. NTP Server. NTP is an open standard that defines how internet time servers work and how client communicate with these time servers to maintain accurate time.
NTP consists a daemon – ntpd, a small set of utility programs and configuration file /etc/ntp.conf NTP daemon is dual purpose, it act as a server, listening for a time synchronization request and providing the time in response and as a client communicating with other time server to get correct time.
Configuration file of NTP restrict default nomodify notrap noquery. restrict #---OUR TIMESERVERS---# server pool.ntp.org
#---GENERAL CONFIGURATION--# Server #local clock Fudge stratum 10 driftfile /var/lib/ntp/drift broadcastdelay keys /etc/ntp/keys
Explanation server : indentify the time server server instructs NTP daemon to use local clock. fudge stratum 10 limits use of local clock by assigning it very low place in time server. Drift file specifies the file that stores local clocks oscillation frequency.
broadcast delay sets number of seconds used to calculate delay between remote reference server. Directive keys /etc/ntp/keys tells NTP where to find cryptographic keys used to encrypt exchanges between client and server machines.
Configuring Time Server [A] Installing NTP package 1. check whether NTP is installed or not using : [root#] rpmquery –qa|grep ntp 2. if it is not installed, install it using : [root#] rpm –ivh ntp
[B] Selecting reference clocks 1. For time server to keep accurate time it has to synchronize with one or more master reference clock. 2. NTP provides sync to pool servers which is a large class of publicly accessible secondary server which is maintained as a public service. 3. NTP pool time server organized into pool.ntp.org 4. Master/Reference NTP Servers are arranged in series of primary, secondary and tertiary servers.
[C] To configure NTP server 1. Add following in /etc/ntp.conf broadcast autokey crypto pw serverpassword keysdir /etc/ntp 2. Generate the key files and certificate using following : [root#] cd /etc/ntp [root#ntp] ntp-keygen–p serverpassword
3. start NTP server [root#] service ntp start Starting ntpd :[ok] 4. Start NTP on boot [root#] chkconfig ntpd on
Configuring NTP client 1. start the NTP daemon, ntpd and client is configured. 2. user is interested in GUI form then he can use Date/Time Properties Tools. To start with GUI there are two either type system-config-date at the command prompt. 3. and then NTP server and IP
4. add following lines to /etc/ntp.conf on client : server autokey crypto pw clientpassword keysdir /etc/ntp 5. generate client keys and certificate : [root#] cd /etc/ntp [root#ntp] ntp -keygen –p clientpassword
6. import the key created on server [root#] scp :/etc/ntp 7. start or restart NTP [root#] service ntp start [root#] service ntp restart 8. communicate with server [root#] ntpq –p [root#] ntpstat