SlideShare a Scribd company logo
Transport Layer
BY TRUPTI SISODE.
Working of Transport Layer
 Working of Transport Layer
 The transport layer takes services from the Application layer and provides
services to the Network layer.
 At the sender’s side: The transport layer receives data (message) from the
Application layer and then performs Segmentation, divides the actual
message into segments, adds the source and destination’s port numbers into
the header of the segment, and transfers the message to the Network layer.
 At the receiver’s side: The transport layer receives data from the Network
layer, reassembles the segmented data, reads its header, identifies the port
number, and forwards the message to the appropriate port in the Application
layer.
Process to process delivery
•Processes: These represent applications or software on two computers that want to
communicate (e.g., a web browser on one computer and a web server on the other).
•Layers:
•Data Link Layer (Node-to-Node): This handles communication between nodes, which are
individual devices (like routers) in the network.
•Network Layer (Host-to-Host): This layer handles communication between two computers
(hosts) across the internet, making sure data reaches the correct device.
•Transport Layer (Process-to-Process): This layer ensures the data gets from one application
on a device to another application on the destination device. It’s responsible for reliable delivery,
error checking, and flow control.
Example:
A process-to-process delivery example is when you send a WhatsApp message. The
transport layer ensures your message is broken into data segments, sent over the
network, and reassembled on your friend’s phone, making sure the full message is
delivered reliably.
Types of Addressing:
1. Local Host Physical Address: Refers to the MAC address of the device.
2. Local Host Logical Address: Refers to the IP address of the device.
3. Remote Host Logical Address: The IP address of the remote device.
4. Remote Host Process Address: The port number of the application running on the remote device.
 In summary, the transport layer’s main function is to ensure data from different applications on a
device is properly handled and delivered using port numbers, while managing both reliable
(connection-oriented) and fast (connectionless) communication.
 Node to Node- Mac Address
 Host to Host- Ip Address
 Process to Process – Port number
Port Numbers in the Transport Layer
 In the transport layer, port numbers are used to identify specific
processes or services running on a device. They act like door
numbers that help the transport layer direct incoming and outgoing
data to the correct application.
 Key Points about Port Numbers:
1. Purpose: Port numbers allow multiple applications on a single device
to use the network simultaneously by assigning each process a unique
number.
2. Structure:
A port number is a 16-bit integer, ranging from 0 to 65535.
Categories of Port Numbers:
•Well-known ports (0-1023):
• Reserved for common services and protocols controlled by IANA (Internet Assigned Numbers Authority).
• Examples:
• HTTP uses port 80.
• FTP uses port 21.
• SMTP (for sending emails) uses port 25.
•Registered ports (1024-49151):
• These are not controlled by IANA but are used by companies for their own applications.
• Example: Skype or game servers often use ports from this range.
•Dynamic or Ephemeral ports (49152-65535):
• Temporary ports used for client-side communication, especially when you open a browser or app to request data
from a server.
Socket Address:
 A socket address is essential in networking to ensure that data is accurately
sent to and received by the correct device and application. It is a combination
of an IP address and a port number
 For example:
• IP address: 192.168.1.1
• Port number: 80 (for HTTP)
 The full socket address would be 192.168.1.1:80, which helps identify the
web service running on that device.
 Port numbers are essential for organizing communication in networks by
ensuring that data reaches the correct service or application.
If you think of an IP address as the building address, then the port number is like the apartment
number inside that building. You need both to send a package (data) to the correct apartment (service)
inside the right building (device). Without the port number, the package might reach the building, but it
won't reach the intended recipient.
In short, a socket address ensures that data can be delivered precisely to the right application on the right
device.
Multiplexer (MUX)
 Definition: A multiplexer is responsible for combining multiple data streams or signals into a
single data stream. In the context of the transport layer, it refers to the ability of a transport layer
protocol to handle multiple connections or data streams simultaneously.
 Function:
• Combining Streams: It combines data from multiple applications or processes running on the
same machine into a single stream of data for transmission.
• Port Numbers: Each stream or application is identified by a unique port number. The multiplexer
uses these port numbers to organize and manage data from various sources before sending it to the
network layer.
 Example: Imagine you’re running a web browser and an email client on your computer. The web
browser might be using port 80 (HTTP), while the email client uses port 25 (SMTP). The transport
layer multiplexes data from both applications into a single data stream that is then sent over the
network.
Demultiplexer (DEMUX)
 Definition: A demultiplexer is responsible for separating and delivering incoming data streams to
the appropriate processes or applications. It performs the reverse function of a multiplexer.
 Function:
• Separating Streams: It takes a single data stream from the network and separates it into multiple
streams, directing each to the correct application or process based on the port number.
• Port Numbers: The demultiplexer uses port numbers in the incoming data to determine which
application or process should receive the data.
 Example: When your computer receives data from the network, the transport layer demultiplexer
identifies the destination port number. It then directs the data to the appropriate application, such
as the web browser or email client, based on these port numbers.
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained
Connection-Oriented Services
 Definition: Connection-oriented services establish a dedicated connection between two
endpoints before data transfer begins. This connection is maintained for the duration of
the communication session, ensuring that data is delivered in order and without errors.
 Examples:
1. Telephone Calls:
1. Example: When you make a phone call, a connection is established between your phone and the
recipient’s phone. The call continues until either party hangs up, ensuring continuous and reliable
communication.
2. TCP (Transmission Control Protocol):
1. Example: When you access a website, TCP establishes a connection between your computer and
the web server. It ensures that all data packets are delivered in order and correctly, reassembling
them into a complete web page.
Connectionless Services
 Definition: Connectionless services do not establish a dedicated connection before data transfer.
Each data packet is sent independently and may take different paths to reach the destination.
There is no guarantee of delivery, order, or error checking.
 Examples:
1. Email Sending (SMTP):
1. Example: When you send an email, the Simple Mail Transfer Protocol (SMTP) does not establish a
persistent connection with the recipient’s email server. Each email is sent independently, and the
system handles any issues with delivery.
2. UDP (User Datagram Protocol):
1. Example: When streaming a video, UDP is often used to send data packets quickly. It does not
establish a connection or guarantee delivery, but it is suitable for applications where speed is more
critical than reliability, such as live streaming or online gaming.
Reliable Service
 Definition: Reliable services ensure that data is delivered accurately and in the correct
order. They include mechanisms for error detection, correction, and retransmission of lost
or corrupted data.
 Examples:
1. TCP (Transmission Control Protocol):
1. Example: When you download a file from the internet, TCP ensures that the file is received
correctly and in the correct order. If any data packets are lost or corrupted, TCP retransmits
them until the complete file is received accurately.
2. File Transfer Protocols (FTP):
1. Example: FTP uses reliable protocols to ensure that files are transferred completely and
accurately between computers. If an error occurs during transfer, FTP will attempt to resend the
affected parts.
Unreliable Service
 Definition: Unreliable services do not guarantee the delivery, order, or integrity of data.
There is no assurance that data packets will reach their destination, or that they will
arrive in the same order they were sent.
 UDP (User Datagram Protocol):
• In online gaming or live video streaming, UDP is often used because it allows data to be
sent quickly without waiting for acknowledgments or retransmissions. This is acceptable
in scenarios where real-time performance is more critical than perfect accuracy.
 Bus or Train Schedules (Without Real-Time Tracking)
• Public transportation systems like buses or trains may have schedules that are subject to
delays and disruptions. Without real-time tracking, passengers cannot always be sure
when the next bus or train will arrive, and it might not be on time.
UDP (User Datagram Protocol)
 UDP (User Datagram Protocol) is one of the core protocols in the
