请教一个solaris NTP时间同步问题
第一个问题:
solaris 10 作为NTP Client去同步外部独立的NTP SEVER,两者的时间差比较大,solaris 10去同步NTP Client就会失败?solaris 10默认的这个时间差临界时间是多少?
第二个问题:
现在是双机SUN V890,通过/etc/inet/ntp.conf.cluster 配置去同步外部NTP SERVER。这个时候又有网络中的其他机子,能不能来同步SUN V890,也就是说SUN V890对外部NTP SERVER来说是Client, 同时又作为其他机子的NTP SERVER?
root@osssvr-1 # more ntp.conf.cluster
#
# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)ntp.cluster 1.3 01/01/22 SMI"
#
# /etc/inet/ntp.cluster
#
# This is a sample ntp.conf file which can be installed as
# /etc/inet/ntp.conf, for use in a cluster.
#
# This file (i.e., ntp.cluster), is typically copied to /etc/inet/ntp.conf
# when standard cluster installation procedures (e.g., scinstall(1M))
# are used. If /etc/inet/ntp.conf already exists at install time,
# the ntp.conf file already in place remains unchanged. If cluster
# packages are installed using other means, such as direct use
# of pkgadd(1M), it is the installer's responsibility to configure NTP.
#
# The first and foremost requirement when configuring NTP, or any time
# synchronization facility, within the cluster is that all cluster nodes
# be synchronized to the same time. Accuracy of time on individual
# nodes must always be considered secondary to the synchronization of
# time amongst nodes. Sites are free to configure NTP as best meet
# their individual needs, as long as this basic requirement for
# synchronization is met.
#
# At boot time, nodes joining the cluster attempt to synchronize their
# times with other nodes already active in the cluster before xntpd is
# started. This adjusts for gross differences in time before NTP is
# started and before global filesystem mounts occur.
#
# The default template (i.e., ntp.cluster) includes the following
# features:
#
# * The local (Solaris) undisciplined clock (127.127.1.0) is
# established as a "primary clock".
#
# * The maximum number default private hostnames are all
# configured as "peers" (symmetric active).
#
# * Node 1 is the preferred "peer". This is not a requirement.
# Although, it is useful to specify one of the nodes as preferred.
#
# * Authentication is not configured by default. However,
# * Authentication is not configured by default. However,
# sites may add authentication, as long as time synchronization
# amongst all nodes is preserved.
#
# * A default drift file is configured. But, this is not a requirement;
# it may be removed.
#
# * Default statistics are configured. But, this is not a requirement;
# it may be removed.
#
# Note that "server" entries to other cluster nodes should not
# be added to ntp.conf on a clustered node. The reason for this is
# that the node might not be available; yet, /etc/init.d/xntpd may
# attempt to run ntpdate with -w (wait for response) against the server.
#
# Private hostnames should always be used to synchronize with other
# nodes within the cluster, as the private interconnect is guaranteed
# to be reliable; public hostnames are not.
#
# Whenever a private hostname is changed (e.g., scconf -P), it must also
# be changed in this file on each node.
#
# xntpd(1M) will complain about private hostnames in this file which
--More--(63%)
# xntpd(1M) will complain about private hostnames in this file which
# are unknown. Such entries can and should be removed from this
# file (on each node), in order to eliminate unknown host messages
# from the daemon.
#
# Whenever a node is added to the cluster, it's private
# hostname must be used to add it as a "peer".
#
# "peer" references to self may also be removed; although,
# leaving them in the configuration is harmless and allows
# for each node to have the same ntp.conf file.
#
#
# The local (undisciplined Solaris) clock is identified as 127.127.1.0.
#
# Some type of primary clock is important; but, it does not have
# to be the local kernel clock.
server 134.98.5.80 prefer#server 127.127.1.0
#
# Cluster nodes - private interfaces
--More--(79%)
# All nodes within the cluster must synchronize within the cluster
# as peers. Time synchronization amongst the nodes is more important
# than the accuracy of the agreed upon time.
#
# Peer communications should always occur across the private interconnect.
# And, so, private hostnames should always be used. Whenever a change
# is made to the private hostname used for accessing a node, a change
# should also be made to the ntp.conf file on each node. When nodes
# are added to or removed from the cluster, this list must also be
# updated on each node.
#
# One of the "peers" should be "preferred" over the others.
#
peer clusternode1-priv
peer clusternode2-priv
#
# Drift file (optional)
#
driftfile /var/ntp/ntp.drift
--More--(96%)
#
# Drift file (optional)
#
driftfile /var/ntp/ntp.drift
#
# Stats (optional)
#
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
root@osssvr-1 #
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
谁给回复一下啊。。。
1,时间相差太大会同步不了。具体多少,我不知道。
2,可以配置。只要你的层数没有达到极限。我曾经试过在solaris上配13层还可以做server,但是配14层就无法下发时间了。使用ntp.server就可以了。这个我曾经给做过。
本帖最后由 zhmzhouming 于 2011-04-21 11:17 编辑
看看我的吧:
下面是B机器的ntp.conf配置,从A机器获取时间,当A机器时间出现故障,则使用本机时间:
root@serverB # more ntp.conf
# ident "@(#)ntp.client 1.3 00/07/17 SMI"
#
# /etc/inet/ntp.client
#
# An example file that could be copied over to /etc/inet/ntp.conf; it
# provides a configuration for a host that passively waits for a server
# to provide NTP packets on the ntp multicast net.
#
server serverB
server localhost
multicastclient 224.0.1.1
ignore
root@serverB # ntp
ntpdate ntpq ntptrace
root@serverB # ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*serverA LOCAL(0) 4 u 49 128 377 0.46 0.041 0.02
localhost 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0
root@serverB #
然后看看serverC的配置:
root@serverC # more ntp.conf
# ident "@(#)ntp.client 1.3 00/07/17 SMI"
#
# /etc/inet/ntp.client
#
# An example file that could be copied over to /etc/inet/ntp.conf; it
# provides a configuration for a host that passively waits for a server
# to provide NTP packets on the ntp multicast net.
#
server serverB
multicastclient 224.0.1.1
root@serverC # ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*serverB serverA 5 u 247 256 377 0.35 0.259 0.11
root@serverC #
ntp初次同步,没有时间差太大不能同步的概念
ntp在开始同步之后,2个ntp host之间的时间差大约10分钟,那么会停止自动同步的概念。
ntp没有 server和client的概念,只有级别高和级别低的概念