• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

Query Regarding Using Port Numbers As Identifiers for Applications

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic