I see the same thing as you, so please forgive the naive question: why are so many trying to turn the internet into TCP with some UDP at best, TCP/443 only at worst? Like, what's to gain? I understand that the owners of popular websites have a lot to gain by turning the internet into cable television, but what do the network operators stand to gain?
First of all, TCP has problems (much complexity, poor window management, poor congestion control / ramp up in modern networks, etc). Second of all, if you want to optimize the number of messages needed to start protocols like TLS over TCP then you need a new protocol, and that's what QUIC is. So, yes, there are reasons to build replacements for TCP.
I would suggest that you (and the downvoters) re-read the comment more carefully. It's not asking why other protocols exist, it's asking why network operators don't want to support them.
Large corporate/institutional IT departments don't need to support anything outside of "web browsing", and have to answer to insurance/regulatory requirements for things like "terminate unknown traffic at the security boundary" and "monitor all users for suspicious activities". They buy drop-in security appliances so they can easily check the compliance boxes. These appliances are slow to evolve and the people involved have little incentive to allow protocol flexibility, since it just complicates their lives. This isn't the only reason, but it is one of the bigger ones.
This library is a bit outdated when it comes to keeping up with the newer specs.
I’d recommend Pion’s SCTP library instead if you okay with Go, since they try to incorporate the latest research as best they can: https://github.com/pion/sctp
If rust is more your speed, there is also SCTP-proto that’s used by a couple of other WebRTC implementations , but that lacks some of more recent RFCs for SCTP: https://github.com/webrtc/dcsctp
There is also an official Google rewrite in rust for their SCTP library that will eventually be included in libwebrtc (though I don’t think anyone actually uses it yet): https://github.com/webrtc/dcsctp
Also, fair warning for those wanting to use dcsctp for regular SCTP purposes, the library aims to only implement the WebRTC focused subset. It's a great library for that purpose, whether you use the original C++ version or newer experimental Rust version.
Over ipv6 with some tweaks Sctp has a chance … sadly most of the use cases for SCTP and the people that have them have this bizarre definition of “dual-stack” that I’ve never actually seen work on anything other than a router.
maybe we’ve rolled out enough ipv6 to make this work?
This is particularly a challenge in public cloud hosted Kubernetes environments, CNI's with ipv4 just arent SCTP friendly.
Interestingly though ... there may be some applicability for it as a part of LLM.
> SCTP was originally designed to transport Public Switched Telephone Network (PSTN) signaling messages over IP networks. It is also suited to be used for other applications, for example, WebRTC.
There is a bit more to it than that. There are a few properties that had telecoms drive SCTP standards and adoption. The head of line blocking you mentioned iirc is optional. So the application can control in order delivery. Another one is binding to more than one network. Many telecoms for essential equipment have two networks and the hosts can fail on one and retry on another. TCP has mTCP but still with blocking and doesn’t have wide availability to be exposed to applications.
I have a huge soft spot for SCTP, I think it's a wonderful protocol.
It's such a fun/clever hack that you can run it over UDP as well. It felt the best case for both worlds.
I wrote a little bit about it here[0] I am still hoping to interview one of the protocol authors. It would be cool to hear the motivations, hopes and compromises it took to make it happen.
Is it a hack, or is it an attempt to correct the fatal mistake of the protocol? Running SCTP directly off the top of IP was such a weird decision. This is literally the reason UDP exists: to make it possible to create arbitrary new IP protocols! And they eschewed it, and it became undeployable.
IP is designed to handle more than two data transport protocols. It's such a weird decision that the power that be won't let us use the internet as intended.
What is the virtue of wasting throughput? You need to actually characterize why there is a technical benefit to the cost rather than demanding others prove the negative.
And just to clarify a potential line of argument, arguing that we have ossification and thus running over UDP is the only practical solution for adoption, while correct, is not a benefit to disallowing other protocols to run directly on top of IP. It is a consequence.
What wasted throughput? You could say the same thing about any number of fields in the IP header itself. The question is "what does direct IP get you that UDP doesn't get you". This was, as I keep saying, the original design purpose of UDP.
Arguably, TCP should have been built atop UDP.
The thing to notice is that, apart from the checksum field --- which SCTP has as well, albeit with a different checksum --- UDP doesn't do anything but multiplex. It has no practically no mechanism that IP itself lacks, and vice versa.
Again, the backwards question. The actual question is: “What does UDP get you that IP does not get you?”
UDP is just a length, checksum, source, and destination application routing address. IPv4 has a length, checksum, source, and destination machine routing address. IPv6 has a length, source, and destination machine routing address (having determined computing the checksum at this layer is a waste).
They hold the same class of information except that layering UDP gives you a additional 16-bits of routing on top of your IP routing which is somewhat relevant for IPv4, but meaningless for IPv6. And the additional routing bits for IPv4 should have always been resolved at the IP routing layer anyways which is exactly what IPv6 did (though done poorly in my opinion, but at least solved the need for more bits).
Flexible usage of UDP for higher level protocols effectively uses the destination port as the “Next Header” field present in IP protocols. The only advantage there is it is a 16-bit format identifier instead of 8-bit, but now the field is doing double duty as a application-level routing address and a format identifier. Placing a subsequent format identifier in the UDP payload then extends your format identifier further, but at least mostly preserves the application-level routing model of the destination port. If you actually need the extra formats then IP can easily reserve a few format values to indicate a even wider format identifier immediately afterward.
I feel like you're making my case for me. You lose nothing by building on top of UDP. You gain (marginally) flexibility, since UDP has a larger multiplexing ID (and since userland on mainstream operating systems can program it directly), and you gain (massively) deployability --- which is why we have mainstream HTTP/3 deployments, and virtually no SCTP at all outside of private telecom use cases.
Only if you think that spending 8 extra bytes to get 1 extra byte of format identifier is making your case for you. Just to make it really, really obvious, doing it directly on top of IP would cost like 1, maybe 2 extra bytes to get 1 extra byte of format identifier. Strictly inferior to the alternative on a technical level. And that is ignoring the extra cost of adding a extra checksum, a cost so not worth it that IPv6 decided to remove it from the header format even though it was present in IPv4.
The only compelling argument is deployability, but, as I clearly pointed out above, that is a invalid argument because it is a consequence of the decision to ban anything other than TCP and UDP. Arguing that using UDP is the best choice because using anything else is banned is circular reasoning at its finest. As I also acknowledged above it is the state of the world right now and it is what you need to do to get deployed, but it is not a technical argument in favor of that technical decision. It is a terrible technical decision being propped up by ossification.
You're just saying the same things over again. I especially like the accounting you did with the header bytes to avoid acknowledging UDP has 32 bits of multiplexing ID to IP's 8. I don't grant the premise that these are meaningful size differences to begin with, but if we're playing that game, we can golf a bunch of stuff out of the IP header too.
You also skated past half the deployability argument. It's not just that basically every middlebox on the Internet, old and new, will refuse to forward martian IPPROTO datagrams. It's also that every mainstream operating system prevents normal programs from programming IP directly.
All this drama... to save, like, 3-6 bytes? Yeah, seems like a pretty bad trade.
SCTP is widely used in telecom, i.e. SIGTRAN and the way your cell phone interoperates on the backend. The telecom industry is a parallel universe, they aren't really bothered by complexity sometimes for better sometime for worse.
No, that's not why UDP exists. Transport protocols _in principle_ should be the next layer after IP, but too many middleboxes drop packets for transport protocols they don't support. SCTP over UDP exists because of that. The fact that one can run anything over UDP merely proves that middleboxes really have no business dropping packets for ULPs they don't recognize/support. In fact, middleboxes are expected to pass these things through!
It prominently appears in W. Richard Stevens' "UNIX Network Programming" which I learned C and sockets programming from. So I have exercises written using SCTP - I forget what libraries I used at the time. Most of my work was on a FreeBSD VM, I think - and I might have installed a userland Linux library for it.
I can't be the only one who knows it for this exact reason...
throw0101d | 10 hours ago
* https://en.wikipedia.org/wiki/Protocol_ossification
Sean-Der | 9 hours ago
I am curious if QUIC will hit a wall with requiring UDP. You have some network operators that refuse to support anything but TCP on set ports.
ronsor | 9 hours ago
Just deploy and let them whine.
throw0101c | 8 hours ago
* https://datatracker.ietf.org/doc/html/rfc6951
gspr | 5 hours ago
cryptonector | 3 hours ago
kbolino | 2 hours ago
kbolino | 2 hours ago
valorzard | 10 hours ago
I’d recommend Pion’s SCTP library instead if you okay with Go, since they try to incorporate the latest research as best they can: https://github.com/pion/sctp
If rust is more your speed, there is also SCTP-proto that’s used by a couple of other WebRTC implementations , but that lacks some of more recent RFCs for SCTP: https://github.com/webrtc/dcsctp
There is also an official Google rewrite in rust for their SCTP library that will eventually be included in libwebrtc (though I don’t think anyone actually uses it yet): https://github.com/webrtc/dcsctp
Orphis | 5 hours ago
Also, fair warning for those wanting to use dcsctp for regular SCTP purposes, the library aims to only implement the WebRTC focused subset. It's a great library for that purpose, whether you use the original C++ version or newer experimental Rust version.
happyPersonR | 10 hours ago
maybe we’ve rolled out enough ipv6 to make this work?
This is particularly a challenge in public cloud hosted Kubernetes environments, CNI's with ipv4 just arent SCTP friendly.
Interestingly though ... there may be some applicability for it as a part of LLM.
joshuanapoli | 10 hours ago
> SCTP was originally designed to transport Public Switched Telephone Network (PSTN) signaling messages over IP networks. It is also suited to be used for other applications, for example, WebRTC.
https://www.rfc-editor.org/info/rfc9260/
It looks meant for applications that don’t need TCP’s strict in-order delivery and want to avoid its head-of-line blocking.
kevin_nisbet | 9 hours ago
tptacek | 8 hours ago
Sean-Der | 9 hours ago
It's such a fun/clever hack that you can run it over UDP as well. It felt the best case for both worlds.
I wrote a little bit about it here[0] I am still hoping to interview one of the protocol authors. It would be cool to hear the motivations, hopes and compromises it took to make it happen.
[0] https://webrtcforthecurious.com/docs/07-data-communication
tptacek | 8 hours ago
kevin_thibedeau | 8 hours ago
IP is designed to handle more than two data transport protocols. It's such a weird decision that the power that be won't let us use the internet as intended.
tptacek | 8 hours ago
Veserv | 7 hours ago
And just to clarify a potential line of argument, arguing that we have ossification and thus running over UDP is the only practical solution for adoption, while correct, is not a benefit to disallowing other protocols to run directly on top of IP. It is a consequence.
tptacek | 6 hours ago
Arguably, TCP should have been built atop UDP.
The thing to notice is that, apart from the checksum field --- which SCTP has as well, albeit with a different checksum --- UDP doesn't do anything but multiplex. It has no practically no mechanism that IP itself lacks, and vice versa.
pwdisswordfishq | 5 hours ago
cryptonector | 3 hours ago
Veserv | 5 hours ago
UDP is just a length, checksum, source, and destination application routing address. IPv4 has a length, checksum, source, and destination machine routing address. IPv6 has a length, source, and destination machine routing address (having determined computing the checksum at this layer is a waste).
They hold the same class of information except that layering UDP gives you a additional 16-bits of routing on top of your IP routing which is somewhat relevant for IPv4, but meaningless for IPv6. And the additional routing bits for IPv4 should have always been resolved at the IP routing layer anyways which is exactly what IPv6 did (though done poorly in my opinion, but at least solved the need for more bits).
Flexible usage of UDP for higher level protocols effectively uses the destination port as the “Next Header” field present in IP protocols. The only advantage there is it is a 16-bit format identifier instead of 8-bit, but now the field is doing double duty as a application-level routing address and a format identifier. Placing a subsequent format identifier in the UDP payload then extends your format identifier further, but at least mostly preserves the application-level routing model of the destination port. If you actually need the extra formats then IP can easily reserve a few format values to indicate a even wider format identifier immediately afterward.
tptacek | 4 hours ago
Veserv | 2 hours ago
The only compelling argument is deployability, but, as I clearly pointed out above, that is a invalid argument because it is a consequence of the decision to ban anything other than TCP and UDP. Arguing that using UDP is the best choice because using anything else is banned is circular reasoning at its finest. As I also acknowledged above it is the state of the world right now and it is what you need to do to get deployed, but it is not a technical argument in favor of that technical decision. It is a terrible technical decision being propped up by ossification.
tptacek | 2 hours ago
You also skated past half the deployability argument. It's not just that basically every middlebox on the Internet, old and new, will refuse to forward martian IPPROTO datagrams. It's also that every mainstream operating system prevents normal programs from programming IP directly.
All this drama... to save, like, 3-6 bytes? Yeah, seems like a pretty bad trade.
Sean-Der | 6 hours ago
You also have to double checksum, that can be disabled with SCTP selectively now!
----
I am just a hobbyist though. I would be curious to hear the take of a big network operator.
kev009 | 4 hours ago
xorcist | 5 hours ago
tptacek | 2 hours ago
cryptonector | 3 hours ago
tptacek | 2 hours ago
atribecalledqst | 6 hours ago
I can't be the only one who knows it for this exact reason...
boguscoder | 6 hours ago