|  | 12.3 | TCP Connection Methods
| 12.3.1 | Port numbers

Both TCP and UDP use port (or socket) numbers to pass information to the upper layers. Port numbers are used to keep track of different conversations that cross the network at the same time. Application software developers have agreed to use the well-known port numbers that are defined in RFC1700. Any conversation bound for the FTP application uses the standard port number 21. Conversations, that do not involve applications with well-known port numbers, are assigned port numbers that have been randomly selected from within a specific range. These port numbers are used as source and destination addresses in the TCP segment.

Some ports are reserved in both TCP and UDP , although applications might not be written to support them. Port numbers have the following assigned ranges:

- Numbers below 255 - for public applications
- Numbers from 255-1023 - assigned to companies for marketable applications
- Numbers above 1023 - are unregulated

End systems use port numbers to select proper applications. Originating source port numbers are dynamically assigned by the source host; usually, it is a number larger than 1023.