Do I need to know where that number comes from or why does that make the logical ports, why do you need that number of logical ports?
Do I need to know where that number comes from or why does that make the logical ports, why do you need that number of logical ports?
The protocols UDP and TCP have fixed information in their headers including Source Port and Destination Port . Both have a fixed length of 16 bits (2 bytes) each.
Here is a representation of a part of the header:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Puerto Origen | Puerto Destino |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
Taking into account the above we can see that the number of available ports range from 0 to 2 ^ 16 - 1 since 2 ^ 16 is the maximum number of ports available in base 2 and whose base is used to represent these values.
For example, this is the sequence of values from 0 to 2 ^ 16 - 1:
(0000 0000 0000 0000) en base 2 = ( 0) en base 10
(0000 0000 0000 0001) en base 2 = ( 1) en base 10
....
(1111 1111 1111 1111) en base 2 = (65535) en base 10
And as they comment port 0 is reserved according to the IANA although SpeedGuide.net also makes the following note:
This port is technically illegal, but it is possible. It is often used to identify machines, because different operating systems respond to this port in different ways.