为什么 SCTP 没有被广泛使用/了解

发布于 2024-07-29 02:42:32 字数 492 浏览 7 评论 0原文

我最近查阅了 Richards Stevens 和我发现除了 TCP 和 UDP 之外还有第三个传输层标准:SCTP

简介: SCTP 是一种传输层协议,它像 UDP 一样是消息驱动的,但又像 TCP 一样可靠。 以下是 IBM DeveloperWorks 的简短介绍

老实说,我以前从未听说过 SCTP。 我不记得在任何网络书籍中读到过它或在我参加的课程中听说过它。 阅读提到 SCTP 的其他 stackoverflow 问题表明我并不是唯一一个缺乏知识的人。

为什么 SCTP 如此不为人知? 为什么用得不多?

I recently checked out the book "UNIX Network Programming, Vol. 1" by Richards Stevens and I found that there is a third transport layer standard besides TCP and UDP: SCTP.

Summary: SCTP is a transport-level protocol that is message-driven like UDP, but reliable like TCP. Here is a short introduction from IBM DeveloperWorks.

Honestly, I have never heard of SCTP before. I can't remember reading about it in any networking books or hearing about it in classes I had taken. Reading other stackoverflow questions that mentions SCTP suggests that I'm not alone with this lack of knowledge.

Why is SCTP so unknown? Why is it not much used?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

地狱即天堂 2024-08-05 02:42:33

阅读 SCTP 维基百科页面 我想说主要原因是 SCTP 还很年轻协议(2000 年提出),目前主流操作系统(WindowsOS XLinux)不支持。

如果“非常年轻”对您来说似乎不合适,请考虑 IPV6:“2008 年 12 月,尽管IPv6 正值其作为标准跟踪协议诞生 10 周年,但就全球范围内的普遍部署而言,IPv6 还处于起步阶段。”

Reading the SCTP Wikipedia page I'd say that the main reason is that SCTP is a very young protocol (proposed in 2000) that is currently unsupported by the mainstream OSs (Windows, OS X, Linux).

If "very young" seems inappropriate to you, think about IPV6: "in December 2008, despite marking its 10th anniversary as a Standards Track protocol, IPv6 was only in its infancy in terms of general worldwide deployment."

银河中√捞星星 2024-08-05 02:42:33

SCTP 广泛用于 4G LTE 网络,其中 Diameter 用于 AAA。

SCTP is used extensively in the 4G LTE network where Diameter is used for AAA.

奶茶白久 2024-08-05 02:42:33

参考有关商业路由器损坏或缺乏 SCTP 支持的所有评论,问题是带有 NAT 的 SCTP 仍处于 IETF 的草案形式。 所以没有 RFC 规范供他们实现。

https://datatracker.ietf.org/doc/html/草案-ietf-behave-sctpnat-09

In reference to all of the comments about commercial routers being broken or lacking SCTP support, the issue is that SCTP with NAT is still in draft form with the IETF. So there is no RFC specification for them to implement it.

https://datatracker.ietf.org/doc/html/draft-ietf-behave-sctpnat-09

情归归情 2024-08-05 02:42:33

它可能不太为人所知,但并非没有使用过。 最近有一个草案发布于IETF 关于使用 SCTP 作为 HTTP 的传输层协议

It might not be well known, but it's not unused. Quite recently there was a draft published at the IETF about Using SCTP as a Transport Layer Protocol for HTTP.

浪推晚风 2024-08-05 02:42:33

sctp诞生得太晚了,对于很多情况TCP就足够了。

另外,据我所知,它的大部分用途是在电信领域。

Sctp is born too late, and for many situation TCP is enough.

Also, as I know most of its usage is on telecommunication area.

猫烠⑼条掵仅有一顆心 2024-08-05 02:42:32

事实上,SCTP 主要用于电信领域。 传统上,电信交换机使用 SS7(7 号信令系统)来互连电信网络中的不同实体。 例如-电信提供商的用户数据库(HLR),与交换机(MSC),用户也连接(MSC)。

