Search

TCP UDP Port numbers and Well known ports, Multiplexing and Demultiplexing

In this lesson, you will learn terms multiplexing and demultiplexing and how TCP and UDP can support multiple network applications using port numbers.

Transport Layer protocols (TCP and UDP) are responsible for supporting multiple network applications at the same instance and these applications can send and receive network data simultaneously. Transport Layer Protocols are capable of doing this by making use of application level addressing, known as port numbers. The data from different applications operating on a network device are multiplexed at the sending device using port numbers and demultiplexed at the receiving device, again using port numbers.

TCP UDP Port Numbers

The two 16 bit fields in the TCP Header, Source port and Destination port identifies the port number which the application is listening at the sending device and receiving device. Since port number is a 16 bit number, the maximum possible value is 65535 ((2^16)-1).

To explain this concept more clearly, consider you are sitting comfortably at your home are using your laptop which is connected to internet. Consider you have only one network card attached to your laptop (so, you have only one MAC Address) and only one IP address. You are using a email client (Microsoft outlook or Mozilla Thunderbird), a web browser to view news online, a Java Chat application to chat with your online friends, and a Video sharing network utility, simultaneously. Devices located in the internet can see your laptop only as an IP address only.

Since you have only one MAC Address and IP address, how your TCP/IP protocol suite can find the exact application (which is waiting for its network data) to deliver the incoming data from internet for different network applications? What will happen if the incoming data for Video sharing utility is forwarded to Microsoft outlook or Mozilla Thunderbird email application?

Above questions are answered by port numbers. Each network application will bind itself to an available port number, so that TCP/IP protocol suite can identify the network application based on port numbers. So we can view port numbers as an application level address for network communication.

The port numbers are divided into three ranges.

The Well Known Ports are those in the range 0 - 1023. The Well Known Ports are assigned by the IANA (Internet Assigned Numbers Authority) for major protocols.

The Registered Ports are those in the range 1024 - 49151.

The Private Ports are those in the range 49152 - 65535.

Port Number Description
1 TCP Port Service Multiplexer (TCPMUX)
5 Remote Job Entry (RJE)
7 ECHO
18 Message Send Protocol (MSP)
20 FTP - Data
21 FTP - Control
22 SSH Remote Login Protocol
23 Telnet
25 Simple Mail Transfer Protocol (SMTP)
29 MSG ICP
37 Time
42 Host Name Server (Nameserv)
43 WhoIs
49 Login Host Protocol (Login)
53 Domain Name System (DNS)
69 Trivial File Transfer Protocol (TFTP)
70 Gopher Services
79 Finger
80 HTTP
103 X.400 Standard
108 SNA Gateway Access Server
109 POP2
110 POP3
115 Simple File Transfer Protocol (SFTP)
118 SQL Services
119 Newsgroup (NNTP)
137 NetBIOS Name Service
139 NetBIOS Datagram Service
143 Interim Mail Access Protocol (IMAP)
150 NetBIOS Session Service
156 SQL Server
161 SNMP
179 Border Gateway Protocol (BGP)
190 Gateway Access Control Protocol (GACP)
194 Internet Relay Chat (IRC)
197 Directory Location Service (DLS)
389 Lightweight Directory Access Protocol (LDAP)
396 Novell Netware over IP
443 HTTPS
444 Simple Network Paging Protocol (SNPP)
445 Microsoft-DS
458 Apple QuickTime
563 SNEWS
569 MSN
1080 Socks

Visit the following IANA link to know more about assigned ports.

https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

You have learned the terms TCP multiplexing and demultiplexing and application addressing using port numbers. Click "Next" to continue.

Related Tutorials
Introduction to TCP/IP, Features of TCP/IP, TCP/IP History, What is RFC (Request for Comments)
What is PDU (Protocol Data Unit)
How data is moved through different layers of OSI model at sending and receiving computers
Names of data packets at different layers of OSI model
Why OSI model failed
Four Layers of original TCP/IP model, Functions of four layers of TCP/IP model
Five layered TCP/IP model
Comparison between four layered TCP/IP model and five layered TCP/IP model
Protocols/Standards at various layers of TCP/IP model
Comparison between TCP/IP and OSI models
How data is moved through different layers of TCP/IP model at sending and receiving computers
TCP/IP Encapsulation and Decapsulation
Physical Layer (Layer 1)
Datalink Layer (Layer 2)
Ethernet Frame Format
What is MAC address or Layer 2 address or physical address
Network Layer (Layer 3)
IPv4 Protocol, IPv4 header and fields of IPv4 header
IPv4 addresses, IPv4 Address Classes, IPv4 Address Classifications
Transport Layer (Layer 4)
Transmission Control Protocol (TCP) Segment Header
TCP Three-way Handshake
What port numbers, socket numbers, well-known ports and dynamically assigned ports
Multiplexing and Demultiplexing using port numbers
Transmission Control Block (TCB)
TCP Sliding Window
TCP Connection Termination
User Datagram Protocol (UDP)
Differences between TCP and UDP
Application Layer (Layer 5)