Assigned port #s- Any for users?

Assigned port #s- Any for users?

Post by Edward Wladyslaw Jaj » Fri, 25 Sep 1992 13:11:12



I cannot seem to find a basic piece of informaton for socket connections:
are there specific ports allocated for user programs to use?
(Outside of the 256 reserved system ports, I mean).

It's been suggested to me that 1000+ is fine for use by user programs.
Comments?

Thanks
  - Edward W. Jajko

 
 
 

Assigned port #s- Any for users?

Post by Izumi Ohza » Fri, 25 Sep 1992 16:50:40



>I cannot seem to find a basic piece of informaton for socket connections:
>are there specific ports allocated for user programs to use?
>(Outside of the 256 reserved system ports, I mean).

>It's been suggested to me that 1000+ is fine for use by user programs.

W.R. Stevens "Unix Network Programming" (pp.303-304) suggests using
port number above 5000.  Reason being that some of the ports between
1024 and 5000 may have been already assigned automatically to other
processes.  System doesn't automatically assign port numbers higher
than 5000.   If you use the number between 1024-5000, you, therefore
in rare occasions, may get bind() error if port # you want to use
happen to be already in use.

The book is great!

--
Izumi Ohzawa             [ ]
USMail: University of California, 360 Minor Hall, Berkeley, CA 94720
Telephone: (510) 642-6440     Fax:  (510) 642-6341


 
 
 

Assigned port #s- Any for users?

Post by Eric Rescor » Fri, 25 Sep 1992 23:15:02



>W.R. Stevens "Unix Network Programming" (pp.303-304) suggests using
>port number above 5000.  Reason being that some of the ports between
>1024 and 5000 may have been already assigned automatically to other
>processes.  System doesn't automatically assign port numbers higher
>than 5000.   If you use the number between 1024-5000, you, therefore
>in rare occasions, may get bind() error if port # you want to use
>happen to be already in use.

X servers own 6000+display number.

-Ekr

--
-------------------------------------------------------------------------------


                       I will hack Unix for food.