unit - iii. time server it is a daemon that runs on one machine and to which other systems...

17
UNIT - III

Upload: roger-hutchinson

Post on 04-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

UNIT - III

Page 2: 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

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.

Page 3: 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

•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.

Page 4: 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

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.

Page 5: 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

• 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.

Page 6: 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

•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.

Page 7: 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

Configuration file of NTP

•restrict default nomodify notrap noquery.•restrict 127.0.0.1•#---OUR TIMESERVERS---#•server pool.ntp.org•server pool.ntp.org•server pool.ntp.org

Page 8: 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

•#---GENERAL CONFIGURATION--#•Server 127.127.1.0 #local clock•Fudge 127.127.1.0. stratum 10•driftfile /var/lib/ntp/drift•broadcastdelay 0.008•keys /etc/ntp/keys

Page 9: 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

Explanation

•server : indentify the time server•server 127.127.1.0 instructs NTP daemon

to use local clock.•fudge 127.127.1.0 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.

Page 10: 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

•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.

Page 11: 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

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

Page 12: 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

• [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.

Page 13: 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

•[C] To configure NTP server •1. Add following in /etc/ntp.conf•broadcast 224.0.0.1 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

Page 14: 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

•3. start NTP server•[root#] service ntp start•Starting ntpd :[ok]•4. Start NTP on boot•[root#] chkconfig ntpd on

Page 15: 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

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

Page 16: 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

•4. add following lines to /etc/ntp.conf on client :

• server 192.168.1.12 autokey•crypto pw clientpassword•keysdir /etc/ntp•5. generate client keys and certificate :•[root#] cd /etc/ntp•[root#ntp] ntp -keygen –p clientpassword

Page 17: 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

•6. import the key created on server•[root#] scp user@ 192.168.1.12 :/etc/ntp

user@timeclient:/etc/ntp•7. start or restart NTP•[root#] service ntp start•[root#] service ntp restart•8. communicate with server•[root#] ntpq –p 192.168.1.12•[root#] ntpstat