views:

84

answers:

2

Doesn’t the dynamic ports keep changing? If yes, wont these ports change and communication stop? Please advice.

+3  A: 

If I understand your question, then in short, no.

When your HTTP client (aka web browser) opens a connection the operating system picks a random port number from the dynamic (or "ephemeral") range.

All of the communications for that connection continue to use that same port.

Only when a new connection is opened is another port chosen.

Alnitak
A: 

To clarify the other end...

Servers of "standard application protocols", like HTTP and FTP have a port assigned to them by a standards body IANA. For example, in the case of HTTP, the default port is "80".

Unless the client selects a non-standard port, web connections are always made to port 80.

The web server is always listening on port 80, it never goes anywhere.

Separately, some protocols use "dynamic protocol assignment", where the protocol number of a service can change, but there is a way to make sure the changing port number is known.

benc