TCP port question
31 Jan 86 11:27:00 PST

I thought that I would forward this to tcp-ip for comment.



> From: SAGE::KEITH 30-JAN-1986 05:59
> Subj:
> Hi Art,
> Can I ask you a TCP Question ? It concerns our TCP implementation, the
> one in SIMON, and in the SPOT-FE (IBM-Ethernet I/F). We return a parameter
> error to the caller of TCP if an Active-Open is issued with local Port = 0.
> The guys at Ford had trouble with using low-valued ports on their
> 4.2bsd on a Sun workstation (authorization problems, I think). So they
> tried using port 0. Unix was apparently quite happy for them to issue an
> Open for Port-0. So when they called us they were wondering why we gave
> their IBM program a parameter error.

BSD UNIX reserves TCP ports 1-1023 (well known ports) as privileged, which
only super-user is allowed to bind. If someone tries to bind to local port 0,
the socket is bound to an unused port > 1023. This would make a listen to
port 0 of little use (because the active end does not know the actual port).

> I can find nothing prohibiting Port-0 in any TCP Spec. However, RFC-943
> (Assigned Numbers) lists Port-0 as Reserved, so nobody is supposed to listen
> on it. In terms on defensive programming, a zero is the most probable
> value which could result from a bug in a ULP.
> Any suggestions ? Should we remove our restriction on Port-0, or suggest
> it to the TCP Community ?
> Keith.

I would discourage use of port 0.


This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:35:39 GMT