Problem with port 0

Randall Stewart rrs at cisco.com
Tue Jan 16 18:41:28 UTC 2007


Chuck Swiger wrote:
> On Jan 16, 2007, at 5:15 AM, Randall Stewart wrote:
>> So... I guess this really leads to a question..
>>
>> What does "reserved" mean by IANA.
> 
> "reserved" means one "SHOULD NOT" use that port, where the phrase in 
> caps is defined in RFC-2119 (http://www.ietf.org/rfc/rfc2119.txt).  And:
> 
>   http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
> 
> ...states: "0/tcp,udp: Reserved; do not use (but is a permissible source 
> port value if the sending process does not expect messages in response)"
> 
> ---Chuck
> 
So let me see if I understand the statements above..

We are using the SHOULD NOT.. which is YOU REALLY REALLY REALLY
REALLY REALLY REALLY should not do this unless you have some
very dramatic demonstrative need to do so and know the FULL
consequences of the action.

The bit from wikipedia, while not authoritative in my mind, says you
can send FROM the port, but don't expect an answer back.. which implies
you cannot bind it and/or cannot read from it if your source
port is 0... Of course in TCP this is totally useless since you
have to get something back in order to setup the handshake.

In UDP I guess one could get a packet if the other O/S did not
have any bind restrictions.. or one were to use a raw socket.

But why all this for something you SHOULD NOT DO.. one of the
consequences in my mind of this is that not all O/S's may be
able to read your data .. nor respond to it.

Seems to me a lot of hassle when one can just use a different
port :-0

Of course I am not saying we should not make this work.. I just
am uncomfortable with it .. just as a generality :-)

And I am sure glad we used the MUST NOT term in SCTP when
we did the BIS document .. no grey area there :-)

R

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 803-317-4952 (cell)


More information about the freebsd-net mailing list