transport layer of the Internet Protocol Suite. Unlike TCP (Transmission
Control Protocol), which provides a reliable, connection-oriented
service, UDP offers a simpler, connectionless service.
 UDP does not establish a connection before sending data. It simply
sends packets (datagrams) to the destination without any setup or
handshake.
 UDP does not guarantee that data packets will be delivered, nor does it
ensure that packets will arrive in the correct order.
UDP Datagram
 The UDP datagram consists of a header and a data section. The total size of the
UDP datagram is determined by the header and the data payload.
Components of the UDP Datagram
•Source Port (16 bits):
•Description: This field specifies the port number of the sender. It is used to identify
the application or process that is sending the data.(port address range - 0 to 65535)
•Usage: Useful for the receiver to know where the data is coming from and for
sending responses back to the correct application.
•Destination Port (16 bits):
•Description: This field specifies the port number of the intended recipient. It is used
to direct the data to the appropriate application or process on the receiving end.
•Usage: Ensures that the data is delivered to the correct application or service on the
destination device.
•Length (16 bits):
•Description: This field indicates the total length of the UDP datagram, including both the header and the
data. It helps in determining where the datagram ends and assists in processing the data correctly.
•Usage: The length field ensures that the receiver can read the entire datagram, including the data, without
ambiguity.
•Checksum (16 bits):
•Description: This field is used for error-checking. It contains a checksum value that helps verify the
integrity of the UDP datagram. The checksum is computed over the header and data.
•Usage: Although optional in IPv4, the checksum is used to detect errors that may have occurred during
data transmission. In IPv6, it is mandatory.
•Data (Variable length):
•Description: This is the actual payload or application data being transmitted. The length of the data
section can vary depending on the application and the total length field.
•Usage: Contains the information or content that the application wants to send, such as a segment of a
video stream or a query result.
Summary
•Source Port: Identifies the sender’s application or process.
•Destination Port: Identifies the recipient’s application or process.
•Length: Indicates the total size of the datagram.
•Checksum: Provides error detection for the datagram.
•Data: Contains the actual payload or message being sent.
UDP Datagram Example:
 Example:
 3039 0050 0014 0000 4865 6c6c 6f20 5770 726c 6421
•3039: Source Port (12345)
•0050: Destination Port (80)
•0014: Length (20 bytes)
•0000: Checksum (0 for simplicity; in practice, this would be computed)
•4865 6c6c 6f20 5770 726c 6421: Data ("Hello World!")
UDP Checksum:
A pseudo-header is a temporary part of the checksum calculation process in UDP (or TCP). It is not part of the
actual UDP packet that gets transmitted over the network.
Instead, it's a helper structure used by the system to ensure the checksum calculation is more reliable by
including key information from the IP header.
This ensures that the data hasn't been corrupted or misdelivered to the wrong destination during transmission.
 Fields in the pseudo-header include:
•32-bit source IP address: This is the sender's IP address.
•32-bit destination IP address: This is the receiver's IP address.
•All 0s (8 bits) : It is a reserved 8-bit field that is always set to zero. The reason it is used is to maintain the
proper byte alignment and size of the pseudo-header when calculating the UDP checksum.
•8-bit protocol: Always 17 for UDP, represented as 00010001 in binary.
•16-bit UDP length: Total length of the UDP packet (header + data).
 UDP Header:
•The UDP header contains four fields that are also included in the checksum calculation:
•16-bit source port number: The port from which the data is sent.
•16-bit destination port number: The port to which the data is sent.
•16-bit UDP length: Total length of the UDP packet (same as above).
•16-bit checksum: Initially set to zero for calculation purposes and is later filled with the calculated value.
 Data:
•The actual data (or payload) is also part of the checksum calculation. If the length of the data isn't a multiple of
16 bits, padding (extra zero bits) is added to make it a multiple of 16.
06 32 00 0D 00 1C E2 17
(a) What is the source port number?
The first 4 hexadecimal digits (2 bytes) represent the source port number.
Source Port (Hex): 06 32
To convert 0632 from hexadecimal to decimal: 0632 (Hex) = 1586 (Decimal)
(b) What is the destination port number?
The next 4 hexadecimal digits (2 bytes) represent the destination port number.
Destination Port (Hex): 00 0D
000D (Hex) = 13 (Decimal)
(c) Calculate the total length of the datagram.
The next 4 hexadecimal digits (2 bytes) represent the total length of the datagram, which includes both the header and the data.
Total Length (Hex): 00 1C
001C (Hex) = 28 (Decimal)
(d) Calculate the data length.
The length of the UDP header is always 8 bytes. To calculate the data length, subtract the header length from the total length of the
datagram.
Data Length = Total Length - Header Length
= 28 bytes - 8 bytes
= 20 bytes
UDP operation
•Connectionless: No need to establish or terminate connections.
•Independent Datagrams: UDP does not ensure that datagrams are received in the correct order.
•No Reliability: If a datagram is lost or damaged in transit, UDP does not retransmit it. There is no
acknowledgment from the receiver, so the sender doesn't know if the data was received correctly.
Faster but Less Reliable.
•No Flow Control: The sender can send as fast as it wants, with no checks on the receiver's
capacity.
•Optional Checksum: Used to detect errors but no correction is provided. Even though the
checksum can detect errors, UDP will not attempt to fix them or request a retransmission. The
packet is simply discarded.
•Multiplexing: Multiple applications can send data at once using port numbers.
•Ideal for Real-time Applications: Where speed is more important than reliability. Eg, Online
gaming, Video streaming.
A relatable example of UDP demultiplexing is using WhatsApp for both voice calls and file sharing
simultaneously:
•Voice Call (Port 5060): When you're on a WhatsApp voice call, the voice data is sent via UDP to your device
using a specific port (like 5060 for voice).
•File Transfer (Port 5228): At the same time, if you're receiving a file on WhatsApp, it may use a different UDP
port (like 5228 for data/file transfer).
UDP Demultiplexing ensures that voice data is sent to the voice call process and the file data is sent to the file-
sharing process by sorting packets based on their port numbers. This allows both activities to happen at the
same time, efficiently and without delay.
Simple Example: WhatsApp Messaging
1.Your Device (Client):
1. You send a WhatsApp message, and it goes into the outgoing queue on your phone.
2. When your friend's reply arrives, it's placed in the incoming queue before showing up in your chat.
2.WhatsApp Server:
1. The server receives your message in its incoming queue, processes it, and then places the reply to send back in
its outgoing queue.
Queues help organize sending and receiving messages smoothly, even when millions of people are using WhatsApp at
the same time.
UDP Queues:
TCP
 TCP is a connection-oriented, reliable transport layer protocol used for transmitting data
between devices in a network.
 It ensures that data is delivered accurately and in the correct order.
 Unlike UDP (User Datagram Protocol), TCP establishes a connection between sender and
receiver before data transmission, making it more reliable but also introducing additional
overhead.
TCP services
1. Process-to-Process Communication
 Process-to-process communication in TCP refers to the ability of different
applications (processes) on networked devices to exchange data reliably.
 Unlike lower-layer protocols (like IP), which focus on delivering data between
