This shows how to setup a Linux server as
a central time server (which listens to an external highly accurate server).
Also shown is how to get MS Windows and a Linux host update their time
using a time service. |
W2003SVR - Use Net Time to get time from another host
=====================================================
> net time /querysntp
This computer is not currently configured to use a specific SNTP server.
> net time /help
> net time /setsntp:time.us.scalix.com
> net time
Current time at \\CORK is 6/1/2005 11:23 AM
> net time /querysntp
The current SNTP value is: time.us.scalix.com
> net stop w32time && net start w32time
The Windows Time service is stopping.
The Windows Time service was stopped successfully.
The Windows Time service is starting.
The Windows Time service was started successfully.
Check System Event Log for confirmation
Bilbo - Act as Time Server
==========================
[fredness@bilbo fredness]$ diff ntp.new /etc/ntp.conf
2,3c2,6
< restrict default ignore
< restrict 66.187.224.4 mask 255.255.255.255 nomodify notrap noquery
---
> # restrict default ignore
> # restrict 66.187.224.4 mask 255.255.255.255 nomodify notrap noquery
> restrict 69.25.96.13 mask 255.255.255.255 nomodify notrap noquery
> restrict 207.200.81.113 mask 255.255.255.255 nomodify notrap noquery
> restrict 207.126.98.204 mask 255.255.255.255 nomodify notrap noquery
16c19
< # restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
---
> restrict 10.17.0.0 mask 255.255.0.0 nomodify notrap
24,28d26
< # restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
< # server mytrustedtimeserverip
<
<
<
30c28
< #multicastclient # listen on default 224.0.1.1
---
> # multicastclient # listen on default 224.0.1.1
49,50c47,51
< server 66.187.224.4
< fudge 127.127.1.0 stratum 10
---
> # server 127.127.1.0 # local clock
> # fudge 127.127.1.0 stratum 10
> server 69.25.96.13 # nist1.symmetricom.com
> server 207.200.81.113 # nist1.aol-ca.truetime.com
> server 207.126.98.204 # nist1-sj.glassey.com
66c67
< authenticate yes
---
> authenticate no
78a80,82
>
> # Alternate logfile
> logfile /var/log/ntp
[fredness@bilbo ntp]$ pwd
/etc/ntp
[fredness@bilbo ntp]$ cat ntpservers
nist1.symmetricom.com
nist1.aol-ca.truetime.com
nist1-sj.glassey.com
clock.redhat.com
clock2.redhat.com
[fredness@bilbo ntp]$ cat step-tickers
nist1.symmetricom.com
nist1.aol-ca.truetime.com
nist1-sj.glassey.com
clock.redhat.com
clock2.redhat.com
[fredness@bilbo fredness]$ diff ntpd /etc/sysconfig/ntpd
2c2
< OPTIONS="-U ntp -p /var/run/ntpd.pid"
---
> OPTIONS="-A -U ntp -p /var/run/ntpd.pid"
[root@bilbo root]# service ntpd status
ntpd (pid 2967) is running...
Neo - use net time to get time from another host
================================================
$ diff ntp.new /etc/ntp.conf
...
# service ntpd status
ntpd (pid 2967) is running...
... |