1) On the server side, to distinguish different applications. Thus, if the server (the server computer) receives a data packet for port 80, it will usually be forwarded to the Web server; but if it receives a data packet for port 21, it will be forwared to the FTP server.
2) On the client side, to distinguish different conversations. For example, if the browser accesses two files from the same Web server at the same time, the first file might be assigned, for example, port 1024 (for the sending port; the receiving port will be 80), while the next file might be assigned port 1025. When a data packet is sent back for port 1025, in this example the browser knows that it is for the second file.
Port No. for Tranmission Control Protocal (TCP) is 6 Port No. for User Datagram Protocol (UDP) is 17
A single port can be configured to listen for UDP or TCP inbound connection requests (or both). Telnet uses TCP. So when you telnet to a specific IP:port, telnet will attempt to make a TCP connection. If there is no TCP listener on the port you specify, then the connection request will be refused. It matters not if you have a UDP listener on the port. Telnet will not be able to establish a connection to a UDP port.
ICMP does not have a port like TCP and UDP.
Port 1151 is used for TCP/UDP
both tcp and udp
* Ports 12000-17000 - UDP * Port 80 and 443 - TCP * Ports 5060 and 5062 - UDP * Ports 3478 and 3479 - UDP * Ports UDP 27901:27999 * Ports TCP 10001 * Ports TCP 47600:48000
TCP port numbers, as well as UDP port numbers, are 2-byte numbers, therefore, the range is from 0 to 65535.
139 & 445 (udp) and 138 & 137 (tcp)
What a client application usually selects for a TCP or UDP source port number is a random value. The value selected is generally in the range of the registered ports.
source and destination port
UDP
**The TCP transport layer protocol uses windowing and acknowledgments for reliable transfer of data. **The TCP and UDP port numbers are used by application layer protocols. **The TCP transport layer protocol provides services to direct the data packets to their destination hosts.