• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Regarding Using Port Numbers As Identifiers for Applications

 
Abhijit Ghatnekar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I read in Head First JSP and Servlets that ports 0 to 65535 are used as a logical connection to a server-side running application and we are not supposed to use ports 0-1023(well-known ports) for our custom-based applications.That's fine. However, don't you think that port numbers are finite? What if I develop a new protocol (suppose )that does not have an equivalent port number between 0-65535?My question is this--How do TCP port numbers handle or can they really assign a new port number to an entirely new protocol? Are all these numbers 0-65535 currently been assigned to protocols? Can they be made greater than 65535 in the near future when the Web will expand manifold? Kindly guide me. Thank you all in advance for clarifying my weird queries.
Regards,
Abhijit
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is by no means related to the SCWCD.
Please CarefullyChooseOneForum
One of the moderators will move it to an appropriate place.
 
Irina Goble
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Internet Assigned Numbers Authority assignes the numbers. From rfc4340:

Port numbers are divided into three ranges. The Well Known Ports are
those from 0 through 1023, the Registered Ports are those from 1024
through 49151, and the Dynamic and/or Private Ports are those from
49152 through 65535. Well Known and Registered Ports are intended
for use by server applications that desire a default contact point on
a system. On most systems, Well Known Ports can only be used by
system (or root) processes or by programs executed by privileged
users, while Registered Ports can be used by ordinary user processes
or programs executed by ordinary users. Dynamic and/or Private Ports
are intended for temporary use, including client-side ports, out-of-
band negotiated ports, and application testing prior to registration
of a dedicated port; they MUST NOT be registered.


As for the range, it depends on a protocol. TCP and UDP have 2 bytes for each port number (source port, destination port)
[ July 24, 2008: Message edited by: Irina Goble ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic