시간 초과, ntpdc> Loopinfo에서 메시지가 수신되지 않았습니까?

시간 초과, ntpdc> Loopinfo에서 메시지가 수신되지 않았습니까?

이 명령으로 모든 것이 작동하는 것 같습니다ntpq-pn, 이는 나에게 다음을 알려줍니다.

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-184.105.182.7   216.218.254.202  2 u   54   64  377   79.218  -11.053   0.466
+69.195.159.158  208.100.0.228    3 u   65   64  377   36.752   -7.735   0.407
-74.120.81.219   128.138.140.44   2 u   64   64  377   34.972   -1.763  16.977
*45.55.102.31    98.175.203.200   2 u   61   64  377    7.723   -3.781   4.854
+91.189.94.4     193.79.237.14    2 u   60   64  377   79.423   -2.344   0.520

그리고ntpdate -d 192.168.1.231보여줘:

24 Mar 15:40:25 ntpdate[12564]: ntpdate [email protected] Wed Oct  5 12:34:47 UTC 2016 (1)
Looking for host 192.168.1.231 and service ntp
host found : 192.168.1.231
transmit(192.168.1.231)
transmit(192.168.1.231)
transmit(192.168.1.231)
transmit(192.168.1.231)
transmit(192.168.1.231)
192.168.1.231: Server dropped: no data
server 192.168.1.231, port 123
stratum 0, precision 0, leap 00, trust 000
refid [192.168.1.231], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  1:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  1:28:16.000
transmit timestamp:  dc7ff4af.1ec5f659  Fri, Mar 24 2017 15:40:31.120
filter delay:  0.00000  0.00000  0.00000  0.00000 
         0.00000  0.00000  0.00000  0.00000 
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

24 Mar 15:40:33 ntpdate[12564]: no server suitable for synchronization found

마지막 줄에 "동기화에 적합한 서버를 찾을 수 없습니다."그것을 만드는 방법"확립된"

이 명령을 사용하려고 해도국가발전협의회:

root@Lab-X230:/home/igor# ntpdc
ntpdc> peers
localhost: timed out, nothing received
***Request timed out

root@Lab-X230:/home/igor# sudo vim /etc/ntp.conf

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#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

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst

# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.com
server 0.ubuntu.pool.ntp.org iburst
server 1.ubuntu.pool.ntp.org iburst
server 2.ubuntu.pool.ntp.org iburst
server 3.ubuntu.pool.ntp.org iburst

server ntp.ubuntu.com iburst

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
"/etc/ntp.conf" 74L, 2669C                                                                                                                            26,1          Top

#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
#restrict default ignore
#restrict 127.0.0.1 mask 255.255.255.255
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

#Changes recquired to use pps synchonisation as explained in documentation:
#http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3918

#server 127.127.8.1 mode 135 prefer    # Meinberg GPS167 with PPS
#fudge 127.127.8.1 time1 0.0042        # relative to PPS for my hardware

#server 127.127.22.1                   # ATOM(PPS)
#fudge 127.127.22.1 flag3 1            # enable PPS API

지침은 5.1.3.3의 링크를 따라야 합니다. http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ACCURATE-CLOCK, 예를 들어:

 ntpdc> loopinfo

offset:               -0.000102 s
frequency:            16.795 ppm
poll adjust:          6
watchdog timer:       63 s

답변1

ntpq기본적으로 이는 "모드 6"을 사용하는 쿼리와 "모드 7"을 사용하는 쿼리 때문입니다 ntpdc(두 이름 모두 NTP 프로토콜의 필드에서 유래함). 모드 7 쿼리(및 ntpdc) 예기본적으로 더 이상 사용되지 않으며 비활성화되어 있습니다..

ntpq명령을 사용하여 rv모든 정보(및 그 이상)를 제공 kerninfo하십시오 . sysinfo반드시 사용해야 하는 경우 ntpdc모드 7을 다시 활성화할 수 있습니다(위 링크의 지침이지만 과거에는 이것이 보안 문제의 원인이었다는 점에 유의하세요).

에 관해서는 ntpdate -d 192.168.1.231이것이 이 NTP 서버의 IP 주소라고 가정하고 방화벽 규칙을 확인하는 것이 좋습니다. 거기에 없거나 귀하의 구성에 없는 것 같습니다 noserve. ignore또한 이는 ntpdate대부분 더 이상 사용되지 않으며 대체 옵션이 ntpd있습니다 -q.

관련 정보