devices (hosts), TCP extends communication to specific processes running on those
devices.
Stream Delivery Service
TCP is a stream-oriented protocol. This means data is sent in a continuous flow without
defining message boundaries. The sender pushes bytes into the stream, and the receiver
reads them out in the same order.
Sending and Receiving Buffers
•How TCP uses buffers to manage the sending and receiving of data.
•Sending Side:
•Buffer: Holds the data that needs to be sent.
•"Next byte to send": Indicates the next portion of data to be transmitted.
•"Next byte to write": Shows where new data can be written into the buffer.
•Receiving Side:
•Buffer: Temporarily stores incoming data.
•"Next byte to read": Points to the next byte of data that will be processed.
•"Next byte to receive": Shows where new incoming data will be stored.
•Key Points: Both sending and receiving use circular buffers. This allows for managing
data flow, ensuring that data is sent, received, and processed in the correct order.
Sending Process Receiving Process
TCP Segments
1. Sending Side:
1. Big Message (Buffer): Your story is too long for one text, so you split it into smaller messages.
2. Text Messages (Segments): You send each part of the story in separate texts.
2. Receiving Side:
1. Phone Inbox (Buffer): Your friend receives and stores each text message.
2. Reading the Story (Next Byte to Deliver): Your friend reads the messages in the correct order to
get the full story.
 Key Points:
• TCP splits large data into smaller segments (texts) for sending.
• The receiver puts these segments (texts) together to get the complete data (story).
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained
Full duplex communication:
 Full duplex communication in TCP means both parties (sender and receiver) can send and
receive data simultaneously.
 It’s like having a two-way conversation where you and your friend can talk and listen at
the same time.
 This ensures smooth and efficient data exchange in both directions.
Connection-oriented service
 In TCP, connection-oriented service means that a connection must be established
between the sender and receiver before data can be sent. Here’s a brief overview:
1. Connection Setup: Before sending data, TCP sets up a connection using a process called
the three-way handshake. This involves three steps: SYN (synchronize), SYN-ACK
(synchronize-acknowledge), and ACK (acknowledge).
2. Data Transfer: Once the connection is established, data can be sent in both directions.
TCP ensures that all data is delivered correctly and in order.
3. Connection Teardown: After the data transfer is complete, the connection is properly
closed to free up resources.
TCP Features
•In TCP, the numbering system is crucial for managing and tracking data transmission.
Here are the key features:
•Sequence Numbers: Each byte of data is assigned a unique sequence number. This helps
in tracking the order of data segments and ensures that they are reassembled correctly at the
receiving end.
•Acknowledgment Numbers: These numbers indicate the next expected byte from the
sender. They help confirm which data has been successfully received.
•Window Size: TCP uses a sliding window mechanism to control the flow of data. The
window size determines how much data can be sent before requiring an acknowledgment.
This helps in managing network congestion and ensuring efficient data transfer.
Numbering system
•Flow Control:
TCP prevents the sender from overwhelming the receiver with too much data
at once. It uses a sliding window mechanism to control the flow of data,
ensuring the receiver can handle it efficiently.
•Error Detection and Correction:
TCP includes error-checking mechanisms using checksums. If a data
segment is corrupted during transmission, TCP can detect it and request
retransmission of the corrupted segment.
•Congestion Control:
TCP monitors the network to avoid congestion by adjusting the data
transmission rate. It dynamically adapts to changing network conditions to
prevent overloading the network.
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained
•Data size: 1000 bytes
•Segments: 5
•Data per segment: 200 bytes
•Initial sequence number: 100
•
In TCP, the acknowledgment number is the sequence number of the next expected byte.
After receiving each segment, the receiver sends an acknowledgment for the next
expected sequence number.
Final Answer:
•Sequence Numbers: 100, 300, 500, 700, 900
•Acknowledgements: 300, 500, 700, 900, 1100
TCP Segment
Structure of a TCP Segment
The TCP segment has two main parts:
1.TCP Header: Contains control information required for managing and maintaining
the TCP connection and the data being transmitted.
2.Data (Payload): Contains the actual data being transmitted, such as a chunk of an
HTTP request or response.
TCP Header Format (Common Fields):
The TCP header is typically 20 to 60 bytes long and includes several important fields:
3.Source Port (16 bits): The port number of the sender.
4.Destination Port (16 bits): The port number of the receiver.
5.Sequence Number (32 bits): Used to keep track of the data being transmitted. It
indicates the position of the first byte of data in the current segment within the overall
stream.
6.Acknowledgment Number (32 bits): Indicates the next byte the sender expects to
receive. This is used to acknowledge the receipt of data.
•Reserved (3 bits): Reserved for future use; always set to zero.
•Flags (9 bits): Control flags that manage the state of the connection.
•URG (Urgent): Indicates that some urgent data is present in the segment.
•ACK (Acknowledgment): Indicates that the Acknowledgment field is significant.
•PSH (Push): Requests that the receiver push the data to the application.
•RST (Reset): Resets the connection.
•SYN (Synchronize): Initiates a connection.
•FIN (Finish): Indicates that the sender has finished sending data.
•Window Size (16 bits): Indicates how much data the receiver is willing to accept. This is used for flow control.
•Checksum (16 bits): Used for error-checking the header and data to ensure data integrity.
•Urgent Pointer (16 bits): If the URG flag is set, this field is used to point to the end of the urgent data.
•Options: (Variable length up to 40 bytes ) Used for optional features such as setting Maximum Segment Size (MSS)
or Window Scaling.
Data (Payload):
•This is the actual data that is being transmitted. It can be application data, file transfers, or any other form of
information.
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained
TCP Vs UDP
Transport Layer Security
 TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are cryptographic protocols
designed to provide secure communication over a network, especially the internet. Both protocols
encrypt the data transmitted between two systems (like a client and server) to protect it from being
intercepted, read, or tampered with by third parties.
 Key Components of TLS/SSL:
1. Encryption: Ensures that the data exchanged between two systems (client and server) is encoded in a
way that only authorized parties can read it. Even if intercepted, the data is scrambled and unreadable.
2. Authentication: The protocol uses certificates (issued by trusted Certificate Authorities or CAs) to
authenticate the server's identity to the client. The server proves it owns the private key that
corresponds to the public key in its certificate.
3. Data Integrity: Ensures that data has not been altered in transmit. This is achieved by using message
authentication codes (MACs) that verify the integrity of the data.
Use Cases of TLS/SSL:
1. HTTPS (Hypertext Transfer Protocol Secure): TLS/SSL is used to secure
communication between web browsers and web servers. The presence of "https://"
in a URL indicates that the site is using TLS/SSL to encrypt traffic.
2. Email Security: Protocols like SMTP, POP3, and IMAP are often secured using
TLS to protect emails in transit.
3. VPNs: Many virtual private networks (VPNs) use TLS/SSL to create secure tunnels
between clients and servers.
4. Secure Messaging: TLS is often used in messaging services to protect data from
being intercepted.
Ad

More Related Content

Similar to Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained (20)

CN(BCS502) Module-4 _Transport Layer.pptx
CN(BCS502) Module-4 _Transport Layer.pptxCN(BCS502) Module-4 _Transport Layer.pptx
CN(BCS502) Module-4 _Transport Layer.pptx
ambikavenkatesh2
 
Osi
OsiOsi
Osi
wncstudent1
 
計概
計概計概
計概
allan3160
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
sanjoysanyal
 
ppt on servicenow.pptx
ppt on servicenow.pptxppt on servicenow.pptx
ppt on servicenow.pptx
SimarpreetKaur735622
 
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docxPublished on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
amrit47
 
Lecture 3- tcp-ip
Lecture  3- tcp-ipLecture  3- tcp-ip
Lecture 3- tcp-ip
Saman M. Almufti
 
