Aplication and transport layers

Unanswered Question
Mar 14th, 2008
User Badges:

Hi all, it is correct that say http is an application layer protocol, but does each and every application that is networked have its own tcp port number ? and why do they have a port number ?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
gunner07971 Fri, 03/14/2008 - 03:33
User Badges:

Hi,


You are correct in saying that HTTP is an application layer protocol.


HTTP uses TCP port 80.


Every application / protocol has it's own TCP or UDP port number.


Another example would be SMTP, which maps to TCP port 25.


This link will help you understand the application layer.


http://learn-networking.com/tcp-ip/how-the-application-layer-works


This link gives you a list of common TCP/UDP port numbers.


http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers


Port numbers are used to differenciate between different application / protocol converations over a logical link.


HTH

carl_townshend Mon, 07/06/2009 - 00:42
User Badges:

Hi there


so, can you use different port numbers with http? im gathering there is no law that says a web server must listen on port 80


is this correct ?

Joseph W. Doherty Mon, 07/06/2009 - 03:30
User Badges:
  • Super Bronze, 10000 points or more

Yes, you can use a different port number for HTTP.


How port numbers work, or not, is somewhat much like other, "how is the location resolved" issues. For example, when a host desires to contact another host, say hostX, what's it's address? Likewise, when host application wants to send to another host's application, what's its port address? For the former, there are several ways for a host to resolve an address, a host table being one. For the latter, there's an agreement of default port numbers for various "known" applications. For unknown applications, there needs to be a private agreement on port number usage or the application could send to all ports (port scan) and look to see if one reponds as it expects (the latter, for hopefully obvious reasons, isn't normally done).

Actions

This Discussion