电信领域正在转向更高速度和更可达的环境。 这些变化之一是用一些更优雅、快速和灵活的基于 IP 的协议来取代 SS7 协议。

电信领域非常保守。 SS7 网络已经在这里使用了几十年。 这是一个非常可靠且封闭的网络。 这意味着普通用户无法访问它。

相比之下,IP 网络是开放的且不可靠,如果它不能至少处理 SS7 处理的负载,电信公司就不会转换到它。 这就是开发 SCTP 的原因。 它试图:

  • 模仿SS7网络几十年来积累的所有优点。
  • 创建一个在速度、安全性和冗余方面优于 TCP 的面向连接的协议

Linux 的最新版本已经支持 SCTP。

Indeed, SCTP is used mostly in the telecom area. Traditionally, telecom switches use SS7 (Signaling System No. 7) to interconnect different entities in the telecom network. For example - the telecom provider's subscriber data base(HLR), with a switch (MSC), the subscriber is connected too (MSC).

The telecom area is moving to higher speeds and more reachable environment. One of these changes is to replace SS7 protocol by some more elegant, fast and flexible IP-based protocol.

The telecom area is very conservative. The SS7 network has been used here for decades. It is very a reliable and closed network. This means a regular user has no access to it.

The IP network, in contrast, is open and not reliable, and telecoms will not convert to it if it won't handle at least the load that SS7 handles. This is why SCTP was developed. It tries:

  • to mimic all advantages of the SS7 network accumulated over the decades.
  • to create a connection-oriented protocol better than TCP in speed, security, and redundancy

The latest releases of Linux already have SCTP support.

轮廓§ 2024-08-05 02:42:32

我们现在已经在多个应用程序中部署了 SCTP,并且在各种家用路由器中遇到了 SCTP 支持的重大问题。 他们根本就没有正确处理 SCTP。 我认为这主要是一个性能问题(SCTP 协议规范要求重新计算整个数据包的校验和,而不仅仅是标头)。

与许多其他有前途的协议一样,在 D-link 和 Netgear 修复其破损的 NAT 盒之前,SCTP 不幸地陷入了困境。

We have been deploying SCTP in several applications now, and encountered significant problem with SCTP support in various home routers. They simply don't handle SCTP correctly. I believe this is primarily a performance issue (the SCTP protocol specification require checksums for the whole packets to be recalculated and not just for headers).

Like many other promising protocols SCTP is sadly dead in the water until D-link and Netgear fixes their broken NAT boxes.

心作怪 2024-08-05 02:42:32

SCTP 并不是很为人所知,也没有被大量使用/部署,因为:

  • 广泛传播:没有广泛集成在 TCP/IP 堆栈中(2013 年:在最新的 Mac OSX 和 Windows 中仍然缺少本机。2020 更新:仍然不在 Windows 和 Mac OS X 中)
  • 库:很少有易于使用的语言的高级绑定(免责声明:我是 pysctp、SCTP 的维护者对 Python 的简单堆栈支持)
  • NAT:不能很好/根本无法跨越 NAT(不到 1% 的互联网家庭和企业路由器在 SCTP 上执行 NAT)。
  • 流行度:没有一般的公共应用程序使用它
  • 编程范式:它改变了一点:它仍然是一个套接字,但您可以将许多主机连接到许多主机(多宿主),数据报是有序且可靠的,呃……
  • 复杂性:SCTP 堆栈很复杂实施(由于上述原因)
  • 竞争:多路径 TCP 即将到来,应该满足多宿主需求/功能,因此人们如果可能的话,不要实施 SCTP,等待 MTCP
  • 利基:需要 SCTP 填充非常特殊(有序可靠数据报、多流)并且不需要安全
  • 性:SCTP 逃避安全控制(一些防火墙、大多数 IDS、所有 DLP,除了 CentOS/Redhat/Fedora 之外,不会出现在 netstat 上……)
  • 可审计性:世界上有 3 家公司定期对 SCTP 进行审计安全性(免责声明:我在其中之一工作)
  • 学习曲线:没有太多工具链可以使用 SCTP(查看优秀的 withsctp 与 netcat 很好地结合或使用 socat,2020 编辑:nmap 支持它已经好几年了)
  • 底层:主要用于电信,每次发送短信时,开始冲浪在您的手机上上网或拨打电话时,您经常会触发通过 SCTP 传输的消息(SIGTRAN/SS7 与 GSM/UMTS、Diameter 与 LTE/IMS/RCS、S1AP/X2AP 与 LTE),因此您实际上使用它很多,但你永远不知道;-) 2020 年编辑:它将从核心 5G 网络中删除(不再使用直径,改为 HTTP/2),并且仅用于天线和核心之间的 5G 无线电接入网络。

SCTP is not very much known and not used/deployed a lot because:

  • Widespread: Not widely integrated in TCP/IP stacks (in 2013: still missing natively in latest Mac OSX and Windows. 2020 update: still not in Windows nor Mac OS X)
  • Libraries: Few high level bindings in easy to use languages (Disclaimer: i'm maintainer of pysctp, SCTP easy stack support for Python)
  • NAT: Doesn't cross NAT very well/at all (less than 1% internet home & enterprise routers do NAT on SCTP).
  • Popularity: No general public app use it
  • Programming paradigm: it changed a bit: it's still a socket, but you can connect many hosts to many hosts (multihoming), datagram is ordered and reliable, erc...
  • Complexity: SCTP stack is complex to implement (due to above)
  • Competition: Multipath TCP is coming and should address multihoming needs / capabilities so people refrain from implementing SCTP if possible, waiting for MTCP
  • Niche: Needs SCTP fills are very peculiar (ordered reliable datagrams, multistream) and not needed by much applications
  • Security: SCTP evades security controls (some firewalls, most IDSes, all DLPs, does not appear on netstat except CentOS/Redhat/Fedora...)
  • Audit-ability: Something like 3 companies in the world routinely do audits of SCTP security (Disclaimer: I work in one of them)
  • Learning curve: Not much toolchain to play with SCTP (check the excellent withsctp that combines nicely with netcat or use socat, 2020 edit: nmap supports it for a few years now )
  • Under the hood: Used mostly in telecom and everytime you send SMS, start surfing the net on your mobile or make phone calls, you're often triggering messages that flow over SCTP (SIGTRAN/SS7 with GSM/UMTS, Diameter with LTE/IMS/RCS, S1AP/X2AP with LTE), so you actually use it a lot but you never know about it ;-) 2020 edit: it's being removed from the core 5G network (no more Diameter, HTTP/2 instead) and will be only used in the 5G radio access network between antennas and core.
梦境 2024-08-05 02:42:32

SCTP 需要在应用程序中进行更多设计才能充分利用它。 比 TCP 有更多的选择,类似 Sockets 的 API 出现得更晚,而且还很年轻。 然而,我认为大多数花时间理解它的人(并且知道 TCP 的缺点)都会欣赏它——它是一个设计良好的协议,建立在我们大约 30 年的 TCP 和 UDP 知识之上。

需要思考的方面之一是流。 流在其中提供(通常,我认为您可以将其关闭)顺序保证(很像 TCP 连接),但每个 SCTP 连接可以有多个流。 如果您的应用程序的数据可以通过多个流发送,那么您就可以避免队头阻塞,即接收器因一个丢失的数据包而陷入饥饿状态。 实际上,可以通过同一连接进行不同的对话,而不会相互影响。

另一个有用的补充是多宿主支持——一个连接可以跨越两端的多个接口,并且可以处理故障。 您可以在 TCP 中模拟这一点,但是是在应用程序层。

适当的链路检测信号是任何使用 TCP 进行非瞬时连接的应用程序实现的第一件事,并且是免费的。

我个人对 SCTP 的总结是,它不会做任何其他方式(TCP 或 UDP)做不到的事情,并且有大量的应用程序支持。 它提供的功能是不必自己(糟糕地)实现该代码。

仅供参考,SCTP 被强制要求支持 Diameter(参见下一代 RADIUS)。 参见 RFC 3588

   Diameter clients MUST support either TCP or SCTP, while agents and
   servers MUST support both.  Future versions of this specification MAY
   mandate that clients support SCTP.

SCTP requires more design within the application to get the best use of it. There are more options than TCP, the Sockets-like API came later, and it is young. However I think most people that take the time to understand it (and who know the shortcomings of TCP) appreciate it -- it is a well designed protocol that builds on our ~30 years of knowledge of TCP and UDP.

One of the aspects that requires some thought is that of streams. Streams provide (usually, I think you can turn it off) an order guarantee within them (much like a TCP connection) but there can be multiple streams per SCTP connection. If your application's data can be sent over multiple streams then you avoid head-of-line blocking where the receiver starves due to one mislaid packet. Effectively different conversations can be had over the same connection without impacting each other.

Another useful addition is that of multi-homing support -- one connection can be across multiple interfaces on both ends and it copes with failures. You can emulate this in TCP, but at the application layer.

Proper link heartbeating, which is the first thing any application using TCP for non-transient connections implements, is there for free.

My personal summary of SCTP is that it doesn't do anything you couldn't do another way (in TCP or UDP) with substantial application support. The thing it provides is the ability to not have to implement that code (badly) yourself.

FYI, SCTP is mandated as supported for Diameter (cf RADIUS next gen). see RFC 3588

   Diameter clients MUST support either TCP or SCTP, while agents and
   servers MUST support both.  Future versions of this specification MAY
   mandate that clients support SCTP.
GRAY°灰色天空 2024-08-05 02:42:32

p1。 直接映射到 IPv4 上的 SCTP 需要 NAT 网关的支持,而 NAT 网关从未在任何地方广泛部署过,如果没有它,典型的 NAT 网关将只允许每个公共地址一次使用一台私有主机。

p2。 通过 UDP/IPv4 映射的 SCTP 允许每个公共地址有更多的私有主机,但众所周知,IPv4/NAT 网关中的 UDP 映射很难建立和维护,因为 UDP 是一种无连接传输,没有任何明确的状态供 NAT 跟踪。

p3。 直接映射到 IPv6 上的 SCTP 需要……嗯……IPv6。 您尝试过部署 IPv6 吗? 如果是这样,您是否尝试过购买 IPv6 防火墙? 支持SCTP吗? 负载均衡器怎么样? SSL 加速器?

p4。 最后,互联网上的许多内容几乎都受到 TCP 端口 80 和端口 443 的限制,因此任何类型的 SCTP 往往都会在这些方面失败。 因此,您会看到 IETF 中的 MPTCP 工作组所做的努力。

p1. SCTP mapped directly over IPv4 requires support in NAT gateways, which has never been widely deployed anywhere, and without it the typical NAT gateway will only permit one private host per public address to be using SCTP at a time.

p2. SCTP mapped over UDP/IPv4 allows more private hosts per public address, but UDP mappings in IPv4/NAT gateways are notoriously tricky to establish and keep maintained, due to the fact that UDP is a connectionless transport without any explicit state for a NAT to track.

p3. SCTP mapped directly over IPv6 requires... well... IPv6. Have you tried to deploy IPv6? If so, have you tried to buy an IPv6 firewall? Does it support SCTP? How about a load balancer? A SSL accelerator?

p4. Finally, a lot of the Internet is pretty much constrained to what can fit through TCP port 80 and port 443, so SCTP of any flavor tends to lose there. Hence, you see efforts like the MPTCP working group in IETF.

ι不睡觉的鱼゛ 2024-08-05 02:42:32

我们中的许多人很快就会使用 SCTP,因为 WebRTC 数据通道使用它在 UDP 之上创建类似 TCP 的可靠层 - SCTP over DTLS over UDP:https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-data-channel -13#section-6

Many of us will be using SCTP soon, since it's used by WebRTC datachannels to create a TCP-like reliable layer on top of UDP -- SCTP over DTLS over UDP: https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-data-channel-13#section-6

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文