Hacker News new | ask | show | jobs
by zAy0LfpBZLC8mAC 2777 days ago
> But google is big enough to push through that problem

Not really. There are hundreds of millions of home routers deployed that all do NAT. And they all don't support NAT for SCTP. And many do NAT with hardware support, so it's probably not even fixable with a firmware upgrade, which isn't even an option for a ton of unsupported devices anyway.

So, I think encapsulating in UDP is the only realistic option if you want to gain any adoption any time soon.

Also, SCTP has the same problem that TCP has in that the network can look inside the protocol, and thus you would get protocol ossification. While Google does this for selfish reasons, I think it is a really good idea to establish a protocol that is completely opaque to telcos and should ultimately benefit the public. Telcos really don't want to be dumb pipes, and they tend to abuse any power they get, as they have demonstrated time and time again, and the only way to force this issue is by simply making it impossible for them to see or manipulate anything at all. So, while we may have to live with the UDP encapsulation forever, and as stupid as that is, this at least ensures that anyone in the future can trivially invent and deploy new protocols, as it is trivial to masquerade anything at all as QUIC. The adoption of QUIC for the web has the potential to get all ISPs to fix things so that QUIC actually works reasonably reliably over their network. And the fact that as far as the network is concerned it's just UDP packets filled with random data ensures that as long as your new protocol is UDP packets filled with random data, that will work as well, even if you use completely different mechanisms for framing or flow control or multiplexing or whatever.

2 comments

It has taken 20 years to get IPv6 adoption to where it is now. This takes amazing dedication and is a much more fundamental change. Why can't SCTP adoption be a similar long term project? A home router probably has a life span of less than a decade. So it would be realistic to get a majority adoption of SCTP within approximately 15 years if there were a bit of a push in that direction. QUIC has been in the making for 6 years now? SCTP was standardized in 2000. So we could be 6 years into this 15 year project by now instead. And that is not comsidering the time it will take to finish QUIC, build compatible implementations and deploy them.
> It has taken 20 years to get IPv6 adoption to where it is now. This takes amazing dedication and is a much more fundamental change.

It doesn't take any dedication at all, it only takes address exhaustion. Which is precisely why it took so long.

> Why can't SCTP adoption be a similar long term project?

Because there is zero incentive for Telcos.

> QUIC has been in the making for 6 years now?

And QUIC (the Google "prototype") has probably been successfully deployed to more devices than IPv6 by now?

hmm Facebook run their entire internal network on IPv6
Why are you mentioning this?
Why do people keep bringing this up. Here is how you encapsulate any network protocol in UDP.

    void encaps_udp(void *out_buf, void *old_pkt, size_t old_pkt_sz) {

      struct udphdr udp;
      udp.dport = UDP_DEST_PORT;
      udp.sport = UDP_SRC_PORT;
      memcpy(out_buf, &udp, sizeof(udp));
      memcpy(out_buf + sizeof(udp), old_pkt, old_pkt_sz);

    }
(Accounting for memory overflow in the real world of course).

Of course, this encapsulation for SCTP is even standardized in case it wasn't obvious that this is how you encapsulate protocols.

For one, it's not, because PMTUD and stuff.

More importantly: You are missing the point. Great, you have encapsulated your protocol in UDP. Now, what do you notice? Your ISP is throttling your protocol because for some braindead reason their traffic management has categorized it as some sort of unimportant protocol, probably P2P or something. Or they just throttle UDP in general, because who uses UDP besides DNS and VoIP? So, high bandwidth UDP usage is obviously a DoS, and we don't want that! If you are unlucky, maybe they even shut off your server because it is obviously part of a botnet?

OK, so enough people complain to their ISPs that SCTP over UDP doesn't work. What happens? Exactly, ISPs start putting in rules that "recognize SCTP over UDP". So next time you want to try out a new protocol or extend SCTP somehow, you run into the exact same problem.

The difficult part isn't stuffing bytes into UDP packets, the difficult part is making sure it actually works reliably and fast over the public internet.

Everything you wrote about SCTP over UDP applies equally to QUIC
No, it doesn't.

1. While getting telcos to fix their network so that QUIC works optimally might also need some work, it should be easier than for unencapsulated SCTP for the simple reason that (a) there is a relevant proportion of the network that already does work fine with it, so it is easier to blame the bad providers when things don't work so well with some provider that throttles UDP, say, and (b) in the case of simple UDP throttling, QUIC is in competition with VoIP and DNS, which could lead to degradation of those other services, which should increase the pressure to fix things. And in any case, you at least don't need to touch all CPE, only middle boxes within the infrastructure.

2. Probably more improtantly, SCTP is a plain text protocol, so getting it to work over telcos' networks does not help you at all the next time around when you want to evolve protocols. Once the work is done for QUIC, you won't have to do it ever again, because anything new that you could come up with is easily made indistinguishable from QUIC as far as the telco is concerned.

> SCTP is a plain text protocol,

There's an old phrase: better to keep your mouth shut and be assumed a fool, than to open it and remove all doubt.

SCTP is not a plain text protocol. I'm not sure how you managed to convince yourself of this one.

Here is the bit-by-bit format of the SCTP header, in case you were ever confused again:

https://tools.ietf.org/html/rfc4960#section-3.1

In the above post, I was talking about SCTP over UDP, which is an IETF standard already. You have moved the goal posts by talking about unencapsulated SCTP. We all agree that this is a tough problem. However, QUIC is also encapsulated over UDP, and when encapsulated, has the same advantages / disadvantages as SCTP over UDP.

SCTP over UDP over DTLS already constitutes a good portion of web traffic, since WebRTC (and hence technologies like hangouts, facebook video messaging, etc) is based on it.

> SCTP is not a plain text protocol. I'm not sure how you managed to convince yourself of this one.

> Here is the bit-by-bit format of the SCTP header, in case you were ever confused again:

> https://tools.ietf.org/html/rfc4960#section-3.1

I can not find there a single hint that anything is encrypted, and I would have been very surprised if I had. The security considerations do even explicitly acknowledge that it's up to the application to encrypt the payload if it wants to.

> In the above post, I was talking about SCTP over UDP, which is an IETF standard already. You have moved the goal posts by talking about unencapsulated SCTP.

No, I simply covered that case as well because SCTP on IP was mentioned as a supposedly viable alternative in this discussion as well, which supposedly would be preferable over QUIC because of lower overhead (which is true if it works, of course).

> However, QUIC is also encapsulated over UDP, and when encapsulated, has the same advantages / disadvantages as SCTP over UDP.

No, it then has the advantage of being nearly completely encrypted, so we don't get any protocol ossification.

> SCTP over UDP over DTLS already constitutes a good portion of web traffic, since WebRTC (and hence technologies like hangouts, facebook video messaging, etc) is based on it.

Well, yeah, but then what's the advantage over QUIC? It's also a complete flow control and encryption stack in user space if you want to run it over DTLS! I mean, I don't mind SCTP, but it's not like the kernel implementation is of any help when you want to run it over DTLS ...