× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jim,

As I said in my previous message, what you're seeing is the client's port
vs. the server's port.   It's not being "handed off" to a different port.
The ports are exactly what they were when the session started.

In your example, and output from "netstat", what we're seeing is that the
server is using port 80....  no matter how many clients are connected,
they're all on port 80.

On the client side, you see other numbers, like 2623, 2624, etc.  Those
are also the original port numbers that the client created when it opened
up the connection.

It most certainly has NOT "moved the request from port 80 to port 2623"
For EVERY connection there is always TWO ports, the client's port (maybe
you'd call it the "source port" or "from port") and the server's port
(maybe the "destination port"... tho source and dest aren't really
accurate, since it's a two-way conversation)

There's no "moving" going on here.   When server calls bind(), it tells
the system it wants port 80, and that's what it uses.   When the client
calls connect(), the system picks an unused port.  (unless the client also
calls bind(), in which case the application can pick its own port)
In any case, the ports are set at that time and never change.   There is
no "moving" going on here.   The port numbers are needed at both sides so
when a computer receives data it knows which program to forward that data
to.  The port numbers do not change unless the connection is dropped and
a new connection is started.


On Tue, 23 Apr 2002, Jim Langston wrote:
>
> This is best done from a HTTP server to show what is going on.
>
> For each connection you will see the IP of the local server and port, and
> the remote client and port.  The server will see it on port :80, but the
> client will be on some obscure port.  Here is an example from our own IIS
> server:
>
>   TCP    192.0.0.8:80           63.220.237.194:2623    ESTABLISHED
>   TCP    192.0.0.8:80           63.220.237.194:2624    ESTABLISHED
>   TCP    192.0.0.8:80           64.242.2.37:29903      ESTABLISHED
>   TCP    192.0.0.8:80           64.242.2.37:29908      ESTABLISHED
>   TCP    192.0.0.8:80           65.29.109.59:1266      ESTABLISHED
>   TCP    192.0.0.8:80           66.76.46.228:2166      ESTABLISHED
>
> for like 63.220.237.194 it has moved the request from port 80 to port 2623
> internal to the server, but the remote computer's client still sees it as
> port 80.  This is HTTP port 80 instead of Telnet port 23, but same
> difference.
>
> -----Original Message-----
> From: Scott Klement [mailto:klemscot@klements.com]
>
> No.  The server sees it as port 23.   Maybe you're thinking of the
> client's port?   The server's port remains 23.   The client's port was
> most likely picked by the OS from the range of unused port numbers, and
> given the first one that's available.   Usually, people don't worry about
> the client's port, since the client doesn't need to listen for
> connections, and you don't need to connect to a client -- since it's the
> one that does the connecting.
>
> But, this might be where you're confused.   The client side could be 5123
> and the server side 23...  At any rate, they don't change.  Once they're
> connected, those numbers are fixed until the connection is closed.
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.