Unofficial Hacker News companion — get notified on comment replies, and more.

A portable SCTP userland stack (opens external site)

42 points by mococa 2 days ago | github.com | 59 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (12)

  1. 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!
    Replies (1)
    1. My source for this is David Reed, which is pretty dispositive.
      Replies (1)
      1. That's not entirely dispositive, and I'd have to see exactly what he had to say because it's likely that there's nuance. I'd be specifically interested in whether he says that at the time he intended UDP to what one builds other ULPs on, or merely application protocols; the latter would make what he says absolutely not dispositive here.

        IP has an 8-bit next protocol field. UDP has things other potential ULPs may simply not care about (checksum, port numbers). What Reed wanted UDP for and what his contemporaries wanted it for, and why IP has an 8-bit next protocol number, need not all be in agreement. There have been a fair number of ULPs, including ICMP, TCP, UDP, ESP/AH, UDP-Lite, EGP, IGP, EIGRP, OSPF, DCCP, SCTP, RSVP, PIM, VRRP, HIP, IP-in-IP, etc.

        Middleboxes should really stop filtering unknown ULPs. Such filtering is pointless. That UDP exists is not license to filter other ULPs.

        Replies (1)
        1. The only thing you can call UDP out for having that other protocols wouldn't want are checksums. The port numbers are protocol multiplexing. The best you could do is say that we need 1-2 fewer bytes of it.

          There is no reason for most of those protocols to run directly on top of IP. OSPF would work just as well as a UDP protocol. It's grotesque that PIM even occupies one of the ipproto numbers.

          This has nothing to do with what middleboxes should or shouldn't do. I don't like middleboxes either. But that's not the only problem with riding directly on top of IP; it also makes programming much harder, because no mainstream operating system exposes direct-on-IP in a convenient way. Multiplexing turns out to be pretty useful!

          Replies (1)
          1. > The best you could do is say that we need 1-2 fewer bytes of it.

            Right.

            If UDP had been meant for ULPs then it too would have been blocked by middleboxes. It's only because UDP has port numbers that middleboxes don't just filter UDP out: the vendors all built filters the customer can set that filter on port number because DNS and such meant they couldn't just filter out UDP. Plus it was easy to build a filter for UDP and 'hard' to build a filter for an 8-bit ULP number in IP (smh).

            Replies (1)
            1. I don't know where this argument is really getting you. No matter how you want to rationalize it, building a new protocol directly on top of IP costs you at least 2 things:

              * The protocol can't easily be programmed from userland on mainstream operating systems.

              * Most middleboxes (as opposed to "some" middleboxes, which is also a huge problem) will drop those packets.

              In exchange, you win... nothing.

              The engineering decision here seems straightforward. Like you could see this being a more spicy debate if SCTP had mainstream use cases? But it's nowhere; it's like frame relay, a cursed protocol you have to know about if you work in a cursed industry.

              The comparison to QUIC is instructive.

              Continue this thread (1 replies) →