Presentation (1)
Presentation (1)Presentation (1)
Presentation (1)
Janani Ramasamy
 
network protocol | Networking by Nitasha Chaturvedi
network protocol | Networking by Nitasha Chaturvedinetwork protocol | Networking by Nitasha Chaturvedi
network protocol | Networking by Nitasha Chaturvedi
nitashach22
 
OSI MODEL
OSI MODEL OSI MODEL
OSI MODEL
Soumo Dhali
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network
priya sehgal
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5
Ramesh Babu
 
Manish Jha- Research Scholar- Internet Basics Requriement
Manish Jha- Research Scholar- Internet Basics RequriementManish Jha- Research Scholar- Internet Basics Requriement
Manish Jha- Research Scholar- Internet Basics Requriement
Manish Jha
 
Internet basics and Cloud Computing- Manish Jha
Internet basics and Cloud Computing- Manish JhaInternet basics and Cloud Computing- Manish Jha
Internet basics and Cloud Computing- Manish Jha
manish jha
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
DBU
 
Cn
CnCn
Cn
Shivneep kaur
 
Chapter 12 Computer Networks II class 12.pptx
Chapter 12 Computer Networks  II class 12.pptxChapter 12 Computer Networks  II class 12.pptx
Chapter 12 Computer Networks II class 12.pptx
vanshk11224
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
Ram Dutt Shukla
 
Transport Layer [Autosaved]
Transport Layer [Autosaved]Transport Layer [Autosaved]
Transport Layer [Autosaved]
Ram Dutt Shukla
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
Zakirul Islam
 
CN(BCS502) Module-4 _Transport Layer.pptx
CN(BCS502) Module-4 _Transport Layer.pptxCN(BCS502) Module-4 _Transport Layer.pptx
CN(BCS502) Module-4 _Transport Layer.pptx
ambikavenkatesh2
 
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docxPublished on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
amrit47
 
network protocol | Networking by Nitasha Chaturvedi
network protocol | Networking by Nitasha Chaturvedinetwork protocol | Networking by Nitasha Chaturvedi
network protocol | Networking by Nitasha Chaturvedi
nitashach22
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network
priya sehgal
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5
Ramesh Babu
 
Manish Jha- Research Scholar- Internet Basics Requriement
Manish Jha- Research Scholar- Internet Basics RequriementManish Jha- Research Scholar- Internet Basics Requriement
Manish Jha- Research Scholar- Internet Basics Requriement
Manish Jha
 
Internet basics and Cloud Computing- Manish Jha
Internet basics and Cloud Computing- Manish JhaInternet basics and Cloud Computing- Manish Jha
Internet basics and Cloud Computing- Manish Jha
manish jha
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
DBU
 
Chapter 12 Computer Networks II class 12.pptx
Chapter 12 Computer Networks  II class 12.pptxChapter 12 Computer Networks  II class 12.pptx
Chapter 12 Computer Networks II class 12.pptx
vanshk11224
 
Transport Layer [Autosaved]
Transport Layer [Autosaved]Transport Layer [Autosaved]
Transport Layer [Autosaved]
Ram Dutt Shukla
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
Zakirul Islam
 

More from Sisodetrupti (12)

Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Mastering Network Security: Protecting Networks from Cyber Threats with Firew...Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Sisodetrupti
 
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Sisodetrupti
 
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Sisodetrupti
 
Grid Services includes OGSA,OGSI Architecture & Services
Grid Services includes OGSA,OGSI Architecture & ServicesGrid Services includes OGSA,OGSI Architecture & Services
Grid Services includes OGSA,OGSI Architecture & Services
Sisodetrupti
 
An Introduction to Cloud Computing: Benefits and Challenges
An Introduction to Cloud Computing: Benefits and ChallengesAn Introduction to Cloud Computing: Benefits and Challenges
An Introduction to Cloud Computing: Benefits and Challenges
Sisodetrupti
 
Network layer in computer networks .pptx
Network layer in computer networks .pptxNetwork layer in computer networks .pptx
Network layer in computer networks .pptx
Sisodetrupti
 
Multiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptxMultiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptx
Sisodetrupti
 
Multiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptxMultiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptx
Sisodetrupti
 
PARALLEL DATABASE SYSTEM in Computer Science.pptx
PARALLEL DATABASE SYSTEM in Computer Science.pptxPARALLEL DATABASE SYSTEM in Computer Science.pptx
PARALLEL DATABASE SYSTEM in Computer Science.pptx
Sisodetrupti
 
Distributed Database system in Computer Science.pptx
Distributed  Database  system  in Computer Science.pptxDistributed  Database  system  in Computer Science.pptx
Distributed Database system in Computer Science.pptx
Sisodetrupti
 
COMPUTER NETWORK INTRODUCTION SYBCS.pptx
COMPUTER NETWORK INTRODUCTION SYBCS.pptxCOMPUTER NETWORK INTRODUCTION SYBCS.pptx
COMPUTER NETWORK INTRODUCTION SYBCS.pptx
Sisodetrupti
 
Introduction to Advanced Databases .pptx
Introduction to Advanced Databases .pptxIntroduction to Advanced Databases .pptx
Introduction to Advanced Databases .pptx
Sisodetrupti
 
Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Mastering Network Security: Protecting Networks from Cyber Threats with Firew...Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Mastering Network Security: Protecting Networks from Cyber Threats with Firew...
Sisodetrupti
 
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Exploring the Application Layer: DNS, FQDN, SMTP, Web-Based Email, and FTP Ex...
Sisodetrupti
 
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Virtualization Architecture, Cloud Deployment Models, and Service Models Expl...
Sisodetrupti
 
Grid Services includes OGSA,OGSI Architecture & Services
Grid Services includes OGSA,OGSI Architecture & ServicesGrid Services includes OGSA,OGSI Architecture & Services
Grid Services includes OGSA,OGSI Architecture & Services
Sisodetrupti
 
An Introduction to Cloud Computing: Benefits and Challenges
An Introduction to Cloud Computing: Benefits and ChallengesAn Introduction to Cloud Computing: Benefits and Challenges
An Introduction to Cloud Computing: Benefits and Challenges
Sisodetrupti
 
Network layer in computer networks .pptx
Network layer in computer networks .pptxNetwork layer in computer networks .pptx
Network layer in computer networks .pptx
Sisodetrupti
 
Multiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptxMultiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptx
Sisodetrupti
 
Multiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptxMultiple Access Control Layers in computer network.pptx
Multiple Access Control Layers in computer network.pptx
Sisodetrupti
 
PARALLEL DATABASE SYSTEM in Computer Science.pptx
PARALLEL DATABASE SYSTEM in Computer Science.pptxPARALLEL DATABASE SYSTEM in Computer Science.pptx
PARALLEL DATABASE SYSTEM in Computer Science.pptx
Sisodetrupti
 
Distributed Database system in Computer Science.pptx
Distributed  Database  system  in Computer Science.pptxDistributed  Database  system  in Computer Science.pptx
Distributed Database system in Computer Science.pptx
Sisodetrupti
 
COMPUTER NETWORK INTRODUCTION SYBCS.pptx
COMPUTER NETWORK INTRODUCTION SYBCS.pptxCOMPUTER NETWORK INTRODUCTION SYBCS.pptx
COMPUTER NETWORK INTRODUCTION SYBCS.pptx
Sisodetrupti
 
Introduction to Advanced Databases .pptx
Introduction to Advanced Databases .pptxIntroduction to Advanced Databases .pptx
Introduction to Advanced Databases .pptx
Sisodetrupti
 
