Archive for NTP

高速时间服务器地址~长期有效

ntp.org 维护的时间服务器域名,随机返回可用的服务器。

地址:
全球的服务器,速度很快,一般ping值是20-30之间。应该使用了智能dns,返回的基本上都是中国的ntp服务器。
0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
3.pool.ntp.org

gentoo的服务器,其实就是上面的别名。
0.gentoo.pool.ntp.org
1.gentoo.pool.ntp.org
2.gentoo.pool.ntp.org
3.gentoo.pool.ntp.org
4.gentoo.pool.ntp.org

亚洲的服务器,不建议使用。未知原因造成返回的服务器速度很慢,ping值基本100以上。
0.asia.pool.ntp.org
1.asia.pool.ntp.org
2.asia.pool.ntp.org
3.asia.pool.ntp.org

ntp.org 维护的列表(有很多时间服务器)
http://www.pool.ntp.org/zone/@
http://support.ntp.org/bin/view/Servers/WebHome#Browsing_the_Lists

其他的地址(不建议使用,稳定性和速度不能保证。):
time-b.nist.gov
210.72.145.44
time-nw.nist.gov
time-a.nist.gov
stdtime.gov.hk 香港天文台
time.buptnet.edu.cn IPv4 + IPv6 北京邮电大学NTP一级服务器
time.join.uni-muenster.de IPv4 + IPv6
time6.ipv6.uni-muenster.de IPv6
ntp6.space.net IPv4 + IPv6
ntp.ipv6.uni-leipzig.de IPv4 + IPv6
ntp.rhrk.uni-kl.de IPv4 + IPv6
ntp6.remco.org IPv6
chime3.ipv6.surfnet.nl IPv6

备注:
时间服务器分层:
0层为官方时钟所保留。
第一层为一级时钟源层,其上没有任何客户,只有主钟源,这些钟源之间相互不允许校正。一级钟源的任务就是将时间信息向第二层的钟源或客户发布。一般一级时钟源的会使用GPS卫星天线来获得GPS时间。
第二层及以下层除层数不同、时间质量不一样外没有本质上的区别。第N层上的时钟源的时间来自第N-1层或第N层,并向第N层上的时钟源和第N+1层上的客户提供校时服务。

附我的配置

$ cat /etc/ntp.conf
# NOTES:
# – you should only have to update the server line below
# – if you start getting lines like ‘restrict’ and ‘fudge’
# and you didnt add them, AND you run dhcpcd on your
# network interfaces, be sure to add ‘-Y -N’ to the
# dhcpcd_ethX variables in /etc/conf.d/net

# Name of the servers ntpd should sync with
# Please respect the access policy as stated by the responsible person.
#server ntp.example.tld iburst
#
# Common pool for random people
# 应该使用了智能DNS,返回的基本上都是国内的服务器。ping值基本上在40以内。
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org

# Pools for Gentoo users
# ?.pool.ntp.org 的别名。
#server 0.gentoo.pool.ntp.org
#server 1.gentoo.pool.ntp.org
#server 2.gentoo.pool.ntp.org
#server 3.gentoo.pool.ntp.org

# 亚洲的服务器,没有使用智能DNS,经常返回国外的地址。ping值基本100以上。
#server 0.asia.pool.ntp.org
#server 1.asia.pool.ntp.org
#server 2.asia.pool.ntp.org
#server 3.asia.pool.ntp.org

# Server From UTC(TL)。使用标准时间信号,和国家标准时间差不超过5毫秒,
# # 另外附加美国NIST及USNO的NTP Server,若您同时连上这些server,ntpd
# # 会自动选择最佳的server校时,并防止任一Server当机造成损失
# 基本上都挂了,没挂的也慢的要死。
#server s1a.time.edu.cn prefer
#server s1b.time.edu.cn prefer
#server s1c.time.edu.cn prefer
#server s1d.time.edu.cn prefer
#server s1e.time.edu.cn prefer
#server clock.stdtime.gov.tw prefer

#server s2a.time.edu.cn
#server s2b.time.edu.cn
#server s2c.time.edu.cn
#server s2d.time.edu.cn
#server s2e.time.edu.cn
#server s2f.time.edu.cn
#server s2g.time.edu.cn
#server s2h.time.edu.cn
#server s2j.time.edu.cn
#server s2k.time.edu.cn
#server s2m.time.edu.cn

# Server From NIST and USNO。这是NIST(美国国家标准局)及USNO
# (美国海军天文台)的Server。由于server设在美国,网络延迟并不固定
# 一般设定上述Server已足够。
#
#server time.nist.gov # (ACTS)
#server time-A.timefreq.bldrdoc.gov # (ACTS)
#server tick.usno.navy.mil

##
# A list of available servers can be found here:
# http://www.pool.ntp.org/
# http://www.pool.ntp.org/#use
# A good way to get servers for your machine is:
# netselect -s 3 pool.ntp.org
##

# you should not need to modify the following paths
driftfile /var/lib/ntp/ntp.drift

#server ntplocal.example.com prefer
#server timeserver.example.org

# Warning: Using default NTP settings will leave your NTP
# server accessible to all hosts on the Internet.

# If you want to deny all machines (including your own)
# from accessing the NTP server, uncomment:
#restrict default ignore

# To deny other machines from changing the
# configuration but allow localhost:
#restrict default nomodify nopeer
#restrict 127.0.0.1
restrict default ignore

# To allow machines within your network to synchronize
# their clocks with your server, but ensure they are
# not allowed to configure the server or used as peers
# to synchronize against, uncomment this line.
#
#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap

No comment »