How are local ports determined
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.
Is there a way of forcing it to be 63999.
Not without reprogramming the TCP implementation software.
The Ephemeral Port Range
A TCP/IPv4 connection consists of two endpoints, and each endpoint consists of an IP address and a port number. Therefore, when a client user connects to a server computer, an established connection 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 connecting 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 connection is established that the client side of the connection 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 connection 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 reconnects, it will be assigned a different ephemeral port number for its side of the new connection.
Source The Ephemeral Port Range
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب: how are local govements established,how are local govements created,how are local govements funded,how are local govements 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,
نویسنده: استخدام کار
بازدید: 526
تاريخ: دوشنبه
8 شهريور
1395 ساعت: 18:10