Ad

Recently uploaded (20)

BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATIONBIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
KrishnaShastri7
 
Phytonematodes, Ecology, Biology and Managementpptx
Phytonematodes, Ecology, Biology and ManagementpptxPhytonematodes, Ecology, Biology and Managementpptx
Phytonematodes, Ecology, Biology and Managementpptx
Dr Showkat Ahmad Wani
 
Preparation of Experimental Animals.pptx
Preparation of Experimental Animals.pptxPreparation of Experimental Animals.pptx
Preparation of Experimental Animals.pptx
klynct
 
Issues in using AI in academic publishing.pdf
Issues in using AI in academic publishing.pdfIssues in using AI in academic publishing.pdf
Issues in using AI in academic publishing.pdf
Angelo Salatino
 
CORONARY ARTERY BYPASS GRAFTING (1).pptx
CORONARY ARTERY BYPASS GRAFTING (1).pptxCORONARY ARTERY BYPASS GRAFTING (1).pptx
CORONARY ARTERY BYPASS GRAFTING (1).pptx
DharaniJajula
 
Somato_Sensory _ somatomotor_Nervous_System.pptx
Somato_Sensory _ somatomotor_Nervous_System.pptxSomato_Sensory _ somatomotor_Nervous_System.pptx
Somato_Sensory _ somatomotor_Nervous_System.pptx
klynct
 
physics of renewable energy sources .pptx
physics of renewable energy sources  .pptxphysics of renewable energy sources  .pptx
physics of renewable energy sources .pptx
zaramunir6
 
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptxA CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
ANJALICHANDRASEKARAN
 
Euclid: The Story So far, a Departmental Colloquium at Maynooth University
Euclid: The Story So far, a Departmental Colloquium at Maynooth UniversityEuclid: The Story So far, a Departmental Colloquium at Maynooth University
Euclid: The Story So far, a Departmental Colloquium at Maynooth University
Peter Coles
 
university of arizona ~ favor's college candidate project.pptx
university of arizona ~ favor's college candidate project.pptxuniversity of arizona ~ favor's college candidate project.pptx
university of arizona ~ favor's college candidate project.pptx
favoranamelechi107
 
Mycology:Characteristics of Ascomycetes Fungi
Mycology:Characteristics of Ascomycetes FungiMycology:Characteristics of Ascomycetes Fungi
Mycology:Characteristics of Ascomycetes Fungi
SAYANTANMALLICK5
 
Seismic evidence of liquid water at the base of Mars' upper crust
Seismic evidence of liquid water at the base of Mars' upper crustSeismic evidence of liquid water at the base of Mars' upper crust
Seismic evidence of liquid water at the base of Mars' upper crust
Sérgio Sacani
 
Anti tubercular drug Medicinal Chemistry III
Anti tubercular drug Medicinal Chemistry  IIIAnti tubercular drug Medicinal Chemistry  III
Anti tubercular drug Medicinal Chemistry III
HRUTUJA WAGH
 
Pharmacologically active constituents.pdf
Pharmacologically active constituents.pdfPharmacologically active constituents.pdf
Pharmacologically active constituents.pdf
Nistarini College, Purulia (W.B) India
 
MC III Prodrug Medicinal Chemistry III PPT
MC III Prodrug Medicinal Chemistry III PPTMC III Prodrug Medicinal Chemistry III PPT
MC III Prodrug Medicinal Chemistry III PPT
HRUTUJA WAGH
 
Chapter-10-Light-reflection-and-refraction.ppt
Chapter-10-Light-reflection-and-refraction.pptChapter-10-Light-reflection-and-refraction.ppt
Chapter-10-Light-reflection-and-refraction.ppt
uniyaladiti914
 
Meiosis Notes Slides biology powerpoint.pptx
Meiosis Notes Slides biology powerpoint.pptxMeiosis Notes Slides biology powerpoint.pptx
Meiosis Notes Slides biology powerpoint.pptx
sbates3
 
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
Sérgio Sacani
 
Examine human hair for cortex and medulla.
Examine human hair for cortex and medulla.Examine human hair for cortex and medulla.
Examine human hair for cortex and medulla.
NutanRathod6
 
Anti fungal agents Medicinal Chemistry III
Anti fungal agents Medicinal Chemistry  IIIAnti fungal agents Medicinal Chemistry  III
Anti fungal agents Medicinal Chemistry III
HRUTUJA WAGH
 
BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATIONBIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
BIODIESEL AND ROLEs OF GLYCEROL PRODUCTION AND APPLICATION
KrishnaShastri7
 
Phytonematodes, Ecology, Biology and Managementpptx
Phytonematodes, Ecology, Biology and ManagementpptxPhytonematodes, Ecology, Biology and Managementpptx
Phytonematodes, Ecology, Biology and Managementpptx
Dr Showkat Ahmad Wani
 
Preparation of Experimental Animals.pptx
Preparation of Experimental Animals.pptxPreparation of Experimental Animals.pptx
Preparation of Experimental Animals.pptx
klynct
 
Issues in using AI in academic publishing.pdf
Issues in using AI in academic publishing.pdfIssues in using AI in academic publishing.pdf
Issues in using AI in academic publishing.pdf
Angelo Salatino
 
CORONARY ARTERY BYPASS GRAFTING (1).pptx
CORONARY ARTERY BYPASS GRAFTING (1).pptxCORONARY ARTERY BYPASS GRAFTING (1).pptx
CORONARY ARTERY BYPASS GRAFTING (1).pptx
DharaniJajula
 
Somato_Sensory _ somatomotor_Nervous_System.pptx
Somato_Sensory _ somatomotor_Nervous_System.pptxSomato_Sensory _ somatomotor_Nervous_System.pptx
Somato_Sensory _ somatomotor_Nervous_System.pptx
klynct
 
physics of renewable energy sources .pptx
physics of renewable energy sources  .pptxphysics of renewable energy sources  .pptx
physics of renewable energy sources .pptx
zaramunir6
 
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptxA CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
A CASE OF MULTINODULAR GOITRE,clinical presentation and management.pptx
ANJALICHANDRASEKARAN
 
Euclid: The Story So far, a Departmental Colloquium at Maynooth University
Euclid: The Story So far, a Departmental Colloquium at Maynooth UniversityEuclid: The Story So far, a Departmental Colloquium at Maynooth University
Euclid: The Story So far, a Departmental Colloquium at Maynooth University
Peter Coles
 
university of arizona ~ favor's college candidate project.pptx
university of arizona ~ favor's college candidate project.pptxuniversity of arizona ~ favor's college candidate project.pptx
university of arizona ~ favor's college candidate project.pptx
favoranamelechi107
 
Mycology:Characteristics of Ascomycetes Fungi
Mycology:Characteristics of Ascomycetes FungiMycology:Characteristics of Ascomycetes Fungi
Mycology:Characteristics of Ascomycetes Fungi
SAYANTANMALLICK5
 
Seismic evidence of liquid water at the base of Mars' upper crust
Seismic evidence of liquid water at the base of Mars' upper crustSeismic evidence of liquid water at the base of Mars' upper crust
Seismic evidence of liquid water at the base of Mars' upper crust
Sérgio Sacani
 
Anti tubercular drug Medicinal Chemistry III
Anti tubercular drug Medicinal Chemistry  IIIAnti tubercular drug Medicinal Chemistry  III
Anti tubercular drug Medicinal Chemistry III
HRUTUJA WAGH
 
