how to stop synchroniziing the clock from internet at startup

grsuisse ulist at gs1.ubuntuforums.org
Fri Apr 14 13:53:24 UTC 2006


If you are like me your router has problems with IPv6. To overcome this
for ntp you need to make a copule of changes.

First ntpdate is called at start up. Its configuration file is
/etc/defaults/ntpdate. Adding -4 to the line NTPOPTIONS will force
ntpdate to use IPv4. My file looks like this:

# servers to check.   (Separate multiple servers with spaces.)

#NTPSERVERS="pool.ntp.org"

NTPSERVERS="ch.pool.ntp.org"

#NTPSERVERS="ntp.ubuntulinux.org"

#

# additional options for ntpdate

#NTPOPTIONS="-v"

NTPOPTIONS="-u -4"



Note that I have also selected a server closer to me (ch.pool.ntp.org).
To find a list of alternative servers go to the following
http://www.pool.ntp.org/



That should fix your problems at start up. 



There is also a daemon that runs during your session and regularly
checks the time. This is turned on from the System menu under
Administration - Time and Date. You need to tick the box and then
select some servers close to you (you can also add the pool referred to
above). 



The daemon ntpd also needs to be forced to use IPv4. To do this edit
the file /etc/ntp.conf. On every line that starts with the word
"server" you need to put  "-4" between the word "server" and the name
of the ntp server.  My file looks like this:

# /etc/ntp.conf, configuration for ntpd



# ntpd will use syslog() if logfile is not defined

#logfile /var/log/ntpd



driftfile /var/lib/ntp/ntp.drift

statsdir /var/log/ntpstats/



statistics loopstats peerstats clockstats

filegen loopstats file loopstats type day enable

filegen peerstats file peerstats type day enable

filegen clockstats file clockstats type day enable





# You do need to talk to an NTP server or two (or three).

#server ntp.your-provider.example



server -4 ch.pool.ntp.org

etc.


-- 
grsuisse




More information about the ubuntu-users mailing list