Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do client and server agree on the high port number?

Status
Not open for further replies.

silverspecv

Programmer
Oct 31, 2003
125
US
Correct me if I'm wrong, but I know that when a client makes a request to a server, the traffic starts on the well-known service port, but it winds up taking place on a higher port above 1024. How do they agree on the high port? Is this a standard part of tcp/ip, or is it service dependent?
 
As you said the client try to talk to the well-know port ( or the one you tell him to talk to ), and the client port used to initiate the discussion is part of the tcp packet so the server respond to this port.
how the client choose the port to used to initiate the traffic ? a kind of counter i supposed. i'm not sure is done the same way on each OS.

bye.
 
So the client chooses a random high port as the first thing and initiates contact from that port to the well-known port, and then the server simply replies to the originating port?
 
yes.......
The server can not know what high portnumber is available on the client side, so it uses the portnumber the client is offering him.
Regards,


Robert Wullems
Network Specialist
SCP/SCE/SCM/CNX/MCP/MCSA/Network+/CNA
***************************************
If you can Sniff it, you can solve it!
***************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top