MC III Prodrug Medicinal Chemistry III PPT
MC III Prodrug Medicinal Chemistry III PPTMC III Prodrug Medicinal Chemistry III PPT
MC III Prodrug Medicinal Chemistry III PPT
HRUTUJA WAGH
 
Chapter-10-Light-reflection-and-refraction.ppt
Chapter-10-Light-reflection-and-refraction.pptChapter-10-Light-reflection-and-refraction.ppt
Chapter-10-Light-reflection-and-refraction.ppt
uniyaladiti914
 
Meiosis Notes Slides biology powerpoint.pptx
Meiosis Notes Slides biology powerpoint.pptxMeiosis Notes Slides biology powerpoint.pptx
Meiosis Notes Slides biology powerpoint.pptx
sbates3
 
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
A Massive Black Hole 0.8kpc from the Host Nucleus Revealed by the Offset Tida...
Sérgio Sacani
 
Examine human hair for cortex and medulla.
Examine human hair for cortex and medulla.Examine human hair for cortex and medulla.
Examine human hair for cortex and medulla.
NutanRathod6
 
Anti fungal agents Medicinal Chemistry III
Anti fungal agents Medicinal Chemistry  IIIAnti fungal agents Medicinal Chemistry  III
Anti fungal agents Medicinal Chemistry III
HRUTUJA WAGH
 
