The port number is chosen by the TCP implementation software from a range of port numbers called Ephemeral Ports.
The exact mechanism for choosing the port number and the range to be used is Operating System dependent.
Not without reprogramming the TCP implementation software.
A TCP/IPv4 coection consists of two endpoints, and each endpoint consists of an IP address and a port number. Therefore, when a client user coects to a server computer, an established coection can be thought of as the 4-tuple of (server IP, server port, client IP, client port).
Usually three of the four are readily known -- client machine uses its own IP address and when coecting to a remote service, the server machine's IP address and service port number are required.
What is not immediately evident is that when a coection is established that the client side of the coection uses a port number. Unless a client program explicitly requests a specific port number, the port number used is an ephemeral port number.
Ephemeral ports are temporary ports assigned by a machine's IP stack, and are assigned from a designated range of ports for this purpose. When the coection terminates, the ephemeral port is available for reuse, although most IP stacks won't reuse that port number until the entire pool of ephemeral ports have been used.
So, if the client program recoects, it will be assigned a different ephemeral port number for its side of the new coection.
Source The Ephemeral Port Range
برچسب: how are local governments established,how are local governments created,how are local governments funded,how are local governments organized,how are local winds formed,how are local police departments funded,how are local taxes collected,how are local judges selected,how are local laws made,how are local schools funded,
نویسنده: استخدام کار