CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept

Understanding TCP and UDP Multiplexing will answer the following question. How would a Hosting Server responds to Multiple requests generated from different clients requesting different web pages or services? Key points to remember that Transport Layer’s Segmentation based on Port numbers which are the mechanism used to accomplish multiple requests. And that’s how the Web Hosting Server can respond to million of web page requests from different Clients at the same time.
Multiplexing TCP and UDP Sockets
Multiplexing means Multiprocessing and it heavily depends on sockets which is simply an IP Address + Port Number: IP:Port#. Multiplexing is used by both – TCP and UDP protocols to segment multiple service requests.
When any client such PC1 requests a webpage from a ccnahub’s Hosting Server, PC1 HTTP protocol service will use port 80 as destination port which is the web server’s listening port for HTTP service. Keep in mind that ccnahub’s Hosting Server might be running other services besides HTTP service as well, such mail, ftp, ssh, and so on.
If PC1 requested FTP and Email services from the same Hosting Server, PC1’s FTP Application such FileZilla, will use TCP port 21 as destination port, which is the FTP service listening port at the Hosting server to transfer files. The same concept is used when Email Application such Outlook is being used, PC1 will use TCP port 25 as destination port, which is the SMTP listening port at the Hosting Server to send emails.
Therefore, when ccnahub’s Hosting Server receives multiple requests from the same client device using multiple Applications (Web, FTP, and Email), Multiplexing Logic kicks in (Regardless what is used TCP or UDP), all requests will be managed and respond to without any problems.
Note: IP Routing logic does not really care at what service or services the IP packets are heading UP, therefore, it is the Transport Layer job to distribute the multiple requests using Segmentation based on port numbers. If no Multiple ports used, segmentation simply can’t be done.
Prom PC1 perspective
As shown in the figure above, PC1 requested Multiple services at the same time by opening Mail client, Web Browser, FTP, and TFTP. Interestingly, PC1 can even open instances of those applications as well if needed. For Instance, 10 web pages of the same exact page.
The reason why PC1 can open multiple instances of the same application or multiple applications at the same time from the same Hosting Server, is due to Multiplexing Feature which eventually forms Sockets.
However, PC1 has to use dynamic ports from its end, which assigned by its Transport Layer as source ports. If you look close at the image above, you will notice that PC1 is using 5480 as dynamic source port for browsing a single web page from the Hosting Server. (PC1 must use different dynamic port than 5480 to browse multiple copies of the same exact web page)
So, the concept can be applied when using different application such Email. 5687 can be used as dynamic source port for the Email Application, and 6987 for FTP FileZilla application, and so on when the client device is running Multiple Applications.
Remember, any client must use dynamic port while requesting any service from the Hosting Server, dynamic ports starts from 1024 and up. Ports From 1023 and below are reserved to be used by the Hosting Server for service response.
From Hosting Server Perspective
Mail, FTP, TFTP, and Web services all running at the same Hosting Server and ready to respond to any request from any client in a LAN or WAN Network without any conflict.
How the Transport Layer at the Hosting Server handles all these data requests smoothly? Well, as mentioned, as long as the clients using Dynamic Ports (which start at 1024 and above), then the Hosting Server’s services will use Reserved Ports (which start at 1023 and below) to respond and serve clients requests.
What do you mean by any client? Each client’s request arrives at the Hosting Server has a unique Finger Print:
1. The IP address being by client to request the service.
2. The TCP or UDP port number being used to form the socket.
This combination is a perfect Finger Print to create a socket, and from the Hosting Server perspective it is similar to a Phone number with an extension to call the client back.
Note: Since Apache and Nginx are Web Services, Hosting Servers cannot have two services such Apache and Nginx running at the same time, and assigned the same port number 80 or 443 to serve clients’ requests. Each registered port at the server side must be associated with Only and Only One Service.
Finally, keep in mind that same thing applies at the router or firewall level, e.g. I can’t open port 80 or 443 at the router or firewall and have it associated or point to more than one private IP address, unless I have more than one Public IP address used by the Router or Firewall.
If you want to run multiple instances of web Servers at the same machine, and you have more than One Public IP address, use virtualization such Proxmox to run more than one instance of Apache or Nginx and have each one of them associated with its own Public IP address.
Subject Related
BY Wikipedia Network Socket | Oracle Docs Sockets | Router Ally Layer 4 | TCP/IP Guide Sockets Explained | Cisco CCNA Simplified | Cisco CCNA in 60 Days | Networking for Dummies | CCNA R&S Certification Kit | TCP Sockets | CCNA R&S Study Guide
CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept
LEAVE A COMMENT