Skip to content
Wireshark Wiki 中文翻译整理专题首页原始页面

NTP

NTP 用于将网络客户端的时钟与服务器同步。它是 David L. Mills 博士的主要工作。

NTP server(希望)会拥有精确时间(可能直接来自 atomic clock)。NTP client 向 NTP server 询问当前时间,然后会将其 internal clock 调整到该值。调整时钟并不是瞬时完成的,而是随着时间向所选 reference time sources 平滑靠拢。其中涉及大量复杂细节,这些细节在相关 research project 页面中有描述

历史

Wikipedia 文章对该协议有相关介绍。

协议依赖

  • UDP:通常,NTP 使用 UDP 作为其传输协议。NTP 流量的 well known UDP port 是 123。

示例流量

XXX - 在此处添加示例流量(纯文本或 Wireshark 截图)。

Wireshark

NTP dissector 功能完整。

首选项设置

没有与 NTP 相关的首选项设置。

示例捕获文件

  • SampleCaptures/NTP_sync.pcap

  • SampleCaptures/NTP_with_MD5_key_foobar.pcap(MD5 encryption key:"foobar")

显示过滤器

NTP 显示过滤器字段的完整列表可在 display filter reference 中找到

只显示基于 NTP 的流量:

 ntp

捕获过滤器

捕获时不能直接过滤 NTP 协议。不过,你可以对 well known NTP UDP port 123 进行过滤。

只捕获基于 NTP 的流量:

 udp port 123

在许多系统上,你可以使用 "udp port ntp",而不是 "udp port 123"。

外部链接

当前 RFC:

  • RFC 5905Network Time Protocol Version 4: Protocol and Algorithms Specification

已废止的 RFC:

  • RFC 958Network Time Protocol

  • RFC 1059Network Time Protocol (Version 1) Specification and Implementation

  • RFC 1119Network Time Protocol (Version 2) Specification and Implementation

  • RFC 1305Network Time Protocol (Version 3) Specification, Implementation and Analysis

其他信息:

  • ntp.org Network Time Protocol 主页

  • Mills 的 NTP 站点 Network Time Synchronization Research Project

  • pool.ntp.org 你也许应该使用的 time server

  • Wikipedia 上的 NTP——不错的概览

讨论

注意:在 WinXP 上,必须停止“Windows Time”服务,NTP packet 才能被传递到 stack 上层并对 Wireshark 可见。

导入自 https://wiki.wireshark.org/NTP ,时间为 2020-08-11 23:17:35 UTC

相关 Wireshark Wiki 页面

网络分析技术档案