- 论坛徽章:
- 0
|
一台sun的N20( mz_ts1)作ntp服务器,到某外部地址132.106.66.*取时钟。结果出错。测试结果如下:
1、先将N20服务器作为内部ntp服务器,通过broadcast发送ntp包到内网各机
# more /etc/inet/ntp.conf.bak
# @(#)ntp.server 1.5 99/09/21 SMI
#
# /etc/inet/ntp.server
#
# An example file that could be copied over to /etc/inet/ntp.conf and
# edited; it provides a configuration template for a server that
# listens to an external hardware clock, synchronizes the local clock,
# and announces itself on the NTP multicast net.
#
# This is the external clock device. The following devices are
# recognized by xntpd 3-5.93e:
#
# 1 Device RefID Description
# -------------------------------------------------------
# 1 local LCL Undisciplined Local Clock
# 2 trak GPS TRAK 8820 GPS Receiver
# 3 pst WWV PSTI/Traconex WWV/WWVH Receiver
# 4 wwvb WWVB Spectracom WWVB Receiver
# 5 true TRUE TrueTime GPS/GOES Receivers
# 6 irig IRIG IRIG Audio Decoder
# 7 chu CHU Scratchbuilt CHU Receiver
# 8 parse ---- Generic Reference Clock Driver
# 9 mx4200 GPS Magnavox MX4200 GPS Receiver
# 10 as2201 GPS Austron 2201A GPS Receiver
# 11 arbiter GPS Arbiter 1088A/B GPS Receiver
# 12 tpro IRIG KSI/Odetics TPRO/S IRIG Interface
# 13 leitch ATOM Leitch CSD 5300 Master Clock Controller
# 15 * * TrueTime GPS/TM-TMD Receiver
# 17 datum DATM Datum Precision Time System
# 18 acts ACTS NIST Automated Computer Time Service
# 19 heath WWV Heath WWV/WWVH Receiver
# 20 nmea GPS Generic NMEA GPS Receiver
# 22 atom PPS PPS Clock Discipline
# 23 ptb TPTB PTB Automated Computer Time Service
# 24 usno USNO USNO Modem Time Service
# 25 * * TrueTime generic receivers
# 26 hpgps GPS Hewlett Packard 58503A GPS Receiver
# 27 arc MSFa Arcron MSF Receiver
#
# * All TrueTime receivers are now supported by one driver, type 5.
# Types 15 and 25 will be retained only for a limited time and may
# be reassigned in future.
#
# Some of the devices benefit from "fudge" factors. See the xntpd
# documentation.
# Either a peer or server. Replace "1" with a value from the
# table above.
server 127.127.1.0 prefer
#fudge 127.127.1.0 stratum 0
broadcast 224.0.1.1 ttl 4
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
#keys /etc/inet/ntp.keys
#trustedkey 0
#requestkey 0
#controlkey 0
经检测,ntp服务正常,测试结果如下:
# ps -ef | grep ntp
utoss 15424 1 0 Jul 12 ? 18:43 sh ./agentpsc.sh
root 8409 7864 0 10:53:02 pts/2 0:00 grep ntp
root 8301 1 2 10:52:54 ? 0:01 /usr/lib/inet/xntpd
# snoop | grep -i ntp
Using device /dev/eri (promiscuous mode)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.104 NTP server (Wed Aug 29 11:11:09 2007)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.104 NTP server (Wed Aug 29 11:11:09 2007)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.101 NTP server (Wed Aug 29 11:11:11 2007)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.101 NTP server (Wed Aug 29 11:11:11 2007)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.103 NTP server (Wed Aug 29 11:11:16 2007)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.103 NTP server (Wed Aug 29 11:11:16 2007)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.162 NTP server (Wed Aug 29 11:11:16 2007)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.162 NTP server (Wed Aug 29 11:11:16 2007)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.161 NTP server (Wed Aug 29 11:11:31 2007)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.161 NTP server (Wed Aug 29 11:11:31 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.164 NTP server (Wed Aug 29 11:11:54 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.164 NTP server (Wed Aug 29 11:11:54 2007)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.163 NTP server (Wed Aug 29 11:11:59 2007)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.163 NTP server (Wed Aug 29 11:11:59 2007)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.102 NTP server (Wed Aug 29 11:12:16 2007)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.102 NTP server (Wed Aug 29 11:12:16 2007)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.104 NTP server (Wed Aug 29 11:13:09 2007)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.104 NTP server (Wed Aug 29 11:13:09 2007)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.101 NTP server (Wed Aug 29 11:13:11 2007)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.101 NTP server (Wed Aug 29 11:13:11 2007)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.103 NTP server (Wed Aug 29 11:13:16 2007)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.103 NTP server (Wed Aug 29 11:13:16 2007)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.162 NTP server (Wed Aug 29 11:13:16 2007)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.162 NTP server (Wed Aug 29 11:13:16 2007)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.161 NTP server (Wed Aug 29 11:13:31 2007)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.161 NTP server (Wed Aug 29 11:13:31 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.164 NTP server (Wed Aug 29 11:13:54 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.164 NTP server (Wed Aug 29 11:13:54 2007)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.163 NTP server (Wed Aug 29 11:13:59 2007)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.163 NTP server (Wed Aug 29 11:13:59 2007)
mz_ts1 -> 224.0.1.1 NTP broadcast (Wed Aug 29 11:14:15 2007)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.102 NTP server (Wed Aug 29 11:14:16 2007)
10.14.208.5 -> mz_ts1 NTP client (Wed Aug 29 11:14:45 2007)
mz_ts1 -> 10.14.208.5 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.80 -> mz_ts1 NTP client (Wed Aug 29 11:14:46 2007)
mz_ts1 -> 10.14.208.80 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.6 -> mz_ts1 NTP client (Wed Aug 29 11:14:46 2007)
mz_ts1 -> 10.14.208.6 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.13 -> mz_ts1 NTP client (Thu Aug 30 02:14:27 2007)
mz_ts1 -> 10.14.208.13 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.14 -> mz_ts1 NTP client (Wed Aug 29 11:14:46 2007)
mz_ts1 -> 10.14.208.14 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.12 -> mz_ts1 NTP client (Wed Aug 29 11:14:44 2007)
mz_ts1 -> 10.14.208.12 NTP server (Wed Aug 29 11:14:46 2007)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.104 NTP server (Wed Aug 29 11:15:09 2007)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.101 NTP server (Wed Aug 29 11:15:11 2007)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.103 NTP server (Wed Aug 29 11:15:16 2007)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.162 NTP server (Wed Aug 29 11:15:16 2007)
mz_ts1 -> 224.0.1.1 NTP broadcast (Wed Aug 29 11:15:19 2007)
10.14.209.5 -> mz_ts1 NTP client (Wed Aug 29 11:15:18 2007)
mz_ts1 -> 10.14.209.5 NTP server (Wed Aug 29 11:15:19 2007)
10.14.209.5 -> mz_ts1 NTP client (Wed Aug 29 11:15:18 2007)
mz_ts1 -> 10.14.209.5 NTP server (Wed Aug 29 11:15:19 2007)
10.14.209.5 -> mz_ts1 NTP client (Wed Aug 29 11:15:18 2007)
mz_ts1 -> 10.14.209.5 NTP server (Wed Aug 29 11:15:19 2007)
10.14.209.5 -> mz_ts1 NTP client (Wed Aug 29 11:15:18 2007)
mz_ts1 -> 10.14.209.5 NTP server (Wed Aug 29 11:15:19 2007)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.161 NTP server (Wed Aug 29 11:15:31 2007)
10.14.208.5 -> mz_ts1 NTP client (Wed Aug 29 11:15:49 2007)
mz_ts1 -> 10.14.208.5 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.80 -> mz_ts1 NTP client (Wed Aug 29 11:15:50 2007)
mz_ts1 -> 10.14.208.80 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.6 -> mz_ts1 NTP client (Wed Aug 29 11:15:50 2007)
mz_ts1 -> 10.14.208.6 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.13 -> mz_ts1 NTP client (Thu Aug 30 02:15:31 2007)
mz_ts1 -> 10.14.208.13 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.14 -> mz_ts1 NTP client (Wed Aug 29 11:15:50 2007)
mz_ts1 -> 10.14.208.14 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.12 -> mz_ts1 NTP client (Wed Aug 29 11:15:48 2007)
mz_ts1 -> 10.14.208.12 NTP server (Wed Aug 29 11:15:50 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.164 NTP server (Wed Aug 29 11:15:54 2007)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.163 NTP server (Wed Aug 29 11:15:59 2007)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.102 NTP server (Wed Aug 29 11:16:16 2007)
mz_ts1 -> 224.0.1.1 NTP broadcast (Wed Aug 29 11:16:23 2007)
10.14.208.5 -> mz_ts1 NTP client (Wed Aug 29 11:16:53 2007)
mz_ts1 -> 10.14.208.5 NTP server (Wed Aug 29 11:16:54 2007)
10.14.208.80 -> mz_ts1 NTP client (Wed Aug 29 11:16:54 2007)
mz_ts1 -> 10.14.208.80 NTP server (Wed Aug 29 11:16:54 2007)
10.14.208.6 -> mz_ts1 NTP client (Wed Aug 29 11:16:54 2007)
mz_ts1 -> 10.14.208.6 NTP server (Wed Aug 29 11:16:54 2007)
10.14.208.13 -> mz_ts1 NTP client (Thu Aug 30 02:16:35 2007)
mz_ts1 -> 10.14.208.13 NTP server (Wed Aug 29 11:16:54 2007)
10.14.208.14 -> mz_ts1 NTP client (Wed Aug 29 11:16:54 2007)
mz_ts1 -> 10.14.208.14 NTP server (Wed Aug 29 11:16:54 2007)
10.14.208.12 -> mz_ts1 NTP client (Wed Aug 29 11:16:52 2007)
mz_ts1 -> 10.14.208.12 NTP server (Wed Aug 29 11:16:54 2007)
# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
LOCAL(0) LOCAL(0) 3 l 28 64 7 0.00 0.000 3885.03
224.0.1.1 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
2、N20到132.106.66.*取时钟,测试结果如下:
# more /etc/inet/ntp.conf
# @(#)ntp.server 1.5 99/09/21 SMI
#
# /etc/inet/ntp.server
#
# An example file that could be copied over to /etc/inet/ntp.conf and
# edited; it provides a configuration template for a server that
# listens to an external hardware clock, synchronizes the local clock,
# and announces itself on the NTP multicast net.
#
# This is the external clock device. The following devices are
# recognized by xntpd 3-5.93e:
#
# XType Device RefID Description
# -------------------------------------------------------
# 1 local LCL Undisciplined Local Clock
# 2 trak GPS TRAK 8820 GPS Receiver
# 3 pst WWV PSTI/Traconex WWV/WWVH Receiver
# 4 wwvb WWVB Spectracom WWVB Receiver
# 5 true TRUE TrueTime GPS/GOES Receivers
# 6 irig IRIG IRIG Audio Decoder
# 7 chu CHU Scratchbuilt CHU Receiver
# 8 parse ---- Generic Reference Clock Driver
# 9 mx4200 GPS Magnavox MX4200 GPS Receiver
# 10 as2201 GPS Austron 2201A GPS Receiver
# 11 arbiter GPS Arbiter 1088A/B GPS Receiver
# 12 tpro IRIG KSI/Odetics TPRO/S IRIG Interface
# 13 leitch ATOM Leitch CSD 5300 Master Clock Controller
# 15 * * TrueTime GPS/TM-TMD Receiver
# 17 datum DATM Datum Precision Time System
# 18 acts ACTS NIST Automated Computer Time Service
# 19 heath WWV Heath WWV/WWVH Receiver
# 20 nmea GPS Generic NMEA GPS Receiver
# 22 atom PPS PPS Clock Discipline
# 23 ptb TPTB PTB Automated Computer Time Service
# 24 usno USNO USNO Modem Time Service
# 25 * * TrueTime generic receivers
# 26 hpgps GPS Hewlett Packard 58503A GPS Receiver
# 27 arc MSFa Arcron MSF Receiver
#
# * All TrueTime receivers are now supported by one driver, type 5.
# Types 15 and 25 will be retained only for a limited time and may
# be reassigned in future.
#
# Some of the devices benefit from "fudge" factors. See the xntpd
# documentation.
# Either a peer or server. Replace "XType" with a value from the
# table above.
server 132.106.66.23
#fudge 127.127.XType.0 stratum 0
broadcast 224.0.1.1 ttl 4
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
#keys /etc/inet/ntp.keys
#trustedkey 0
#requestkey 0
#controlkey 0
# snoop | grep -i ntp
Using device /dev/eri (promiscuous mode)
mz_ts1 -> 132.106.66.23 NTP client (Wed Aug 29 11:47:46 2007)
132.106.66.23 -> mz_ts1 NTP server (Wed Aug 29 11:47:30 2007)
mz_ts1 -> 132.106.66.23 NTP client (Wed Aug 29 11:47:46 2007)
132.106.66.23 -> mz_ts1 NTP server (Wed Aug 29 11:47:30 2007)
mz_ts1 -> 132.106.66.23 NTP client (Wed Aug 29 11:47:46 2007)
132.106.66.23 -> mz_ts1 NTP server (Wed Aug 29 11:47:30 2007)
mz_ts1 -> 132.106.66.23 NTP client (Wed Aug 29 11:47:46 2007)
132.106.66.23 -> mz_ts1 NTP server (Wed Aug 29 11:47:30 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
mz_ts1 -> 10.14.208.15 RSHELL R port=1004 etc/init.d/xntpd sta
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.104 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.101 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.103 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.162 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.161 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.209.3 -> mz_ts1 NTP client (Wed Aug 29 11:51:55 2007)
10.14.208.164 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.163 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
10.14.208.102 -> mz_ts1 NTP client (Thu Feb 7 14:28:16 2036)
可看到N20到外部地址取ntp包,外部主机也以ntp包响应,但ntp服务不正常。只有client到server的包,无回应。
比较棘手,请高手帮忙看看,谢谢! |
|