03-14-2008 02:46 AM - edited 03-05-2019 09:45 PM
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 ?
03-14-2008 03:33 AM
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
07-06-2009 12:42 AM
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 ?
07-06-2009 03:30 AM
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).
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide