Subject: SCTP-over-UDP and port 9899

From: "Dan Wing" <[email-masked]>
Date: Mon, 31 Oct 2011 13:10:51 -0700

http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-udp-encaps-01 and its
predecessor both say:

  "When inserting the UDP header, the source port is 9899, the
   destination port is the one stored for the destination address the
   packet is sent to or 9899 if no destination address is stored."

Why is it important to use a specific source port?  Does that not
cause difficulties if there are two (or more) instances of SCTP-
over-UDP applications running on the same host?  Does that not
cause difficulties, in implementation assumptions, if there are
two hosts behind the same NAPT and only one can get UDP/9899 
forwarded to them?

In short, what is the benefit of using 9899 as the source port?

-d

---

From: Michael Tuexen <[email-masked]>
Date: Mon, 31 Oct 2011 22:27:00 +0100

> two hosts behind the same NAPT and only one can get UDP/9899 
Hi Dan,

for sending out the initial packet of an association, the source
port is not important. The peer will send back the response to any
port. But the destination port of the initial packet is important.
It must be the same port the peer is accepting UDP packets. It
can be any port, but then it needs to be negotiated somehow.

Since there is one registered port for SCTP/UDP, I used that.
But you can use a different one, if negotiated. If you want to
run two hosts as servers behind a NAT, you need different UDP
ports. If they are clients, you don't.
> In short, what is the benefit of using 9899 as the source port?
It is more a default, if nothing else is known. In the socketAPI
section the remote port is configurable. The local port (at
least in the FreeBSD/MacOS X implementation) is a parameter
controller by a sysctl variable. So (currently) a single
host uses a single port number for all associations.

Does this makes things clearer?

Best regards
Michael