CCNA HUB

CCNA and Linux Training Hub!

CCNA and Linux Training Hub!

  • Home
  • R&S
    • IP Fundamentals
    • Switching
    • Routing
    • IPv4 Suite
    • IPv6 Suite
    • Labs
  • Linux
    • Virtualization 101
    • Basic Configuration
    • Security Measures
    • Database Server
    • Web Server
    • HTTP Tuneup
    • FTP Server
    • Mail Server
    • DNS Server
    • Control Panels
    • Monitoring
    • Backup and Maintenance
  • WordPress
  • About
    • Contact Us
    • Be part of It
    • Under the Hood
CCNA HUB > Blog > IP Fundamentals > Models, Protocols, and Standards > Understanding TCP and UDP Multiplexing

Understanding TCP and UDP Multiplexing

By Imad Daou Leave a Comment

Post Views: 18,071

CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section

section table
  1. Understanding TCP/IP and OSI Models
  2. Understanding Packet Flow Across the Network Part1
  3. Understanding Packet Flow Across the Network Part2
  4. Understanding Ethernet LAN Standards
  5. Understanding Ethernet MAC Addresses
  6. Understanding WAN Technologies
  7. Understanding Data Link Layer Encapsulation
  8. Understanding EoMPLS WAN Technology
  9. Understanding IP Routing Process Concept
  10. Understanding Web Browser DNS Lookup
  11. Understanding ARP Broadcast Message
  12. Understanding TCP and UDP Protocols
  13. Understanding TCP and UDP Multiplexing
  14. Understanding Application Layer Services
  15. Understanding Quality of Service Concept
Understanding TCP and UDP Multiplexing
Image Source

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.

Understanding TCP and UDP Multiplexing

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

section table
  1. Understanding TCP/IP and OSI Models
  2. Understanding Packet Flow Across the Network Part1
  3. Understanding Packet Flow Across the Network Part2
  4. Understanding Ethernet LAN Standards
  5. Understanding Ethernet MAC Addresses
  6. Understanding WAN Technologies
  7. Understanding Data Link Layer Encapsulation
  8. Understanding EoMPLS WAN Technology
  9. Understanding IP Routing Process Concept
  10. Understanding Web Browser DNS Lookup
  11. Understanding ARP Broadcast Message
  12. Understanding TCP and UDP Protocols
  13. Understanding TCP and UDP Multiplexing
  14. Understanding Application Layer Services
  15. Understanding Quality of Service Concept
  • Was this information helpful?
  • Yes(0)   No(0)
Get CCNA R&S Updates!

system-software-update-hi

Filed Under: IP Fundamentals, Models, Protocols, and Standards Tagged With: multiplexing sockets, tcp sockets, udp sockets

About Imad Daou

CCNA HUB Founder, Imad has been in IT field since 2007. Currently holding A+, Network+, Server+, Security+, and Storage+. HP, Dell, and IBM Hardware Certified. Pursuing Linux+, LPIC-2, RHCSA, RHCE, AWS, CCNA, and JNCIA.

LEAVE A COMMENT Cancel reply

We're glad you have chosen to leave a comment. All comments are moderated according to our comment policy. Use your real name and not keywords in the name field. Let's have a personal and meaningful conversation.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

Get CCNA HUB Updates!

MISSION

CCNA, Linux, and Wordpress Training Hub. For Students, Network Pros, DevOps, Linux/Wordpress Lovers, and Entrepreneurs. CCNA HUB Articles and Labs will help you build a solid foundation in Network, Linux, and Wordpress. E.g. Linux WHS will show you how to build a Professional Web Hosting Solution using DigitalOcean or Vultr VPS provider.

TAG CLOUD

VLSM wordpress CMS transmission control protocol wide area network T1 subnet mask TCP switches tcp sockets VPS Hosting WAN udp sockets transport layer protocols SSH Agent Forwarding TCP/IP sudo understanding switching Wordpress Hosting Hub virtual circuit wordpress.org CMS understanding Routing transport layer Wordpress Multisite SSH Client su

RSS UPDATES

  • IP Fundamentals
  • CCNA R&S
  • CCNA Labs
  • Linux WHS
  • Wordpress
  • All CCNA HUB Topics

Copyright © 2023 ·Genesis Sample Theme - Genesis Framework by StudioPress - WordPress - Log in

This website uses cookies. By continuing to browse the site, you are agreeing to our use of cookies
  • Home
  • R&S
    • IP Fundamentals
    • Switching
    • Routing
    • IPv4 Suite
    • IPv6 Suite
    • Labs
  • Linux
    • Virtualization 101
    • Basic Configuration
    • Security Measures
    • Database Server
    • Web Server
    • HTTP Tuneup
    • FTP Server
    • Mail Server
    • DNS Server
    • Control Panels
    • Monitoring
    • Backup and Maintenance
  • WordPress
  • About
    • Contact Us
    • Be part of It
    • Under the Hood