Ad

Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, TCP/UDP Operations, and Socket Addresses Explained

  • 2. Working of Transport Layer  Working of Transport Layer  The transport layer takes services from the Application layer and provides services to the Network layer.  At the sender’s side: The transport layer receives data (message) from the Application layer and then performs Segmentation, divides the actual message into segments, adds the source and destination’s port numbers into the header of the segment, and transfers the message to the Network layer.  At the receiver’s side: The transport layer receives data from the Network layer, reassembles the segmented data, reads its header, identifies the port number, and forwards the message to the appropriate port in the Application layer.
  • 4. •Processes: These represent applications or software on two computers that want to communicate (e.g., a web browser on one computer and a web server on the other). •Layers: •Data Link Layer (Node-to-Node): This handles communication between nodes, which are individual devices (like routers) in the network. •Network Layer (Host-to-Host): This layer handles communication between two computers (hosts) across the internet, making sure data reaches the correct device. •Transport Layer (Process-to-Process): This layer ensures the data gets from one application on a device to another application on the destination device. It’s responsible for reliable delivery, error checking, and flow control. Example: A process-to-process delivery example is when you send a WhatsApp message. The transport layer ensures your message is broken into data segments, sent over the network, and reassembled on your friend’s phone, making sure the full message is delivered reliably.
  • 5. Types of Addressing: 1. Local Host Physical Address: Refers to the MAC address of the device. 2. Local Host Logical Address: Refers to the IP address of the device. 3. Remote Host Logical Address: The IP address of the remote device. 4. Remote Host Process Address: The port number of the application running on the remote device.  In summary, the transport layer’s main function is to ensure data from different applications on a device is properly handled and delivered using port numbers, while managing both reliable (connection-oriented) and fast (connectionless) communication.  Node to Node- Mac Address  Host to Host- Ip Address  Process to Process – Port number
  • 6. Port Numbers in the Transport Layer  In the transport layer, port numbers are used to identify specific processes or services running on a device. They act like door numbers that help the transport layer direct incoming and outgoing data to the correct application.  Key Points about Port Numbers: 1. Purpose: Port numbers allow multiple applications on a single device to use the network simultaneously by assigning each process a unique number. 2. Structure: A port number is a 16-bit integer, ranging from 0 to 65535.
  • 7. Categories of Port Numbers: •Well-known ports (0-1023): • Reserved for common services and protocols controlled by IANA (Internet Assigned Numbers Authority). • Examples: • HTTP uses port 80. • FTP uses port 21. • SMTP (for sending emails) uses port 25. •Registered ports (1024-49151): • These are not controlled by IANA but are used by companies for their own applications. • Example: Skype or game servers often use ports from this range. •Dynamic or Ephemeral ports (49152-65535): • Temporary ports used for client-side communication, especially when you open a browser or app to request data from a server.
  • 8. Socket Address:  A socket address is essential in networking to ensure that data is accurately sent to and received by the correct device and application. It is a combination of an IP address and a port number  For example: • IP address: 192.168.1.1 • Port number: 80 (for HTTP)  The full socket address would be 192.168.1.1:80, which helps identify the web service running on that device.  Port numbers are essential for organizing communication in networks by ensuring that data reaches the correct service or application.
  • 9. If you think of an IP address as the building address, then the port number is like the apartment number inside that building. You need both to send a package (data) to the correct apartment (service) inside the right building (device). Without the port number, the package might reach the building, but it won't reach the intended recipient. In short, a socket address ensures that data can be delivered precisely to the right application on the right device.
  • 10. Multiplexer (MUX)  Definition: A multiplexer is responsible for combining multiple data streams or signals into a single data stream. In the context of the transport layer, it refers to the ability of a transport layer protocol to handle multiple connections or data streams simultaneously.  Function: • Combining Streams: It combines data from multiple applications or processes running on the same machine into a single stream of data for transmission. • Port Numbers: Each stream or application is identified by a unique port number. The multiplexer uses these port numbers to organize and manage data from various sources before sending it to the network layer.  Example: Imagine you’re running a web browser and an email client on your computer. The web browser might be using port 80 (HTTP), while the email client uses port 25 (SMTP). The transport layer multiplexes data from both applications into a single data stream that is then sent over the network.
  • 11. Demultiplexer (DEMUX)  Definition: A demultiplexer is responsible for separating and delivering incoming data streams to the appropriate processes or applications. It performs the reverse function of a multiplexer.  Function: • Separating Streams: It takes a single data stream from the network and separates it into multiple streams, directing each to the correct application or process based on the port number. • Port Numbers: The demultiplexer uses port numbers in the incoming data to determine which application or process should receive the data.  Example: When your computer receives data from the network, the transport layer demultiplexer identifies the destination port number. It then directs the data to the appropriate application, such as the web browser or email client, based on these port numbers.
  • 13. Connection-Oriented Services  Definition: Connection-oriented services establish a dedicated connection between two endpoints before data transfer begins. This connection is maintained for the duration of the communication session, ensuring that data is delivered in order and without errors.  Examples: 1. Telephone Calls: 1. Example: When you make a phone call, a connection is established between your phone and the recipient’s phone. The call continues until either party hangs up, ensuring continuous and reliable communication. 2. TCP (Transmission Control Protocol): 1. Example: When you access a website, TCP establishes a connection between your computer and the web server. It ensures that all data packets are delivered in order and correctly, reassembling them into a complete web page.
  • 14. Connectionless Services  Definition: Connectionless services do not establish a dedicated connection before data transfer. Each data packet is sent independently and may take different paths to reach the destination. There is no guarantee of delivery, order, or error checking.  Examples: 1. Email Sending (SMTP): 1. Example: When you send an email, the Simple Mail Transfer Protocol (SMTP) does not establish a persistent connection with the recipient’s email server. Each email is sent independently, and the system handles any issues with delivery. 2. UDP (User Datagram Protocol): 1. Example: When streaming a video, UDP is often used to send data packets quickly. It does not establish a connection or guarantee delivery, but it is suitable for applications where speed is more critical than reliability, such as live streaming or online gaming.
  • 15. Reliable Service  Definition: Reliable services ensure that data is delivered accurately and in the correct order. They include mechanisms for error detection, correction, and retransmission of lost or corrupted data.  Examples: 1. TCP (Transmission Control Protocol): 1. Example: When you download a file from the internet, TCP ensures that the file is received correctly and in the correct order. If any data packets are lost or corrupted, TCP retransmits them until the complete file is received accurately. 2. File Transfer Protocols (FTP): 1. Example: FTP uses reliable protocols to ensure that files are transferred completely and accurately between computers. If an error occurs during transfer, FTP will attempt to resend the affected parts.
  • 16. Unreliable Service  Definition: Unreliable services do not guarantee the delivery, order, or integrity of data. There is no assurance that data packets will reach their destination, or that they will arrive in the same order they were sent.  UDP (User Datagram Protocol): • In online gaming or live video streaming, UDP is often used because it allows data to be sent quickly without waiting for acknowledgments or retransmissions. This is acceptable in scenarios where real-time performance is more critical than perfect accuracy.  Bus or Train Schedules (Without Real-Time Tracking) • Public transportation systems like buses or trains may have schedules that are subject to delays and disruptions. Without real-time tracking, passengers cannot always be sure when the next bus or train will arrive, and it might not be on time.
  • 17. UDP (User Datagram Protocol)  UDP (User Datagram Protocol) is one of the core protocols in the transport layer of the Internet Protocol Suite. Unlike TCP (Transmission Control Protocol), which provides a reliable, connection-oriented service, UDP offers a simpler, connectionless service.  UDP does not establish a connection before sending data. It simply sends packets (datagrams) to the destination without any setup or handshake.  UDP does not guarantee that data packets will be delivered, nor does it ensure that packets will arrive in the correct order.
  • 18. UDP Datagram  The UDP datagram consists of a header and a data section. The total size of the UDP datagram is determined by the header and the data payload.
  • 19. Components of the UDP Datagram •Source Port (16 bits): •Description: This field specifies the port number of the sender. It is used to identify the application or process that is sending the data.(port address range - 0 to 65535) •Usage: Useful for the receiver to know where the data is coming from and for sending responses back to the correct application. •Destination Port (16 bits): •Description: This field specifies the port number of the intended recipient. It is used to direct the data to the appropriate application or process on the receiving end. •Usage: Ensures that the data is delivered to the correct application or service on the destination device.
  • 20. •Length (16 bits): •Description: This field indicates the total length of the UDP datagram, including both the header and the data. It helps in determining where the datagram ends and assists in processing the data correctly. •Usage: The length field ensures that the receiver can read the entire datagram, including the data, without ambiguity. •Checksum (16 bits): •Description: This field is used for error-checking. It contains a checksum value that helps verify the integrity of the UDP datagram. The checksum is computed over the header and data. •Usage: Although optional in IPv4, the checksum is used to detect errors that may have occurred during data transmission. In IPv6, it is mandatory. •Data (Variable length): •Description: This is the actual payload or application data being transmitted. The length of the data section can vary depending on the application and the total length field. •Usage: Contains the information or content that the application wants to send, such as a segment of a video stream or a query result. Summary •Source Port: Identifies the sender’s application or process. •Destination Port: Identifies the recipient’s application or process. •Length: Indicates the total size of the datagram. •Checksum: Provides error detection for the datagram. •Data: Contains the actual payload or message being sent.
  • 21. UDP Datagram Example:  Example:  3039 0050 0014 0000 4865 6c6c 6f20 5770 726c 6421 •3039: Source Port (12345) •0050: Destination Port (80) •0014: Length (20 bytes) •0000: Checksum (0 for simplicity; in practice, this would be computed) •4865 6c6c 6f20 5770 726c 6421: Data ("Hello World!")
  • 23. A pseudo-header is a temporary part of the checksum calculation process in UDP (or TCP). It is not part of the actual UDP packet that gets transmitted over the network. Instead, it's a helper structure used by the system to ensure the checksum calculation is more reliable by including key information from the IP header. This ensures that the data hasn't been corrupted or misdelivered to the wrong destination during transmission.  Fields in the pseudo-header include: •32-bit source IP address: This is the sender's IP address. •32-bit destination IP address: This is the receiver's IP address. •All 0s (8 bits) : It is a reserved 8-bit field that is always set to zero. The reason it is used is to maintain the proper byte alignment and size of the pseudo-header when calculating the UDP checksum. •8-bit protocol: Always 17 for UDP, represented as 00010001 in binary. •16-bit UDP length: Total length of the UDP packet (header + data).  UDP Header: •The UDP header contains four fields that are also included in the checksum calculation: •16-bit source port number: The port from which the data is sent. •16-bit destination port number: The port to which the data is sent. •16-bit UDP length: Total length of the UDP packet (same as above). •16-bit checksum: Initially set to zero for calculation purposes and is later filled with the calculated value.  Data: •The actual data (or payload) is also part of the checksum calculation. If the length of the data isn't a multiple of 16 bits, padding (extra zero bits) is added to make it a multiple of 16.
  • 24. 06 32 00 0D 00 1C E2 17 (a) What is the source port number? The first 4 hexadecimal digits (2 bytes) represent the source port number. Source Port (Hex): 06 32 To convert 0632 from hexadecimal to decimal: 0632 (Hex) = 1586 (Decimal) (b) What is the destination port number? The next 4 hexadecimal digits (2 bytes) represent the destination port number. Destination Port (Hex): 00 0D 000D (Hex) = 13 (Decimal) (c) Calculate the total length of the datagram. The next 4 hexadecimal digits (2 bytes) represent the total length of the datagram, which includes both the header and the data. Total Length (Hex): 00 1C 001C (Hex) = 28 (Decimal) (d) Calculate the data length. The length of the UDP header is always 8 bytes. To calculate the data length, subtract the header length from the total length of the datagram. Data Length = Total Length - Header Length = 28 bytes - 8 bytes = 20 bytes
  • 25. UDP operation •Connectionless: No need to establish or terminate connections. •Independent Datagrams: UDP does not ensure that datagrams are received in the correct order. •No Reliability: If a datagram is lost or damaged in transit, UDP does not retransmit it. There is no acknowledgment from the receiver, so the sender doesn't know if the data was received correctly. Faster but Less Reliable. •No Flow Control: The sender can send as fast as it wants, with no checks on the receiver's capacity. •Optional Checksum: Used to detect errors but no correction is provided. Even though the checksum can detect errors, UDP will not attempt to fix them or request a retransmission. The packet is simply discarded. •Multiplexing: Multiple applications can send data at once using port numbers. •Ideal for Real-time Applications: Where speed is more important than reliability. Eg, Online gaming, Video streaming.
  • 26. A relatable example of UDP demultiplexing is using WhatsApp for both voice calls and file sharing simultaneously: •Voice Call (Port 5060): When you're on a WhatsApp voice call, the voice data is sent via UDP to your device using a specific port (like 5060 for voice). •File Transfer (Port 5228): At the same time, if you're receiving a file on WhatsApp, it may use a different UDP port (like 5228 for data/file transfer). UDP Demultiplexing ensures that voice data is sent to the voice call process and the file data is sent to the file- sharing process by sorting packets based on their port numbers. This allows both activities to happen at the same time, efficiently and without delay.
  • 27. Simple Example: WhatsApp Messaging 1.Your Device (Client): 1. You send a WhatsApp message, and it goes into the outgoing queue on your phone. 2. When your friend's reply arrives, it's placed in the incoming queue before showing up in your chat. 2.WhatsApp Server: 1. The server receives your message in its incoming queue, processes it, and then places the reply to send back in its outgoing queue. Queues help organize sending and receiving messages smoothly, even when millions of people are using WhatsApp at the same time. UDP Queues:
  • 28. TCP  TCP is a connection-oriented, reliable transport layer protocol used for transmitting data between devices in a network.  It ensures that data is delivered accurately and in the correct order.  Unlike UDP (User Datagram Protocol), TCP establishes a connection between sender and receiver before data transmission, making it more reliable but also introducing additional overhead.
  • 29. TCP services 1. Process-to-Process Communication  Process-to-process communication in TCP refers to the ability of different applications (processes) on networked devices to exchange data reliably.  Unlike lower-layer protocols (like IP), which focus on delivering data between devices (hosts), TCP extends communication to specific processes running on those devices.
  • 30. Stream Delivery Service TCP is a stream-oriented protocol. This means data is sent in a continuous flow without defining message boundaries. The sender pushes bytes into the stream, and the receiver reads them out in the same order.
  • 31. Sending and Receiving Buffers •How TCP uses buffers to manage the sending and receiving of data. •Sending Side: •Buffer: Holds the data that needs to be sent. •"Next byte to send": Indicates the next portion of data to be transmitted. •"Next byte to write": Shows where new data can be written into the buffer. •Receiving Side: •Buffer: Temporarily stores incoming data. •"Next byte to read": Points to the next byte of data that will be processed. •"Next byte to receive": Shows where new incoming data will be stored. •Key Points: Both sending and receiving use circular buffers. This allows for managing data flow, ensuring that data is sent, received, and processed in the correct order.
  • 33. TCP Segments 1. Sending Side: 1. Big Message (Buffer): Your story is too long for one text, so you split it into smaller messages. 2. Text Messages (Segments): You send each part of the story in separate texts. 2. Receiving Side: 1. Phone Inbox (Buffer): Your friend receives and stores each text message. 2. Reading the Story (Next Byte to Deliver): Your friend reads the messages in the correct order to get the full story.  Key Points: • TCP splits large data into smaller segments (texts) for sending. • The receiver puts these segments (texts) together to get the complete data (story).
  • 35. Full duplex communication:  Full duplex communication in TCP means both parties (sender and receiver) can send and receive data simultaneously.  It’s like having a two-way conversation where you and your friend can talk and listen at the same time.  This ensures smooth and efficient data exchange in both directions.
  • 36. Connection-oriented service  In TCP, connection-oriented service means that a connection must be established between the sender and receiver before data can be sent. Here’s a brief overview: 1. Connection Setup: Before sending data, TCP sets up a connection using a process called the three-way handshake. This involves three steps: SYN (synchronize), SYN-ACK (synchronize-acknowledge), and ACK (acknowledge). 2. Data Transfer: Once the connection is established, data can be sent in both directions. TCP ensures that all data is delivered correctly and in order. 3. Connection Teardown: After the data transfer is complete, the connection is properly closed to free up resources.
  • 37. TCP Features •In TCP, the numbering system is crucial for managing and tracking data transmission. Here are the key features: •Sequence Numbers: Each byte of data is assigned a unique sequence number. This helps in tracking the order of data segments and ensures that they are reassembled correctly at the receiving end. •Acknowledgment Numbers: These numbers indicate the next expected byte from the sender. They help confirm which data has been successfully received. •Window Size: TCP uses a sliding window mechanism to control the flow of data. The window size determines how much data can be sent before requiring an acknowledgment. This helps in managing network congestion and ensuring efficient data transfer.
  • 39. •Flow Control: TCP prevents the sender from overwhelming the receiver with too much data at once. It uses a sliding window mechanism to control the flow of data, ensuring the receiver can handle it efficiently. •Error Detection and Correction: TCP includes error-checking mechanisms using checksums. If a data segment is corrupted during transmission, TCP can detect it and request retransmission of the corrupted segment. •Congestion Control: TCP monitors the network to avoid congestion by adjusting the data transmission rate. It dynamically adapts to changing network conditions to prevent overloading the network.
  • 41. •Data size: 1000 bytes •Segments: 5 •Data per segment: 200 bytes •Initial sequence number: 100 •
  • 42. In TCP, the acknowledgment number is the sequence number of the next expected byte. After receiving each segment, the receiver sends an acknowledgment for the next expected sequence number. Final Answer: •Sequence Numbers: 100, 300, 500, 700, 900 •Acknowledgements: 300, 500, 700, 900, 1100
  • 44. Structure of a TCP Segment The TCP segment has two main parts: 1.TCP Header: Contains control information required for managing and maintaining the TCP connection and the data being transmitted. 2.Data (Payload): Contains the actual data being transmitted, such as a chunk of an HTTP request or response. TCP Header Format (Common Fields): The TCP header is typically 20 to 60 bytes long and includes several important fields: 3.Source Port (16 bits): The port number of the sender. 4.Destination Port (16 bits): The port number of the receiver. 5.Sequence Number (32 bits): Used to keep track of the data being transmitted. It indicates the position of the first byte of data in the current segment within the overall stream. 6.Acknowledgment Number (32 bits): Indicates the next byte the sender expects to receive. This is used to acknowledge the receipt of data.
  • 45. •Reserved (3 bits): Reserved for future use; always set to zero. •Flags (9 bits): Control flags that manage the state of the connection. •URG (Urgent): Indicates that some urgent data is present in the segment. •ACK (Acknowledgment): Indicates that the Acknowledgment field is significant. •PSH (Push): Requests that the receiver push the data to the application. •RST (Reset): Resets the connection. •SYN (Synchronize): Initiates a connection. •FIN (Finish): Indicates that the sender has finished sending data. •Window Size (16 bits): Indicates how much data the receiver is willing to accept. This is used for flow control. •Checksum (16 bits): Used for error-checking the header and data to ensure data integrity. •Urgent Pointer (16 bits): If the URG flag is set, this field is used to point to the end of the urgent data. •Options: (Variable length up to 40 bytes ) Used for optional features such as setting Maximum Segment Size (MSS) or Window Scaling. Data (Payload): •This is the actual data that is being transmitted. It can be application data, file transfers, or any other form of information.
  • 48. Transport Layer Security  TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are cryptographic protocols designed to provide secure communication over a network, especially the internet. Both protocols encrypt the data transmitted between two systems (like a client and server) to protect it from being intercepted, read, or tampered with by third parties.  Key Components of TLS/SSL: 1. Encryption: Ensures that the data exchanged between two systems (client and server) is encoded in a way that only authorized parties can read it. Even if intercepted, the data is scrambled and unreadable. 2. Authentication: The protocol uses certificates (issued by trusted Certificate Authorities or CAs) to authenticate the server's identity to the client. The server proves it owns the private key that corresponds to the public key in its certificate. 3. Data Integrity: Ensures that data has not been altered in transmit. This is achieved by using message authentication codes (MACs) that verify the integrity of the data.
  • 49. Use Cases of TLS/SSL: 1. HTTPS (Hypertext Transfer Protocol Secure): TLS/SSL is used to secure communication between web browsers and web servers. The presence of "https://" in a URL indicates that the site is using TLS/SSL to encrypt traffic. 2. Email Security: Protocols like SMTP, POP3, and IMAP are often secured using TLS to protect emails in transit. 3. VPNs: Many virtual private networks (VPNs) use TLS/SSL to create secure tunnels between clients and servers. 4. Secure Messaging: TLS is often used in messaging services to protect data from being intercepted.
  翻译: