# 简单服务发现协议

**简单服务发现协议**（Simple Service Discovery Protocol，SSDP）是一种基于文本的网络协议，用于在局域网中通告和发现服务与设备，最广为人知的身份是[通用即插即用](https://www.edgepedia.org/zh/universal-plug-and-play)（Universal Plug and Play，UPnP）的发现层。它运行于 UDP 之上，使操作系统和应用程序能够通过发出查询来动态发现服务，匹配的服务则回应以其网络位置及通信所需的协议；服务也可以未经请求主动宣告自己的存在。<sup>[1](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)</sup>

| 关键事实 | 详情 |
|---|---|
| 首个规范 | 互联网草案 draft-cai-ssdp-v1-00，1999 年 2 月 26 日，作者为蔡、利奇、顾和戈兰<sup>[1](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)</sup> |
| 范围 | 仅执行发现；服务描述与协商交由更高层的、服务特定的协议处理<sup>[1](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)</sup> |
| 在 UPnP 中的角色 | UPnP 设备架构的发现协议，使用 NOTIFY（ssdp:alive、ssdp:byebye、ssdp:update）和 M-SEARCH 消息<sup>[2](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)</sup> |
| 传输 | 通告和搜索请求使用 UDP 组播，响应使用单播；由于 UDP 不可靠，控制点应多次发送每条 M-SEARCH<sup>[3](https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0-20140901.pdf)</sup> |
| 放大系数 | 在一项为期十五个月、涉及三个国家的测量研究中，针对特定类型的 SSDP 查询测得约为 41 至 73<sup>[4](https://www.sciencedirect.com/science/article/pii/S2214212622000539)</sup> |
| 攻击规模 | SSDP 反射攻击中已观测到高达 26 倍的带宽放大，攻击流量超过 100 Gbps<sup>[5](https://cosicdatabase.esat.kuleuven.be/backend/publications/files/these/377)</sup> |
| 采用情况 | 用于媒体服务器、智能电视等 UPnP 设备，也被 SAT>IP 用于卫星 IP 接收器发现<sup>[6](https://github.com/ebu/dtt2ip/blob/master/docs/discovery-sm.md)</sup> |

## 起源与设计

SSDP 由蔡元斌（Yuanbin Cai）、保罗·利奇（Paul Leach）、顾（Gu）和亚龙·戈兰（Yaron Goland）在 1999 年 2 月 26 日的一份互联网草案中提出。该草案指出，SSDP 仅执行发现，任何附加的服务描述或协商均交由更高层的、服务特定的协议处理。SSDP 使操作系统和应用程序能够通过发出查询来动态发现网络上支持该协议的服务；匹配的服务回应以可达的网络地址和协议，它们也可以未经请求主动宣告自身。<sup>[1](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)</sup> 草案将 SSDP 服务器定义为代表一个或多个服务提供者通告服务并回答查询的资源，将 SSDP 客户端定义为定位感兴趣服务的资源。<sup>[1](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)</sup>

该协议与 UPnP 一同问世。微软于 1999 年 1 月 7 日在消费电子展上推出通用即插即用，作为一项倡议，旨在让智能消费电器与个人电脑以对等方式连接并在家庭中共享资源。<sup>[7](https://news.microsoft.com/source/1999/01/07/microsoft-introduces-universal-plug-and-play-initiative-to-help-consumers-get-more-from-new-and-existing-home-electronics/)</sup> UPnP 论坛——一个由 700 多家厂商组成的协会——于 1999 年 10 月 18 日成立，SSDP 成为 UPnP 所使用的发现协议。<sup>[8](https://cse.usf.edu/~kchriste/upnp/thesis/thesis.pdf)</sup>

## 在 UPnP 中的运作

在 UPnP 设备架构中，SSDP 承载两类流量：通告和搜索。<sup>[2](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)</sup>

**通告。** 设备组播 NOTIFY 消息，包含三种通知子类型：设备可用时的 ssdp:alive，设备不可用时的 ssdp:byebye，以及 UPnP 2.0 中新增的 ssdp:update——当多宿主设备新增一个支持 UPnP 的接口并增大其 BOOTID.UPNP.ORG 字段值时使用。<sup>[2](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)</sup> 通告携带必需的头部字段，包括 NT（通知类型）、NTS（通知子类型）、USN（唯一服务名），以及一个 SERVER 字段，其值以 HTTP/1.1 风格的产品标记开头：操作系统表示为操作系统名/操作系统版本，UPnP 版本如 UPnP/2.0，产品表示为产品名/产品版本。<sup>[3](https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0-20140901.pdf)</sup> 通告会过期；只有当根设备、其嵌入设备及其服务的所有原始通告均已过期后，控制点才能认定它们在该接口或 IP 地址上不再可用。<sup>[2](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)</sup>

**搜索。** 控制点组播携带 ST（搜索目标）头部的 M-SEARCH 请求。设备的响应取决于 ST 值：对于 ssdp:all，一个有 d 个嵌入设备、s 个嵌入服务但只有 k 种不同服务类型的根设备会响应 3+2d+k 次；对于 upnp:rootdevice，它响应一次；对于特定设备 UUID，它为该设备响应。<sup>[3](https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0-20140901.pdf)</sup> 由于 UDP 的不可靠性，控制点应多次发送每条 M-SEARCH 消息作为补救。<sup>[3](https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0-20140901.pdf)</sup>

发现之后，控制点通过 HTTP 获取设备描述文档，并继续进行 UPnP 的描述、控制和事件通知，这些均通过 HTTP、SOAP 和 XML 在 IP 之上运行。<sup>[9](https://euprojects.netcom.it.uc3m.es/5g-coral/wp-content/uploads/2018/06/D3.19802.pdf)</sup>

## 实现与用途

[微软 Windows](https://www.edgepedia.org/zh/microsoft-windows) 包含一个 SSDP 提供程序，这是一个异步的功能发现提供程序，使用 SSDP 进行发现以枚举 UPnP 设备；一旦发现设备，该提供程序便获取并处理设备描述文档，并返回一个表示根设备的功能实例。它实现了 SID_PNPXServiceCollection 和 SID_UPnPActivator 服务，并有从 [Windows Vista](https://www.edgepedia.org/zh/windows-vista) 到 [Windows Server 2012](https://www.edgepedia.org/zh/windows-server-2012) 和 Windows 8 的文档记载。<sup>[10](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/fundisc/ssdp-provider)</sup>

除个人电脑外，SSDP 还是消费类媒体设备的发现机制，如 Chromecast 风格的投屏目标和 DLNA 媒体服务器；欧洲广播联盟的 SAT>IP 规范依赖 UPnP 设备架构 1.1 中定义的 SSDP 来发现卫星 IP 服务器。<sup>[6](https://github.com/ebu/dtt2ip/blob/master/docs/discovery-sm.md)</sup>

## 安全：放大攻击

SSDP 对 UDP 的依赖及其请求-响应不对称性，使开放的 SSDP 服务可被用作基于反射的流量型分布式拒绝服务攻击中的反射器——攻击者发送一个小的伪造请求，受害者的地址便被放大的响应所淹没。<sup>[4](https://www.sciencedirect.com/science/article/pii/S2214212622000539)</sup> 一项大型测量研究在十五个月内扫描了两大洲三个国家的全国 IP 地址空间，按类型和操作系统对发现的设备进行特征识别，并用精心构造的查询估算放大系数。对于 SSDP，特定类型查询的放大系数在约 41 至 73 之间，与 DNS 放大相当——DNS 放大的第三四分位数保持在 30 以上，最坏情况下可达 70。<sup>[4](https://www.sciencedirect.com/science/article/pii/S2214212622000539)</sup> 早期工作报告了高达 26 倍的带宽放大，攻击流量超过 100 Gbps。<sup>[5](https://cosicdatabase.esat.kuleuven.be/backend/publications/files/these/377)</sup>

第二种攻击模式滥用通告而非搜索：攻击者向 UPnP 控制点发送一条精心构造的 NOTIFY 消息，其中包含一个由攻击者控制的描述 URL。<sup>[5](https://cosicdatabase.esat.kuleuven.be/backend/publications/files/these/377)</sup> 对基于 UPnP 的物联网系统更广泛的调查对这些漏洞进行了编目并提出了缓解措施，因为 UPnP 协议在设计时并未考虑安全性。<sup>[11](https://arxiv.org/abs/2011.02587)</sup><sup> • </sup><sup>[5](https://cosicdatabase.esat.kuleuven.be/backend/publications/files/these/377)</sup> 标准的缓解措施是阻止 SSDP 流量离开网络边缘，并在不需要 UPnP 的设备上禁用它。

## 与其他发现协议的关系

SSDP 是若干服务发现协议之一。多播 DNS（mDNS，RFC 6762，2013 年 2 月，作者为苹果公司的 S. Cheshire 和 M. Krochmal）及其配套的基于 DNS 的服务发现提供本地链路上的名称解析与发现，是苹果 Bonjour 的基础；mDNS 使用带抑制机制的多播查询，而非 SSDP 的基于 UDP 的 HTTP 消息格式。<sup>[12](https://datatracker.ietf.org/doc/rfc6762/)</sup> IETF 的服务位置协议（RFC 2165）为互联网上网络服务的发现和选择提供了更早的框架。<sup>[13](https://www.rfc-editor.org/info/rfc2165/)</sup> 蓝牙定义了自己的服务发现协议（SDP），这是一种客户端-服务器协议，其中 SDP 服务器维护描述可用服务的服务记录。<sup>[14](https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-60/out/en/host/service-discovery-protocol--sdp--specification.html)</sup> SSDP 仍然是 UPnP 生态系统的发现层，该生态系统现由开放连接基金会通过 UPnP 设备架构 2.0 规范维护。<sup>[2](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)</sup>

## References

1. [Cai, Leach, Gu, Goland. Simple Service Discovery Protocol/1.0, Internet-Draft draft-cai-ssdp-v1-00, February 26, 1999. IETF Datatracker.](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-00)
2. [UPnP Device Architecture 2.0, April 17, 2020. Open Connectivity Foundation.](https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf)
3. [UPnP Device Architecture 2.0, September 1, 2014. UPnP Forum.](https://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0-20140901.pdf)
4. [Large-scale empirical evaluation of DNS and SSDP amplification attacks. Journal of Information Security and Applications, Volume 66, May 2022.](https://www.sciencedirect.com/science/article/pii/S2214212622000539)
5. [Fuzzing Universal Plug and Play (UPnP). PhD thesis, KU Leuven COSIC.](https://cosicdatabase.esat.kuleuven.be/backend/publications/files/these/377)
6. [Discovery in SAT>IP, dtt2ip documentation. European Broadcasting Union, GitHub.](https://github.com/ebu/dtt2ip/blob/master/docs/discovery-sm.md)
7. [Microsoft Introduces Universal Plug and Play Initiative, January 7, 1999. Microsoft News.](https://news.microsoft.com/source/1999/01/07/microsoft-introduces-universal-plug-and-play-initiative-to-help-consumers-get-more-from-new-and-existing-home-electronics/)
8. [UPnP thesis, University of South Florida, Department of Computer Science and Engineering.](https://cse.usf.edu/~kchriste/upnp/thesis/thesis.pdf)
9. [5G-CORAL deliverable D3.1 describing SSDP and the UPnP protocol stack.](https://euprojects.netcom.it.uc3m.es/5g-coral/wp-content/uploads/2018/06/D3.19802.pdf)
10. [SSDP Provider, Microsoft Learn (previous versions documentation).](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/fundisc/ssdp-provider)
11. [An Overview of UPnP-based IoT Security: Threats, Vulnerabilities, and Prospective Solutions. arXiv:2011.02587.](https://arxiv.org/abs/2011.02587)
12. [RFC 6762: Multicast DNS, S. Cheshire and M. Krochmal, February 2013. IETF.](https://datatracker.ietf.org/doc/rfc6762/)
13. [RFC 2165: Service Location Protocol. RFC Editor.](https://www.rfc-editor.org/info/rfc2165/)
14. [Bluetooth Core Specification, Part B: Service Discovery Protocol (SDP) Specification. Bluetooth SIG.](https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-60/out/en/host/service-discovery-protocol--sdp--specification.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › IP-based service delivery

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/simple-service-discovery-protocol

English original: https://www.edgepedia.org/simple-service-discovery-protocol
