免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 5866 | 回复: 25
打印 上一主题 下一主题

[其他] NTP服务 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-05-09 11:10 |只看该作者 |正序浏览


    RHEL6.3上NTP服务如何配置???

论坛徽章:
0
26 [报告]
发表于 2013-05-21 13:33 |只看该作者
回复 25# sirense


    不可以。

论坛徽章:
0
25 [报告]
发表于 2013-05-21 13:11 |只看该作者
NTP服务器能不能连到 自身/etc/ntp.conf 里 server 行配置的服务器IP?

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
24 [报告]
发表于 2013-05-15 20:04 |只看该作者
ntpdate -d yourlocalntpserver

ntptrace yourlocalntpserver


and tcpdump -i eth0 and udp and port 123 抓包看下。

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
23 [报告]
发表于 2013-05-15 19:13 |只看该作者
回复 10# liyaweihesmz
是UDP 123 不是TCP 你设置的没问题?

   

论坛徽章:
0
22 [报告]
发表于 2013-05-14 10:02 |只看该作者
回复 21# wenhq


    还是同样的错误。
   ntpdate 192.168.174.153
   14 May 09:53:17 ntpdate[23062]: no server suitable for synchronization found

   NTP服务器中messages日志信息如下:
  1. May 14 09:56:30 localhost ntpd[31468]: ntpd exiting on signal 15
  2. May 14 09:56:30 localhost ntpd[31540]: ntpd 4.2.4p8@1.1612-o Thu Jan 10 15:17:24 UTC 2013 (1)
  3. May 14 09:56:30 localhost ntpd[31541]: precision = 0.430 usec
  4. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
  5. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #1 wildcard, ::#123 Disabled
  6. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #2 lo, ::1#123 Enabled
  7. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #3 eth0, fe80::20c:29ff:fe6f:4d56#123 Enabled
  8. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
  9. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #5 eth0, 192.168.174.157#123 Enabled
  10. May 14 09:56:30 localhost ntpd[31541]: Listening on interface #6 virbr0, 192.168.122.1#123 Enabled
  11. May 14 09:56:30 localhost ntpd[31541]: Listening on routing socket on fd #23 for interface updates
  12. May 14 09:56:30 localhost ntpd[31541]: kernel time sync status 2040
  13. May 14 09:56:30 localhost ntpd[31541]: frequency initialized 23.467 PPM from /var/lib/ntp/drift
复制代码

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
21 [报告]
发表于 2013-05-13 12:44 |只看该作者
回复 20# liyaweihesmz


    恩,注释掉那3行,重启一下ntp 服务试试。

论坛徽章:
0
20 [报告]
发表于 2013-05-13 12:41 |只看该作者
回复 19# wenhq


    我在虚拟机上实验了,我在IP地址为192.168.174.153的主机上实验作为服务器,所以我就填这个地址啊。

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
19 [报告]
发表于 2013-05-13 09:49 |只看该作者
server 192.168.174.153 ##改成你本地的ntpserver IP
这个IP 是你内网的 ntp server 192.168.174.153?
#############################
server 0.rhel.pool.ntp.org iburst

server 1.rhel.pool.ntp.org iburst

server 2.rhel.pool.ntp.org iburst

注释掉这3行。

论坛徽章:
0
18 [报告]
发表于 2013-05-13 09:38 |只看该作者
  1. # For more information about this file, see the man pages
  2. # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

  3. driftfile /var/lib/ntp/drift

  4. # Permit time synchronization with our time source, but do not
  5. # permit the source to query or modify the service on this system.
  6. restrict default kod nomodify notrap nopeer noquery
  7. #restrict -6 default kod nomodify notrap nopeer noquery

  8. # Permit all access over the loopback interface.  This could
  9. # be tightened as well, but to do so would effect some of
  10. # the administrative functions.
  11. restrict 127.0.0.1
  12. restrict -6 ::1

  13. # Hosts on local network are less restricted.
  14. restrict 192.168.174.0 mask 255.255.255.0 nomodify notrap

  15. # Use public servers from the pool.ntp.org project.
  16. # Please consider joining the pool (http://www.pool.ntp.org/join.html).
  17. server 0.rhel.pool.ntp.org iburst
  18. server 1.rhel.pool.ntp.org iburst
  19. server 2.rhel.pool.ntp.org iburst

  20. #broadcast 192.168.1.255 autokey        # broadcast server
  21. #broadcastclient                        # broadcast client
  22. #broadcast 224.0.1.1 autokey            # multicast server
  23. #multicastclient 224.0.1.1              # multicast client
  24. #manycastserver 239.255.254.254         # manycast server
  25. #manycastclient 239.255.254.254 autokey # manycast client

  26. # Undisciplined Local Clock. This is a fake driver intended for backup
  27. # and when no outside source of synchronized time is available.
  28. server 192.168.174.153
  29. fudge   127.127.1.0 stratum 10

  30. # Enable public key cryptography.
  31. #crypto

  32. includefile /etc/ntp/crypto/pw

  33. # Key file containing the keys and key identifiers used when operating
  34. # with symmetric key cryptography.
  35. keys /etc/ntp/keys
  36. # Specify the key identifiers which are trusted.
  37. #trustedkey 4 8 42

  38. # Specify the key identifier to use with the ntpdc utility.
  39. #requestkey 8

  40. # Specify the key identifier to use with the ntpq utility.
  41. #controlkey 8

  42. # Enable writing of statistics records.
  43. #statistics clockstats cryptostats loopstats peerstats

复制代码
回复 17# wenhq


   
  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP