Server Ports

  • Thread starter Thread starter ClareOldie
  • Start date Start date
C

ClareOldie

Not certain this is for this group but maybe someone here can help.

The browser on my desktop (client) requests a web page from a server.
The client sends that request from 'any' local port to server port 80.
From what port does the server deliver the data to the clients 'any' port?
Is it from port 80 or does it use another port on the server to send the
data?

Any pointers to articles or such that deal with this appreciated. I have
'googled' but all I can come up with are articles on the protocol.
Thanks,
Seán
 
The browser on my desktop (client) requests a web page from a server.
The client sends that request from 'any' local port to server port 80.
From what port does the server deliver the data to the clients 'any' port?
Is it from port 80 or does it use another port on the server to send the
data?
80.

Any pointers to articles or such that deal with this appreciated. I have
'googled' but all I can come up with are articles on the protocol.

Without the protocol, there is nothing. Read the TCP RFC. Explains it
all...
 
Keith said:
Without the protocol, there is nothing. Read the TCP RFC. Explains
it all...
Thanks Keith
the last part of the below quote from the LanSuite
manual is what had me confused. Any comments??

Quote from LanSuite manual:

You might think that the application sending e-mail uses port 25, but that
is not the case. The usual procedure involves an application requesting and
being given a socket by the operating system; that is, it asks for and
receives a port. Any port will do (the application doesn't even need to know
what the exact port number is), but the operating system will issue a port
from somewhere above 1023. This port is used briefly, and then returned to
the pool for another application to use later. The application sending the
e- mail, using a port above 1023 sends a connection request to the standard
port. When the connection is established, part of the information in each
packet is the source IP address and port as well as the destination IP
address and port. The port above 1023 is the source port; the standard port
is the destination port. The destination machine will return packets using
the original port above 1023 as its destination port. Although this sounds
complicated, the underlying principle is easy to grasp: when a program uses
a port above 1023, replies arrive back at that same port. Here's one last
bit of complexity.
******** Since standard listening ports are for everybody, the
destination machine does not actually use it for data transfer. It only
listens on that port. As soon as a connection is established it hands that
connection to a local port above 1023 and immediately resumes listening for
a new incoming connection request on the standard port. That is how' a web
server can listen for (and handle) thousands of connections from users.

End Quote
 
The browser on my desktop (client) requests a web page from a server.
The client sends that request from 'any' local port to server port 80.
From what port does the server deliver the data to the clients 'any' port?
Is it from port 80 or does it use another port on the server to send the
data?

Port 80. It's an HTTP request, which is served on port 80.
Any pointers to articles or such that deal with this appreciated. I have
'googled' but all I can come up with are articles on the protocol.

Just Googling "Port 80" gives you plenty to look at. For actual port
assignments, see:

http://www.iana.org/assignments/port-numbers

Jeff
 
I would question what that manual is and what they are talking about
[or whether they know what they are talking about].

This is not the case with normal HTTP web servers or SMTP servers.
[The quote would seem to me to be poorly written, inaccurate and made
unnecessarily complicated.]

I don't understand the sentence stating "That is how a web server can
listen for (and handle) thousands of connections from users." TCP
connections are uniquely identified not just by source and destination
port but also by source and destination IP address. A connection from
you:1024 --> www.microsoft.com:80 need not be confused with
someone_else:1024 --> www.microsoft.com:80

I'm not sure I see how switching connections to a different port
number improves either performance or number of simultaneous
connections possible. [Some FTP servers do work in a manner similar
to the one described below.]

You can use a sniffer such as Ethereal and/or launch Telnet such as
TELNET YOURMAILSERVER 25 to see the ports being used and see that
the port number does not change.
 
Back
Top